/** * Exclude object from result * * @param ChildProfile $profile Object to remove from the list of results * * @return $this|ChildProfileQuery The current query, for fluid interface */ public function prune($profile = null) { if ($profile) { $this->addUsingAlias(ProfileTableMap::COL_ID, $profile->getId(), Criteria::NOT_EQUAL); } return $this; }
/** * Filter the query by a related \Profile object * * @param \Profile|ObjectCollection $profile the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildAccountQuery The current query, for fluid interface */ public function filterByProfile($profile, $comparison = null) { if ($profile instanceof \Profile) { return $this->addUsingAlias(AccountTableMap::COL_ID, $profile->getId(), $comparison); } elseif ($profile instanceof ObjectCollection) { return $this->useProfileQuery()->filterByPrimaryKeys($profile->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByProfile() only accepts arguments of type \\Profile or Collection'); } }
/** * Sets a single ChildProfile object as related to this object by a one-to-one relationship. * * @param ChildProfile $v ChildProfile * @return $this|\Account The current object (for fluent API support) * @throws PropelException */ public function setProfile(ChildProfile $v = null) { $this->singleProfile = $v; // Make sure that that the passed-in ChildProfile isn't already associated with this object if ($v !== null && $v->getAccount(null, false) === null) { $v->setAccount($this); } return $this; }