/** * 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 ChildUserQuery The current query, for fluid interface */ public function filterByNote($note, $comparison = null) { if ($note instanceof \Models\Note) { return $this->addUsingAlias(UserTableMap::COL_ID, $note->getUserId(), $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'); } }