/**
  * Filter the query by a related \Users object
  *
  * @param \Users|ObjectCollection $users 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 ChildContributionsQuery The current query, for fluid interface
  */
 public function filterByuserSysRef($users, $comparison = null)
 {
     if ($users instanceof \Users) {
         return $this->addUsingAlias(ContributionsTableMap::COL___USER__, $users->getId(), $comparison);
     } elseif ($users instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(ContributionsTableMap::COL___USER__, $users->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByuserSysRef() only accepts arguments of type \\Users or Collection');
     }
 }
Example #2
0
 /**
  * Declares an association between this object and a ChildUsers object.
  *
  * @param  ChildUsers $v
  * @return $this|\Data The current object (for fluent API support)
  * @throws PropelException
  */
 public function setuserSysRef(ChildUsers $v = null)
 {
     if ($v === null) {
         $this->setUserSys(NULL);
     } else {
         $this->setUserSys($v->getId());
     }
     $this->auserSysRef = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildUsers object, it will not be re-added.
     if ($v !== null) {
         $v->addData($this);
     }
     return $this;
 }
Example #3
0
 /**
  * Exclude object from result
  *
  * @param   ChildUsers $users Object to remove from the list of results
  *
  * @return $this|ChildUsersQuery The current query, for fluid interface
  */
 public function prune($users = null)
 {
     if ($users) {
         $this->addUsingAlias(UsersTableMap::COL_ID, $users->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }