Beispiel #1
0
 /**
  * Filter the query by a related Mesa object
  *
  * @param   Mesa|PropelObjectCollection $mesa The related object(s) to use as filter
  * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return   JugadorMesaQuery The current query, for fluid interface
  * @throws   PropelException - if the provided filter is invalid.
  */
 public function filterByMesa($mesa, $comparison = null)
 {
     if ($mesa instanceof Mesa) {
         return $this->addUsingAlias(JugadorMesaPeer::MESA_ID, $mesa->getId(), $comparison);
     } elseif ($mesa instanceof PropelObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(JugadorMesaPeer::MESA_ID, $mesa->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByMesa() only accepts arguments of type Mesa or PropelCollection');
     }
 }