/** * Filter the query by a related \Templatenames object * * @param \Templatenames|ObjectCollection $templatenames 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 ChildContributionsQuery The current query, for fluid interface */ public function filterByTemplatenames($templatenames, $comparison = null) { if ($templatenames instanceof \Templatenames) { return $this->addUsingAlias(ContributionsTableMap::COL__FORTEMPLATE, $templatenames->getId(), $comparison); } elseif ($templatenames instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(ContributionsTableMap::COL__FORTEMPLATE, $templatenames->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByTemplatenames() only accepts arguments of type \\Templatenames or Collection'); } }