Esempio n. 1
0
 /**
  * @param ChildBook $book The ChildBook object to add.
  */
 protected function doAddBook(ChildBook $book)
 {
     $this->collBooks[] = $book;
     $book->setPublisher($this);
 }
Esempio n. 2
0
 /**
  * Exclude object from result
  *
  * @param   ChildBook $book Object to remove from the list of results
  *
  * @return $this|ChildBookQuery The current query, for fluid interface
  */
 public function prune($book = null)
 {
     if ($book) {
         $this->addUsingAlias(BookTableMap::COL_ID, $book->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
Esempio n. 3
0
 /**
  * Filter the query by a related \testpropel\Book object
  *
  * @param \testpropel\Book|ObjectCollection $book the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildPublisherQuery The current query, for fluid interface
  */
 public function filterByBook($book, $comparison = null)
 {
     if ($book instanceof \testpropel\Book) {
         return $this->addUsingAlias(PublisherTableMap::COL_ID, $book->getPublisherId(), $comparison);
     } elseif ($book instanceof ObjectCollection) {
         return $this->useBookQuery()->filterByPrimaryKeys($book->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByBook() only accepts arguments of type \\testpropel\\Book or Collection');
     }
 }