Exemplo n.º 1
0
 /**
  * Filter the query by a related \RRightsForbook object
  *
  * @param \RRightsForbook|ObjectCollection $rRightsForbook the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildBooksQuery The current query, for fluid interface
  */
 public function filterByRRightsForbook($rRightsForbook, $comparison = null)
 {
     if ($rRightsForbook instanceof \RRightsForbook) {
         return $this->addUsingAlias(BooksTableMap::COL_ID, $rRightsForbook->getBookid(), $comparison);
     } elseif ($rRightsForbook instanceof ObjectCollection) {
         return $this->useRRightsForbookQuery()->filterByPrimaryKeys($rRightsForbook->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByRRightsForbook() only accepts arguments of type \\RRightsForbook or Collection');
     }
 }
Exemplo n.º 2
0
 /**
  * Exclude object from result
  *
  * @param   ChildRRightsForbook $rRightsForbook Object to remove from the list of results
  *
  * @return $this|ChildRRightsForbookQuery The current query, for fluid interface
  */
 public function prune($rRightsForbook = null)
 {
     if ($rRightsForbook) {
         $this->addCond('pruneCond0', $this->getAliasedColName(RRightsForbookTableMap::COL__RIGHTID), $rRightsForbook->getRightid(), Criteria::NOT_EQUAL);
         $this->addCond('pruneCond1', $this->getAliasedColName(RRightsForbookTableMap::COL__BOOKID), $rRightsForbook->getBookid(), Criteria::NOT_EQUAL);
         $this->combine(array('pruneCond0', 'pruneCond1'), Criteria::LOGICAL_OR);
     }
     return $this;
 }