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