/** * Filter the query by a related Libro object * * @param Libro $libro the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return PrivacidadQuery The current query, for fluid interface */ public function filterByLibro($libro, $comparison = null) { if ($libro instanceof Libro) { return $this->addUsingAlias(PrivacidadPeer::ID, $libro->getId_privacidad(), $comparison); } elseif ($libro instanceof PropelCollection) { return $this->useLibroQuery()->filterByPrimaryKeys($libro->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByLibro() only accepts arguments of type Libro or PropelCollection'); } }