Exemplo n.º 1
0
 /**
  * Exclude object from result
  *
  * @param   ChildVehicle $vehicle Object to remove from the list of results
  *
  * @return $this|ChildVehicleQuery The current query, for fluid interface
  */
 public function prune($vehicle = null)
 {
     if ($vehicle) {
         $this->addUsingAlias(VehicleTableMap::COL_ID, $vehicle->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
Exemplo n.º 2
0
 /**
  * @param ChildVehicle $vehicle The ChildVehicle object to add.
  */
 protected function doAddVehicle(ChildVehicle $vehicle)
 {
     $this->collVehicles[] = $vehicle;
     $vehicle->setMake($this);
 }
Exemplo n.º 3
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');
     }
 }