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