/** * Filter the query by a related \Keyword object * * @param \Keyword|ObjectCollection $keyword 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 ChildTagQuery The current query, for fluid interface */ public function filterByKeyword($keyword, $comparison = null) { if ($keyword instanceof \Keyword) { return $this->addUsingAlias(TagTableMap::COL_KEYWORD_ID, $keyword->getId(), $comparison); } elseif ($keyword instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(TagTableMap::COL_KEYWORD_ID, $keyword->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByKeyword() only accepts arguments of type \\Keyword or Collection'); } }
/** * Declares an association between this object and a ChildKeyword object. * * @param ChildKeyword $v * @return $this|\KeywordSynonym The current object (for fluent API support) * @throws PropelException */ public function setKeyword(ChildKeyword $v = null) { if ($v === null) { $this->setKeywordId(NULL); } else { $this->setKeywordId($v->getId()); } $this->aKeyword = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildKeyword object, it will not be re-added. if ($v !== null) { $v->addKeywordSynonym($this); } return $this; }
/** * Exclude object from result * * @param ChildKeyword $keyword Object to remove from the list of results * * @return $this|ChildKeywordQuery The current query, for fluid interface */ public function prune($keyword = null) { if ($keyword) { $this->addUsingAlias(KeywordTableMap::COL_ID, $keyword->getId(), Criteria::NOT_EQUAL); } return $this; }