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