/** * Filter the query by a related \App\Propel\User object * * @param \App\Propel\User|ObjectCollection $user 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 ChildSocialRecommendationQuery The current query, for fluid interface */ public function filterByUserRelatedBySocialRecommendationTo($user, $comparison = null) { if ($user instanceof \App\Propel\User) { return $this->addUsingAlias(SocialRecommendationTableMap::COL_SOCIAL_RECOMMENDATION_TO, $user->getUserId(), $comparison); } elseif ($user instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(SocialRecommendationTableMap::COL_SOCIAL_RECOMMENDATION_TO, $user->toKeyValue('PrimaryKey', 'UserId'), $comparison); } else { throw new PropelException('filterByUserRelatedBySocialRecommendationTo() only accepts arguments of type \\App\\Propel\\User or Collection'); } }
/** * Filter the query by a related \App\Propel\User object * * @param \App\Propel\User|ObjectCollection $user 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 ChildWishlistQuery The current query, for fluid interface */ public function filterByUser($user, $comparison = null) { if ($user instanceof \App\Propel\User) { return $this->addUsingAlias(WishlistTableMap::COL_USER_ID, $user->getUserId(), $comparison); } elseif ($user instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(WishlistTableMap::COL_USER_ID, $user->toKeyValue('PrimaryKey', 'UserId'), $comparison); } else { throw new PropelException('filterByUser() only accepts arguments of type \\App\\Propel\\User or Collection'); } }
/** * Declares an association between this object and a ChildUser object. * * @param ChildUser $v * @return $this|\App\Propel\SocialRecommendation The current object (for fluent API support) * @throws PropelException */ public function setUserRelatedBySocialRecommendationTo(ChildUser $v = null) { if ($v === null) { $this->setSocialRecommendationTo(NULL); } else { $this->setSocialRecommendationTo($v->getUserId()); } $this->aUserRelatedBySocialRecommendationTo = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildUser object, it will not be re-added. if ($v !== null) { $v->addSocialRecommendationRelatedBySocialRecommendationTo($this); } return $this; }
/** * Declares an association between this object and a ChildUser object. * * @param ChildUser $v * @return $this|\App\Propel\UserPeriodicPlan The current object (for fluent API support) * @throws PropelException */ public function setUser(ChildUser $v = null) { if ($v === null) { $this->setUserId(NULL); } else { $this->setUserId($v->getUserId()); } $this->aUser = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildUser object, it will not be re-added. if ($v !== null) { $v->addUserPeriodicPlan($this); } return $this; }
/** * Exclude object from result * * @param ChildUser $user Object to remove from the list of results * * @return $this|ChildUserQuery The current query, for fluid interface */ public function prune($user = null) { if ($user) { $this->addUsingAlias(UserTableMap::COL_USER_ID, $user->getUserId(), Criteria::NOT_EQUAL); } return $this; }