/** * Clears the current object, sets all attributes to their default values and removes * outgoing references as well as back-references (from other objects to this one. Results probably in a database * change of those foreign objects when you call `save` there). */ public function clear() { if (null !== $this->aAccount) { $this->aAccount->removeProfile($this); } $this->email = null; $this->telephone = null; $this->id = null; $this->alreadyInSave = false; $this->clearAllReferences(); $this->resetModified(); $this->setNew(true); $this->setDeleted(false); }
/** * Exclude object from result * * @param ChildAccount $account Object to remove from the list of results * * @return $this|ChildAccountQuery The current query, for fluid interface */ public function prune($account = null) { if ($account) { $this->addUsingAlias(AccountTableMap::COL_ID, $account->getId(), Criteria::NOT_EQUAL); } return $this; }
/** * Filter the query by a related \Account object * * @param \Account|ObjectCollection $account 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 ChildProfileQuery The current query, for fluid interface */ public function filterByAccount($account, $comparison = null) { if ($account instanceof \Account) { return $this->addUsingAlias(ProfileTableMap::COL_ID, $account->getId(), $comparison); } elseif ($account instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(ProfileTableMap::COL_ID, $account->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByAccount() only accepts arguments of type \\Account or Collection'); } }