/** * 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->aUserAttribute) { $this->aUserAttribute->removeUserAttributeValue($this); } if (null !== $this->aUser) { $this->aUser->removeUserAttributeValue($this); } $this->id = null; $this->user_attribute_id = null; $this->user_id = null; $this->value = null; $this->alreadyInSave = false; $this->clearAllReferences(); $this->resetModified(); $this->setNew(true); $this->setDeleted(false); }
/** * Filter the query by a related \UserAttribute object * * @param \UserAttribute|ObjectCollection $userAttribute 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 ChildUserAttributeValueQuery The current query, for fluid interface */ public function filterByUserAttribute($userAttribute, $comparison = null) { if ($userAttribute instanceof \UserAttribute) { return $this->addUsingAlias(UserAttributeValueTableMap::COL_USER_ATTRIBUTE_ID, $userAttribute->getId(), $comparison); } elseif ($userAttribute instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(UserAttributeValueTableMap::COL_USER_ATTRIBUTE_ID, $userAttribute->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByUserAttribute() only accepts arguments of type \\UserAttribute or Collection'); } }
/** * Exclude object from result * * @param ChildUserAttribute $userAttribute Object to remove from the list of results * * @return $this|ChildUserAttributeQuery The current query, for fluid interface */ public function prune($userAttribute = null) { if ($userAttribute) { $this->addUsingAlias(UserAttributeTableMap::COL_ID, $userAttribute->getId(), Criteria::NOT_EQUAL); } return $this; }