/** * Exclude object from result * * @param ChildRRightsForuser $rRightsForuser Object to remove from the list of results * * @return $this|ChildRRightsForuserQuery The current query, for fluid interface */ public function prune($rRightsForuser = null) { if ($rRightsForuser) { $this->addCond('pruneCond0', $this->getAliasedColName(RRightsForuserTableMap::COL__RIGHTID), $rRightsForuser->getRightid(), Criteria::NOT_EQUAL); $this->addCond('pruneCond1', $this->getAliasedColName(RRightsForuserTableMap::COL__USERID), $rRightsForuser->getUserid(), Criteria::NOT_EQUAL); $this->combine(array('pruneCond0', 'pruneCond1'), Criteria::LOGICAL_OR); } return $this; }
/** * Filter the query by a related \RRightsForuser object * * @param \RRightsForuser|ObjectCollection $rRightsForuser the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildRightsQuery The current query, for fluid interface */ public function filterByRRightsForuser($rRightsForuser, $comparison = null) { if ($rRightsForuser instanceof \RRightsForuser) { return $this->addUsingAlias(RightsTableMap::COL_ID, $rRightsForuser->getRightid(), $comparison); } elseif ($rRightsForuser instanceof ObjectCollection) { return $this->useRRightsForuserQuery()->filterByPrimaryKeys($rRightsForuser->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByRRightsForuser() only accepts arguments of type \\RRightsForuser or Collection'); } }
/** * Remove rights of this object * through the R_rights_foruser cross reference table. * * @param ChildRights $rights * @return ChildUsers The current object (for fluent API support) */ public function removeRights(ChildRights $rights) { if ($this->getRightss()->contains($rights)) { $rRightsForuser = new ChildRRightsForuser(); $rRightsForuser->setRights($rights); if ($rights->isUserssLoaded()) { //remove the back reference if available $rights->getUserss()->removeObject($this); } $rRightsForuser->setUsers($this); $this->removeRRightsForuser(clone $rRightsForuser); $rRightsForuser->clear(); $this->collRightss->remove($this->collRightss->search($rights)); if (null === $this->rightssScheduledForDeletion) { $this->rightssScheduledForDeletion = clone $this->collRightss; $this->rightssScheduledForDeletion->clear(); } $this->rightssScheduledForDeletion->push($rights); } return $this; }