/**
  * Exclude object from result
  *
  * @param   ChildTruck $truck Object to remove from the list of results
  *
  * @return $this|ChildTruckQuery The current query, for fluid interface
  */
 public function prune($truck = null)
 {
     if ($truck) {
         $this->addUsingAlias(TruckTableMap::COL_ID, $truck->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
 /**
  * Filter the query by a related \Model\Truck object
  *
  * @param \Model\Truck|ObjectCollection $truck The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @throws \Propel\Runtime\Exception\PropelException
  *
  * @return ChildOrderQuery The current query, for fluid interface
  */
 public function filterByTruck($truck, $comparison = null)
 {
     if ($truck instanceof \Model\Truck) {
         return $this->addUsingAlias(OrderTableMap::COL_TRUCK_ID, $truck->getId(), $comparison);
     } elseif ($truck instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(OrderTableMap::COL_TRUCK_ID, $truck->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByTruck() only accepts arguments of type \\Model\\Truck or Collection');
     }
 }
 /**
  * Filter the query by a related \Model\Truck object
  *
  * @param \Model\Truck|ObjectCollection $truck the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildUserQuery The current query, for fluid interface
  */
 public function filterByTruck($truck, $comparison = null)
 {
     if ($truck instanceof \Model\Truck) {
         return $this->addUsingAlias(UserTableMap::COL_ID, $truck->getUserId(), $comparison);
     } elseif ($truck instanceof ObjectCollection) {
         return $this->useTruckQuery()->filterByPrimaryKeys($truck->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByTruck() only accepts arguments of type \\Model\\Truck or Collection');
     }
 }
Esempio n. 4
0
 /**
  * Clears the current object, sets all attributes to their default values and removes
  * outgoing references as well as back-references (from other objects to this one. Results probably in a database
  * change of those foreign objects when you call `save` there).
  */
 public function clear()
 {
     if (null !== $this->aTruck) {
         $this->aTruck->removeOrder($this);
     }
     $this->id = null;
     $this->truck_id = null;
     $this->item_name = null;
     $this->price = null;
     $this->charge_id = null;
     $this->customer_id = null;
     $this->customer_name = null;
     $this->customer_email = null;
     $this->customer_phone_number = null;
     $this->open = null;
     $this->created_at = null;
     $this->updated_at = null;
     $this->alreadyInSave = false;
     $this->clearAllReferences();
     $this->applyDefaultValues();
     $this->resetModified();
     $this->setNew(true);
     $this->setDeleted(false);
 }
Esempio n. 5
0
 /**
  * @param ChildTruck $truck The ChildTruck object to add.
  */
 protected function doAddTruck(ChildTruck $truck)
 {
     $this->collTrucks[] = $truck;
     $truck->setUser($this);
 }