/** * 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'); } }