/** * Declares an association between this object and a ChildUserDetail object. * * @param ChildUserDetail $v * @return $this|\ORM\RowHistory The current object (for fluent API support) * @throws PropelException */ public function setUserDetail(ChildUserDetail $v = null) { if ($v === null) { $this->setUserId(NULL); } else { $this->setUserId($v->getId()); } $this->aUserDetail = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildUserDetail object, it will not be re-added. if ($v !== null) { $v->addHistory($this); } return $this; }
/** * Exclude object from result * * @param ChildUserDetail $userDetail Object to remove from the list of results * * @return $this|ChildUserDetailQuery The current query, for fluid interface */ public function prune($userDetail = null) { if ($userDetail) { $this->addUsingAlias(UserDetailTableMap::COL_ID, $userDetail->getId(), Criteria::NOT_EQUAL); } return $this; }
/** * Filter the query by a related \ORM\UserDetail object * * @param \ORM\UserDetail|ObjectCollection $userDetail The related object(s) to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCreditPaymentQuery The current query, for fluid interface */ public function filterByCashier($userDetail, $comparison = null) { if ($userDetail instanceof \ORM\UserDetail) { return $this->addUsingAlias(CreditPaymentTableMap::COL_CASHIER_ID, $userDetail->getId(), $comparison); } elseif ($userDetail instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(CreditPaymentTableMap::COL_CASHIER_ID, $userDetail->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByCashier() only accepts arguments of type \\ORM\\UserDetail or Collection'); } }
/** * Filter the query by a related \ORM\UserDetail object * * @param \ORM\UserDetail|ObjectCollection $userDetail the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildUserQuery The current query, for fluid interface */ public function filterByDetail($userDetail, $comparison = null) { if ($userDetail instanceof \ORM\UserDetail) { return $this->addUsingAlias(UserTableMap::COL_ID, $userDetail->getId(), $comparison); } elseif ($userDetail instanceof ObjectCollection) { return $this->useDetailQuery()->filterByPrimaryKeys($userDetail->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByDetail() only accepts arguments of type \\ORM\\UserDetail or Collection'); } }