/** * Filter the query by a related \UserAttributes object * * @param \UserAttributes|ObjectCollection $userAttributes 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 ChildUserAttributeValuesQuery The current query, for fluid interface */ public function filterByUserAttributes($userAttributes, $comparison = null) { if ($userAttributes instanceof \UserAttributes) { return $this->addUsingAlias(UserAttributeValuesTableMap::COL_USER_ATTRIBUTE_ID, $userAttributes->getId(), $comparison); } elseif ($userAttributes instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(UserAttributeValuesTableMap::COL_USER_ATTRIBUTE_ID, $userAttributes->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByUserAttributes() only accepts arguments of type \\UserAttributes or Collection'); } }
/** * Exclude object from result * * @param ChildUserAttributes $userAttributes Object to remove from the list of results * * @return $this|ChildUserAttributesQuery The current query, for fluid interface */ public function prune($userAttributes = null) { if ($userAttributes) { $this->addUsingAlias(UserAttributesTableMap::COL_ID, $userAttributes->getId(), Criteria::NOT_EQUAL); } return $this; }
/** * Declares an association between this object and a ChildUserAttributes object. * * @param ChildUserAttributes $v * @return $this|\UserAttributeValues The current object (for fluent API support) * @throws PropelException */ public function setUserAttributes(ChildUserAttributes $v = null) { if ($v === null) { $this->setUserAttributeId(NULL); } else { $this->setUserAttributeId($v->getId()); } $this->aUserAttributes = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildUserAttributes object, it will not be re-added. if ($v !== null) { $v->addUserAttributeValues($this); } return $this; }