Exemplo n.º 1
0
 /**
  * Exclude object from result
  *
  * @param   ChildContributions $contributions Object to remove from the list of results
  *
  * @return $this|ChildContributionsQuery The current query, for fluid interface
  */
 public function prune($contributions = null)
 {
     if ($contributions) {
         $this->addUsingAlias(ContributionsTableMap::COL_ID, $contributions->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
Exemplo n.º 2
0
 /**
  * Declares an association between this object and a ChildContributions object.
  *
  * @param  ChildContributions $v
  * @return $this|\Data The current object (for fluent API support)
  * @throws PropelException
  */
 public function setContributions(ChildContributions $v = null)
 {
     if ($v === null) {
         $this->setForcontribution(NULL);
     } else {
         $this->setForcontribution($v->getId());
     }
     $this->aContributions = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildContributions object, it will not be re-added.
     if ($v !== null) {
         $v->addData($this);
     }
     return $this;
 }
Exemplo n.º 3
0
 /**
  * Filter the query by a related \Contributions object
  *
  * @param \Contributions|ObjectCollection $contributions The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @throws \Propel\Runtime\Exception\PropelException
  *
  * @return ChildDataQuery The current query, for fluid interface
  */
 public function filterByContributions($contributions, $comparison = null)
 {
     if ($contributions instanceof \Contributions) {
         return $this->addUsingAlias(DataTableMap::COL__FORCONTRIBUTION, $contributions->getId(), $comparison);
     } elseif ($contributions instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(DataTableMap::COL__FORCONTRIBUTION, $contributions->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByContributions() only accepts arguments of type \\Contributions or Collection');
     }
 }