Example #1
0
 /**
  * Filter the query by a related \keeko\core\model\Application object
  *
  * @param \keeko\core\model\Application|ObjectCollection $application the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildPackageQuery The current query, for fluid interface
  */
 public function filterByApplication($application, $comparison = null)
 {
     if ($application instanceof \keeko\core\model\Application) {
         return $this->addUsingAlias(PackageTableMap::COL_ID, $application->getId(), $comparison);
     } elseif ($application instanceof ObjectCollection) {
         return $this->useApplicationQuery()->filterByPrimaryKeys($application->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByApplication() only accepts arguments of type \\keeko\\core\\model\\Application or Collection');
     }
 }