Example #1
0
 /**
  * Filter the query by a related \keeko\core\model\Extension object
  *
  * @param \keeko\core\model\Extension|ObjectCollection $extension 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 filterByExtension($extension, $comparison = null)
 {
     if ($extension instanceof \keeko\core\model\Extension) {
         return $this->addUsingAlias(PackageTableMap::COL_ID, $extension->getPackageId(), $comparison);
     } elseif ($extension instanceof ObjectCollection) {
         return $this->useExtensionQuery()->filterByPrimaryKeys($extension->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByExtension() only accepts arguments of type \\keeko\\core\\model\\Extension or Collection');
     }
 }