/** * Filter the query by a related Customers object * * @param Customers|PropelObjectCollection $customers The related object(s) to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return TransaksiQuery The current query, for fluid interface * @throws PropelException - if the provided filter is invalid. */ public function filterByCustomers($customers, $comparison = null) { if ($customers instanceof Customers) { return $this->addUsingAlias(TransaksiPeer::ID_CUSTOMERS, $customers->getId(), $comparison); } elseif ($customers instanceof PropelObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(TransaksiPeer::ID_CUSTOMERS, $customers->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByCustomers() only accepts arguments of type Customers or PropelCollection'); } }