/** * Filter the query by a related \SpoilerWiki\Summary object * * @param \SpoilerWiki\Summary|ObjectCollection $summary 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 ChildContentAreaQuery The current query, for fluid interface */ public function filterBySummary($summary, $comparison = null) { if ($summary instanceof \SpoilerWiki\Summary) { return $this->addUsingAlias(ContentAreaTableMap::COL_ID, $summary->getId(), $comparison); } elseif ($summary instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(ContentAreaTableMap::COL_ID, $summary->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterBySummary() only accepts arguments of type \\SpoilerWiki\\Summary or Collection'); } }
/** * Exclude object from result * * @param ChildSummary $summary Object to remove from the list of results * * @return $this|ChildSummaryQuery The current query, for fluid interface */ public function prune($summary = null) { if ($summary) { $this->addUsingAlias(SummaryTableMap::COL_ID, $summary->getId(), Criteria::NOT_EQUAL); } return $this; }
/** * Declares an association between this object and a ChildSummary object. * * @param ChildSummary $v * @return $this|\SpoilerWiki\ContentArea The current object (for fluent API support) * @throws PropelException */ public function setSummary(ChildSummary $v = null) { if ($v === null) { $this->setId(NULL); } else { $this->setId($v->getId()); } $this->aSummary = $v; // Add binding for other direction of this 1:1 relationship. if ($v !== null) { $v->setContentArea($this); } return $this; }