/** * Declares an association between this object and a ChildNote object. * * @param ChildNote $v * @return $this|\Models\Comment The current object (for fluent API support) * @throws PropelException */ public function setNote(ChildNote $v = null) { if ($v === null) { $this->setNoteId(NULL); } else { $this->setNoteId($v->getId()); } $this->aNote = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildNote object, it will not be re-added. if ($v !== null) { $v->addComment($this); } return $this; }
/** * Filter the query by a related \Models\Note object * * @param \Models\Note $note The related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @throws \Propel\Runtime\Exception\PropelException * * @return ChildSharedQuery The current query, for fluid interface */ public function filterByNote($note, $comparison = null) { if ($note instanceof \Models\Note) { return $this->addUsingAlias(SharedTableMap::COL_WHAT_TYPE, 'note', $comparison)->addUsingAlias(SharedTableMap::COL_WHAT_ID, $note->getId(), $comparison); } else { throw new PropelException('filterByNote() only accepts arguments of type \\Models\\Note'); } }
/** * Filter the query by a related \Models\Note object * * @param \Models\Note|ObjectCollection $note The related object(s) to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @throws \Propel\Runtime\Exception\PropelException * * @return ChildCommentQuery The current query, for fluid interface */ public function filterByNote($note, $comparison = null) { if ($note instanceof \Models\Note) { return $this->addUsingAlias(CommentTableMap::COL_NOTE_ID, $note->getId(), $comparison); } elseif ($note instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(CommentTableMap::COL_NOTE_ID, $note->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByNote() only accepts arguments of type \\Models\\Note or Collection'); } }
/** * Exclude object from result * * @param ChildNote $note Object to remove from the list of results * * @return $this|ChildNoteQuery The current query, for fluid interface */ public function prune($note = null) { if ($note) { $this->addUsingAlias(NoteTableMap::COL_ID, $note->getId(), Criteria::NOT_EQUAL); } return $this; }