Ejemplo n.º 1
0
 /**
  * Filter the query by a related \App\Propel\Delivery object
  *
  * @param \App\Propel\Delivery|ObjectCollection $delivery 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 filterByDelivery($delivery, $comparison = null)
 {
     if ($delivery instanceof \App\Propel\Delivery) {
         return $this->addUsingAlias(OrderTableMap::COL_DELIVERY_ID, $delivery->getDeliveryId(), $comparison);
     } elseif ($delivery instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(OrderTableMap::COL_DELIVERY_ID, $delivery->toKeyValue('PrimaryKey', 'DeliveryId'), $comparison);
     } else {
         throw new PropelException('filterByDelivery() only accepts arguments of type \\App\\Propel\\Delivery or Collection');
     }
 }
Ejemplo n.º 2
0
 /**
  * Declares an association between this object and a ChildDelivery object.
  *
  * @param  ChildDelivery $v
  * @return $this|\App\Propel\DeliveryPeriodic The current object (for fluent API support)
  * @throws PropelException
  */
 public function setDelivery(ChildDelivery $v = null)
 {
     if ($v === null) {
         $this->setDeliveryId(NULL);
     } else {
         $this->setDeliveryId($v->getDeliveryId());
     }
     $this->aDelivery = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildDelivery object, it will not be re-added.
     if ($v !== null) {
         $v->addDeliveryPeriodic($this);
     }
     return $this;
 }
Ejemplo n.º 3
0
 /**
  * Exclude object from result
  *
  * @param   ChildDelivery $delivery Object to remove from the list of results
  *
  * @return $this|ChildDeliveryQuery The current query, for fluid interface
  */
 public function prune($delivery = null)
 {
     if ($delivery) {
         $this->addUsingAlias(DeliveryTableMap::COL_DELIVERY_ID, $delivery->getDeliveryId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }