示例#1
0
 /**
  * Filter the query by a related \Models\Note object
  *
  * @param \Models\Note|ObjectCollection $note the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildCategoryQuery The current query, for fluid interface
  */
 public function filterByNote($note, $comparison = null)
 {
     if ($note instanceof \Models\Note) {
         return $this->addUsingAlias(CategoryTableMap::COL_ID, $note->getCategoryId(), $comparison);
     } elseif ($note instanceof ObjectCollection) {
         return $this->useNoteQuery()->filterByPrimaryKeys($note->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByNote() only accepts arguments of type \\Models\\Note or Collection');
     }
 }