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