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