/** * Filter the query by a related Lista object * * @param Lista|PropelCollection $lista The related object(s) to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return Lista_audiolibroQuery The current query, for fluid interface */ public function filterByLista($lista, $comparison = null) { if ($lista instanceof Lista) { return $this->addUsingAlias(Lista_audiolibroPeer::ID_LISTA, $lista->getId(), $comparison); } elseif ($lista instanceof PropelCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(Lista_audiolibroPeer::ID_LISTA, $lista->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByLista() only accepts arguments of type Lista or PropelCollection'); } }