Exemplo n.º 1
0
 /**
  * Filter the query by a related \Anand\Vehicle object
  *
  * @param \Anand\Vehicle|ObjectCollection $vehicle the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildMakeQuery The current query, for fluid interface
  */
 public function filterByVehicle($vehicle, $comparison = null)
 {
     if ($vehicle instanceof \Anand\Vehicle) {
         return $this->addUsingAlias(MakeTableMap::COL_ID, $vehicle->getMakeId(), $comparison);
     } elseif ($vehicle instanceof ObjectCollection) {
         return $this->useVehicleQuery()->filterByPrimaryKeys($vehicle->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByVehicle() only accepts arguments of type \\Anand\\Vehicle or Collection');
     }
 }