/** * 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'); } }
/** * Exclude object from result * * @param ChildPackage $package Object to remove from the list of results * * @return $this|ChildPackageQuery The current query, for fluid interface */ public function prune($package = null) { if ($package) { $this->addUsingAlias(PackageTableMap::COL_ID, $package->getId(), Criteria::NOT_EQUAL); } return $this; }
/** * Declares an association between this object and a ChildPackage object. * * @param ChildPackage $v * @return $this|\keeko\core\model\Extension The current object (for fluent API support) * @throws PropelException */ public function setPackage(ChildPackage $v = null) { if ($v === null) { $this->setPackageId(NULL); } else { $this->setPackageId($v->getId()); } $this->aPackage = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildPackage object, it will not be re-added. if ($v !== null) { $v->addExtension($this); } return $this; }
/** * Declares an association between this object and a ChildPackage object. * * @param ChildPackage $v * @return $this|\keeko\core\model\Application The current object (for fluent API support) * @throws PropelException */ public function setPackage(ChildPackage $v = null) { if ($v === null) { $this->setId(NULL); } else { $this->setId($v->getId()); } $this->aPackage = $v; // Add binding for other direction of this 1:1 relationship. if ($v !== null) { $v->setApplication($this); } return $this; }