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