コード例 #1
0
 /**
  * Filter the query by a related Expediente object
  *
  * @param   Expediente|PropelObjectCollection $expediente The related object(s) to use as filter
  * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return                 ExpedienteanticipoQuery The current query, for fluid interface
  * @throws PropelException - if the provided filter is invalid.
  */
 public function filterByExpediente($expediente, $comparison = null)
 {
     if ($expediente instanceof Expediente) {
         return $this->addUsingAlias(ExpedienteanticipoPeer::IDEXPEDIENTE, $expediente->getIdexpediente(), $comparison);
     } elseif ($expediente instanceof PropelObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(ExpedienteanticipoPeer::IDEXPEDIENTE, $expediente->toKeyValue('PrimaryKey', 'Idexpediente'), $comparison);
     } else {
         throw new PropelException('filterByExpediente() only accepts arguments of type Expediente or PropelCollection');
     }
 }
コード例 #2
0
 /**
  * Filter the query by a related Expedienteservicio object
  *
  * @param   Expedienteservicio|PropelObjectCollection $expedienteservicio  the related object to use as filter
  * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return                 ExpedienteQuery The current query, for fluid interface
  * @throws PropelException - if the provided filter is invalid.
  */
 public function filterByExpedienteservicio($expedienteservicio, $comparison = null)
 {
     if ($expedienteservicio instanceof Expedienteservicio) {
         return $this->addUsingAlias(ExpedientePeer::IDEXPEDIENTE, $expedienteservicio->getIdexpediente(), $comparison);
     } elseif ($expedienteservicio instanceof PropelObjectCollection) {
         return $this->useExpedienteservicioQuery()->filterByPrimaryKeys($expedienteservicio->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByExpedienteservicio() only accepts arguments of type Expedienteservicio or PropelCollection');
     }
 }