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