Пример #1
0
 /**
  * Declares an association between this object and a ChildUserAttribute object.
  *
  * @param  ChildUserAttribute $v
  * @return $this|\UserAttributeValue The current object (for fluent API support)
  * @throws PropelException
  */
 public function setUserAttribute(ChildUserAttribute $v = null)
 {
     if ($v === null) {
         $this->setUserAttributeId(NULL);
     } else {
         $this->setUserAttributeId($v->getId());
     }
     $this->aUserAttribute = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildUserAttribute object, it will not be re-added.
     if ($v !== null) {
         $v->addUserAttributeValue($this);
     }
     return $this;
 }
 /**
  * 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');
     }
 }
Пример #3
0
 /**
  * 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;
 }