/** * Declares an association between this object and a ChildMember object. * * @param ChildMember $v * @return $this|\Models\User The current object (for fluent API support) * @throws PropelException */ public function setMember(ChildMember $v = null) { if ($v === null) { $this->setIdMember(NULL); } else { $this->setIdMember($v->getId()); } $this->aMember = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildMember object, it will not be re-added. if ($v !== null) { $v->addUser($this); } return $this; }
/** * Filter the query by a related \Models\Member object * * @param \Models\Member|ObjectCollection $member 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 ChildUserQuery The current query, for fluid interface */ public function filterByMember($member, $comparison = null) { if ($member instanceof \Models\Member) { return $this->addUsingAlias(UserTableMap::COL_ID_MEMBER, $member->getId(), $comparison); } elseif ($member instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(UserTableMap::COL_ID_MEMBER, $member->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByMember() only accepts arguments of type \\Models\\Member or Collection'); } }