/**
  * Filter the query by a related Barang object
  *
  * @param   Barang|PropelObjectCollection $barang  the related object to use as filter
  * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return                 KategoriQuery 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(KategoriPeer::ID, $barang->getIdKategori(), $comparison);
     } elseif ($barang instanceof PropelObjectCollection) {
         return $this->useBarangQuery()->filterByPrimaryKeys($barang->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByBarang() only accepts arguments of type Barang or PropelCollection');
     }
 }