delivery form
This commit is contained in:
98
core/lib/Thelia/Action/Order.php
Executable file
98
core/lib/Thelia/Action/Order.php
Executable file
@@ -0,0 +1,98 @@
|
|||||||
|
<?php
|
||||||
|
/*************************************************************************************/
|
||||||
|
/* */
|
||||||
|
/* Thelia */
|
||||||
|
/* */
|
||||||
|
/* Copyright (c) OpenStudio */
|
||||||
|
/* email : info@thelia.net */
|
||||||
|
/* web : http://www.thelia.net */
|
||||||
|
/* */
|
||||||
|
/* This program is free software; you can redistribute it and/or modify */
|
||||||
|
/* it under the terms of the GNU General Public License as published by */
|
||||||
|
/* the Free Software Foundation; either version 3 of the License */
|
||||||
|
/* */
|
||||||
|
/* This program is distributed in the hope that it will be useful, */
|
||||||
|
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
|
||||||
|
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
|
||||||
|
/* GNU General Public License for more details. */
|
||||||
|
/* */
|
||||||
|
/* You should have received a copy of the GNU General Public License */
|
||||||
|
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
/* */
|
||||||
|
/*************************************************************************************/
|
||||||
|
|
||||||
|
namespace Thelia\Action;
|
||||||
|
|
||||||
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
|
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||||
|
use Thelia\Core\Event\CartEvent;
|
||||||
|
use Thelia\Core\Event\OrderEvent;
|
||||||
|
use Thelia\Core\Event\TheliaEvents;
|
||||||
|
use Thelia\Model\ProductPrice;
|
||||||
|
use Thelia\Model\ProductPriceQuery;
|
||||||
|
use Thelia\Model\CartItem;
|
||||||
|
use Thelia\Model\CartItemQuery;
|
||||||
|
use Thelia\Model\ConfigQuery;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Class Order
|
||||||
|
* @package Thelia\Action
|
||||||
|
* @author Etienne Roudeix <eroudeix@openstudio.fr>
|
||||||
|
*/
|
||||||
|
class Order extends BaseAction implements EventSubscriberInterface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @param \Thelia\Core\Event\OrderEvent $event
|
||||||
|
*/
|
||||||
|
public function setDeliveryAddress(OrderEvent $event)
|
||||||
|
{
|
||||||
|
$order = $event->getOrder();
|
||||||
|
|
||||||
|
$order->chosenDeliveryAddress = $event->getDeliveryAddress();
|
||||||
|
|
||||||
|
$event->setOrder($order);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param \Thelia\Core\Event\OrderEvent $event
|
||||||
|
*/
|
||||||
|
public function setDeliveryModule(OrderEvent $event)
|
||||||
|
{
|
||||||
|
$order = $event->getOrder();
|
||||||
|
|
||||||
|
$deliveryAddress = $event->getDeliveryAddress();
|
||||||
|
|
||||||
|
$order->setDeliveryModuleId($event->getDeliveryModule());
|
||||||
|
|
||||||
|
$event->setOrder($order);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns an array of event names this subscriber wants to listen to.
|
||||||
|
*
|
||||||
|
* The array keys are event names and the value can be:
|
||||||
|
*
|
||||||
|
* * The method name to call (priority defaults to 0)
|
||||||
|
* * An array composed of the method name to call and the priority
|
||||||
|
* * An array of arrays composed of the method names to call and respective
|
||||||
|
* priorities, or 0 if unset
|
||||||
|
*
|
||||||
|
* For instance:
|
||||||
|
*
|
||||||
|
* * array('eventName' => 'methodName')
|
||||||
|
* * array('eventName' => array('methodName', $priority))
|
||||||
|
* * array('eventName' => array(array('methodName1', $priority), array('methodName2'))
|
||||||
|
*
|
||||||
|
* @return array The event names to listen to
|
||||||
|
*
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
public static function getSubscribedEvents()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
TheliaEvents::ORDER_SET_DELIVERY_ADDRESS => array("setDeliveryAddress", 128),
|
||||||
|
TheliaEvents::ORDER_SET_DELIVERY_MODULE => array("setDeliveryModule", 128),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -17,6 +17,11 @@
|
|||||||
<tag name="kernel.event_subscriber"/>
|
<tag name="kernel.event_subscriber"/>
|
||||||
</service>
|
</service>
|
||||||
|
|
||||||
|
<service id="thelia.action.order" class="Thelia\Action\Order">
|
||||||
|
<argument type="service" id="service_container"/>
|
||||||
|
<tag name="kernel.event_subscriber"/>
|
||||||
|
</service>
|
||||||
|
|
||||||
<service id="thelia.action.customer" class="Thelia\Action\Customer">
|
<service id="thelia.action.customer" class="Thelia\Action\Customer">
|
||||||
<argument type="service" id="service_container"/>
|
<argument type="service" id="service_container"/>
|
||||||
<tag name="kernel.event_subscriber"/>
|
<tag name="kernel.event_subscriber"/>
|
||||||
|
|||||||
@@ -112,13 +112,18 @@
|
|||||||
<default key="_view">cart</default>
|
<default key="_view">cart</default>
|
||||||
</route>
|
</route>
|
||||||
|
|
||||||
<route id="cart.billing" path="/order/billing">
|
<route id="order.delivery" path="/order/delivery" methods="post">
|
||||||
<default key="_controller">Thelia\Controller\Front\DefaultController::noAction</default>
|
<default key="_controller">Thelia\Controller\Front\OrderController::deliver</default>
|
||||||
<default key="_view">cart_billing</default>
|
<default key="_view">cart_delivery</default>
|
||||||
</route>
|
</route>
|
||||||
|
|
||||||
<route id="cart.update.quantity" path="/order/deliver">
|
<route id="order.delivery.process" path="/order/delivery">
|
||||||
<default key="_controller">Thelia\Controller\Front\OrderController::deliver</default>
|
<default key="_controller">Thelia\Controller\Front\DefaultController::noAction</default>
|
||||||
|
<default key="_view">cart_delivery</default>
|
||||||
|
</route>
|
||||||
|
|
||||||
|
<route id="order.billing" path="/order/billing">
|
||||||
|
<default key="_controller">Thelia\Controller\Front\DefaultController::noAction</default>
|
||||||
<default key="_view">cart_billing</default>
|
<default key="_view">cart_billing</default>
|
||||||
</route>
|
</route>
|
||||||
|
|
||||||
|
|||||||
@@ -27,8 +27,15 @@ use Thelia\Form\Exception\FormValidationException;
|
|||||||
use Thelia\Core\Event\OrderEvent;
|
use Thelia\Core\Event\OrderEvent;
|
||||||
use Thelia\Core\Event\TheliaEvents;
|
use Thelia\Core\Event\TheliaEvents;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
|
use Thelia\Form\OrderDelivery;
|
||||||
|
use Thelia\Log\Tlog;
|
||||||
use Thelia\Model\Order;
|
use Thelia\Model\Order;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class OrderController
|
||||||
|
* @package Thelia\Controller\Front
|
||||||
|
* @author Etienne Roudeix <eroudeix@openstudio.fr>
|
||||||
|
*/
|
||||||
class OrderController extends BaseFrontController
|
class OrderController extends BaseFrontController
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
@@ -38,19 +45,43 @@ class OrderController extends BaseFrontController
|
|||||||
*/
|
*/
|
||||||
public function deliver()
|
public function deliver()
|
||||||
{
|
{
|
||||||
$orderEvent = $this->getOrderEvent();
|
$message = false;
|
||||||
//$orderEvent->setBillingAddress($this->getRequest()->get("billing-address"));
|
|
||||||
$orderEvent->setDeliveryAddress($this->getRequest()->get("delivery-address"));
|
$orderDelivery = new OrderDelivery($this->getRequest());
|
||||||
$orderEvent->setDeliveryModule($this->getRequest()->get("delivery-module"));
|
|
||||||
|
$x = $this->getRequest();
|
||||||
|
$y = $_POST;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
//$this->getDispatcher()->dispatch(TheliaEvents::ORDER_SET_BILLING_ADDRESS, $orderEvent);
|
$form = $this->validateForm($orderDelivery, "post");
|
||||||
|
|
||||||
|
$orderEvent = $this->getOrderEvent();
|
||||||
|
$orderEvent->setDeliveryAddress($form->get("delivery-address")->getData());
|
||||||
|
$orderEvent->setDeliveryModule($form->get("delivery-module")->getData());
|
||||||
|
|
||||||
|
|
||||||
$this->getDispatcher()->dispatch(TheliaEvents::ORDER_SET_DELIVERY_ADDRESS, $orderEvent);
|
$this->getDispatcher()->dispatch(TheliaEvents::ORDER_SET_DELIVERY_ADDRESS, $orderEvent);
|
||||||
$this->getDispatcher()->dispatch(TheliaEvents::ORDER_SET_DELIVERY_MODULE, $orderEvent);
|
$this->getDispatcher()->dispatch(TheliaEvents::ORDER_SET_DELIVERY_MODULE, $orderEvent);
|
||||||
|
|
||||||
$this->redirectSuccess();
|
$this->redirectToRoute("order.billing");
|
||||||
|
|
||||||
|
} catch (FormValidationException $e) {
|
||||||
|
$message = sprintf("Please check your input: %s", $e->getMessage());
|
||||||
} catch (PropelException $e) {
|
} catch (PropelException $e) {
|
||||||
$this->getParserContext()->setGeneralError($e->getMessage());
|
$this->getParserContext()->setGeneralError($e->getMessage());
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$message = sprintf("Sorry, an error occured: %s", $e->getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($message !== false) {
|
||||||
|
Tlog::getInstance()->error(sprintf("Error during customer creation process : %s. Exception was %s", $message, $e->getMessage()));
|
||||||
|
|
||||||
|
$orderDelivery->setErrorMessage($message);
|
||||||
|
|
||||||
|
$this->getParserContext()
|
||||||
|
->addForm($orderDelivery)
|
||||||
|
->setGeneralError($message)
|
||||||
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,32 +39,40 @@ class OrderEvent extends ActionEvent
|
|||||||
* @param Order $order
|
* @param Order $order
|
||||||
*/
|
*/
|
||||||
public function __construct(Order $order)
|
public function __construct(Order $order)
|
||||||
|
{
|
||||||
|
$this->setOrder($order);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Order $order
|
||||||
|
*/
|
||||||
|
public function setOrder(Order $order)
|
||||||
{
|
{
|
||||||
$this->order = $order;
|
$this->order = $order;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Address $address
|
* @param $address
|
||||||
*/
|
*/
|
||||||
public function setBillingAddress(Address $address)
|
public function setBillingAddress($address)
|
||||||
{
|
{
|
||||||
$this->deliveryAddress = $address->getId();
|
$this->deliveryAddress = $address;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Address $address
|
* @param $address
|
||||||
*/
|
*/
|
||||||
public function setDeliveryAddress(Address $address)
|
public function setDeliveryAddress($address)
|
||||||
{
|
{
|
||||||
$this->deliveryAddress = $address->getId();
|
$this->deliveryAddress = $address;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Module $module
|
* @param $module
|
||||||
*/
|
*/
|
||||||
public function setDeliveryModule(Module $module)
|
public function setDeliveryModule($module)
|
||||||
{
|
{
|
||||||
$this->deliveryModule = $module->getId();
|
$this->deliveryModule = $module;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -80,7 +88,7 @@ class OrderEvent extends ActionEvent
|
|||||||
*/
|
*/
|
||||||
public function getBillingAddress()
|
public function getBillingAddress()
|
||||||
{
|
{
|
||||||
return AddressQuery::create()->findPk($this->billingAddress);
|
return $this->billingAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -88,7 +96,7 @@ class OrderEvent extends ActionEvent
|
|||||||
*/
|
*/
|
||||||
public function getDeliveryAddress()
|
public function getDeliveryAddress()
|
||||||
{
|
{
|
||||||
return AddressQuery::create()->findPk($this->deliveryAddress);
|
return $this->deliveryAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -96,6 +104,6 @@ class OrderEvent extends ActionEvent
|
|||||||
*/
|
*/
|
||||||
public function getDeliveryModule()
|
public function getDeliveryModule()
|
||||||
{
|
{
|
||||||
return AddressQuery::create()->findPk($this->deliveryModule);
|
return $this->deliveryModule;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ class OrderDelivery extends BaseForm
|
|||||||
{
|
{
|
||||||
$this->formBuilder
|
$this->formBuilder
|
||||||
->add("delivery-address", "integer", array(
|
->add("delivery-address", "integer", array(
|
||||||
|
"required" => true,
|
||||||
"constraints" => array(
|
"constraints" => array(
|
||||||
new Constraints\NotBlank(),
|
new Constraints\NotBlank(),
|
||||||
new Constraints\Callback(array(
|
new Constraints\Callback(array(
|
||||||
@@ -51,6 +52,7 @@ class OrderDelivery extends BaseForm
|
|||||||
)
|
)
|
||||||
))
|
))
|
||||||
->add("delivery-module", "integer", array(
|
->add("delivery-module", "integer", array(
|
||||||
|
"required" => true,
|
||||||
"constraints" => array(
|
"constraints" => array(
|
||||||
new Constraints\NotBlank(),
|
new Constraints\NotBlank(),
|
||||||
new Constraints\Callback(array(
|
new Constraints\Callback(array(
|
||||||
|
|||||||
@@ -987,10 +987,9 @@ abstract class Currency implements ActiveRecordInterface
|
|||||||
|
|
||||||
if ($this->ordersScheduledForDeletion !== null) {
|
if ($this->ordersScheduledForDeletion !== null) {
|
||||||
if (!$this->ordersScheduledForDeletion->isEmpty()) {
|
if (!$this->ordersScheduledForDeletion->isEmpty()) {
|
||||||
foreach ($this->ordersScheduledForDeletion as $order) {
|
\Thelia\Model\OrderQuery::create()
|
||||||
// need to save related object because we set the relation to null
|
->filterByPrimaryKeys($this->ordersScheduledForDeletion->getPrimaryKeys(false))
|
||||||
$order->save($con);
|
->delete($con);
|
||||||
}
|
|
||||||
$this->ordersScheduledForDeletion = null;
|
$this->ordersScheduledForDeletion = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1758,7 +1757,7 @@ abstract class Currency implements ActiveRecordInterface
|
|||||||
$this->ordersScheduledForDeletion = clone $this->collOrders;
|
$this->ordersScheduledForDeletion = clone $this->collOrders;
|
||||||
$this->ordersScheduledForDeletion->clear();
|
$this->ordersScheduledForDeletion->clear();
|
||||||
}
|
}
|
||||||
$this->ordersScheduledForDeletion[]= $order;
|
$this->ordersScheduledForDeletion[]= clone $order;
|
||||||
$order->setCurrency(null);
|
$order->setCurrency(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1807,10 +1806,10 @@ abstract class Currency implements ActiveRecordInterface
|
|||||||
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||||
* @return Collection|ChildOrder[] List of ChildOrder objects
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
*/
|
*/
|
||||||
public function getOrdersJoinOrderAddressRelatedByAddressInvoice($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
public function getOrdersJoinOrderAddressRelatedByInvoiceOrderAddressId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
||||||
{
|
{
|
||||||
$query = ChildOrderQuery::create(null, $criteria);
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
$query->joinWith('OrderAddressRelatedByAddressInvoice', $joinBehavior);
|
$query->joinWith('OrderAddressRelatedByInvoiceOrderAddressId', $joinBehavior);
|
||||||
|
|
||||||
return $this->getOrders($query, $con);
|
return $this->getOrders($query, $con);
|
||||||
}
|
}
|
||||||
@@ -1832,10 +1831,10 @@ abstract class Currency implements ActiveRecordInterface
|
|||||||
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||||
* @return Collection|ChildOrder[] List of ChildOrder objects
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
*/
|
*/
|
||||||
public function getOrdersJoinOrderAddressRelatedByAddressDelivery($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
public function getOrdersJoinOrderAddressRelatedByDeliveryOrderAddressId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
||||||
{
|
{
|
||||||
$query = ChildOrderQuery::create(null, $criteria);
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
$query->joinWith('OrderAddressRelatedByAddressDelivery', $joinBehavior);
|
$query->joinWith('OrderAddressRelatedByDeliveryOrderAddressId', $joinBehavior);
|
||||||
|
|
||||||
return $this->getOrders($query, $con);
|
return $this->getOrders($query, $con);
|
||||||
}
|
}
|
||||||
@@ -1865,6 +1864,81 @@ abstract class Currency implements ActiveRecordInterface
|
|||||||
return $this->getOrders($query, $con);
|
return $this->getOrders($query, $con);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If this collection has already been initialized with
|
||||||
|
* an identical criteria, it returns the collection.
|
||||||
|
* Otherwise if this Currency is new, it will return
|
||||||
|
* an empty collection; or if this Currency has previously
|
||||||
|
* been saved, it will retrieve related Orders from storage.
|
||||||
|
*
|
||||||
|
* This method is protected by default in order to keep the public
|
||||||
|
* api reasonable. You can provide public methods for those you
|
||||||
|
* actually need in Currency.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||||
|
* @param ConnectionInterface $con optional connection object
|
||||||
|
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||||
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
|
*/
|
||||||
|
public function getOrdersJoinModuleRelatedByPaymentModuleId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
||||||
|
{
|
||||||
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
|
$query->joinWith('ModuleRelatedByPaymentModuleId', $joinBehavior);
|
||||||
|
|
||||||
|
return $this->getOrders($query, $con);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If this collection has already been initialized with
|
||||||
|
* an identical criteria, it returns the collection.
|
||||||
|
* Otherwise if this Currency is new, it will return
|
||||||
|
* an empty collection; or if this Currency has previously
|
||||||
|
* been saved, it will retrieve related Orders from storage.
|
||||||
|
*
|
||||||
|
* This method is protected by default in order to keep the public
|
||||||
|
* api reasonable. You can provide public methods for those you
|
||||||
|
* actually need in Currency.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||||
|
* @param ConnectionInterface $con optional connection object
|
||||||
|
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||||
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
|
*/
|
||||||
|
public function getOrdersJoinModuleRelatedByDeliveryModuleId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
||||||
|
{
|
||||||
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
|
$query->joinWith('ModuleRelatedByDeliveryModuleId', $joinBehavior);
|
||||||
|
|
||||||
|
return $this->getOrders($query, $con);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If this collection has already been initialized with
|
||||||
|
* an identical criteria, it returns the collection.
|
||||||
|
* Otherwise if this Currency is new, it will return
|
||||||
|
* an empty collection; or if this Currency has previously
|
||||||
|
* been saved, it will retrieve related Orders from storage.
|
||||||
|
*
|
||||||
|
* This method is protected by default in order to keep the public
|
||||||
|
* api reasonable. You can provide public methods for those you
|
||||||
|
* actually need in Currency.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||||
|
* @param ConnectionInterface $con optional connection object
|
||||||
|
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||||
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
|
*/
|
||||||
|
public function getOrdersJoinLang($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
||||||
|
{
|
||||||
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
|
$query->joinWith('Lang', $joinBehavior);
|
||||||
|
|
||||||
|
return $this->getOrders($query, $con);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clears out the collCarts collection
|
* Clears out the collCarts collection
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -596,7 +596,7 @@ abstract class CurrencyQuery extends ModelCriteria
|
|||||||
*
|
*
|
||||||
* @return ChildCurrencyQuery The current query, for fluid interface
|
* @return ChildCurrencyQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function joinOrder($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
public function joinOrder($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||||
{
|
{
|
||||||
$tableMap = $this->getTableMap();
|
$tableMap = $this->getTableMap();
|
||||||
$relationMap = $tableMap->getRelation('Order');
|
$relationMap = $tableMap->getRelation('Order');
|
||||||
@@ -631,7 +631,7 @@ abstract class CurrencyQuery extends ModelCriteria
|
|||||||
*
|
*
|
||||||
* @return \Thelia\Model\OrderQuery A secondary query class using the current class as primary query
|
* @return \Thelia\Model\OrderQuery A secondary query class using the current class as primary query
|
||||||
*/
|
*/
|
||||||
public function useOrderQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
public function useOrderQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||||
{
|
{
|
||||||
return $this
|
return $this
|
||||||
->joinOrder($relationAlias, $joinType)
|
->joinOrder($relationAlias, $joinType)
|
||||||
|
|||||||
@@ -2552,10 +2552,10 @@ abstract class Customer implements ActiveRecordInterface
|
|||||||
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||||
* @return Collection|ChildOrder[] List of ChildOrder objects
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
*/
|
*/
|
||||||
public function getOrdersJoinOrderAddressRelatedByAddressInvoice($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
public function getOrdersJoinOrderAddressRelatedByInvoiceOrderAddressId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
||||||
{
|
{
|
||||||
$query = ChildOrderQuery::create(null, $criteria);
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
$query->joinWith('OrderAddressRelatedByAddressInvoice', $joinBehavior);
|
$query->joinWith('OrderAddressRelatedByInvoiceOrderAddressId', $joinBehavior);
|
||||||
|
|
||||||
return $this->getOrders($query, $con);
|
return $this->getOrders($query, $con);
|
||||||
}
|
}
|
||||||
@@ -2577,10 +2577,10 @@ abstract class Customer implements ActiveRecordInterface
|
|||||||
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||||
* @return Collection|ChildOrder[] List of ChildOrder objects
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
*/
|
*/
|
||||||
public function getOrdersJoinOrderAddressRelatedByAddressDelivery($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
public function getOrdersJoinOrderAddressRelatedByDeliveryOrderAddressId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
||||||
{
|
{
|
||||||
$query = ChildOrderQuery::create(null, $criteria);
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
$query->joinWith('OrderAddressRelatedByAddressDelivery', $joinBehavior);
|
$query->joinWith('OrderAddressRelatedByDeliveryOrderAddressId', $joinBehavior);
|
||||||
|
|
||||||
return $this->getOrders($query, $con);
|
return $this->getOrders($query, $con);
|
||||||
}
|
}
|
||||||
@@ -2610,6 +2610,81 @@ abstract class Customer implements ActiveRecordInterface
|
|||||||
return $this->getOrders($query, $con);
|
return $this->getOrders($query, $con);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If this collection has already been initialized with
|
||||||
|
* an identical criteria, it returns the collection.
|
||||||
|
* Otherwise if this Customer is new, it will return
|
||||||
|
* an empty collection; or if this Customer has previously
|
||||||
|
* been saved, it will retrieve related Orders from storage.
|
||||||
|
*
|
||||||
|
* This method is protected by default in order to keep the public
|
||||||
|
* api reasonable. You can provide public methods for those you
|
||||||
|
* actually need in Customer.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||||
|
* @param ConnectionInterface $con optional connection object
|
||||||
|
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||||
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
|
*/
|
||||||
|
public function getOrdersJoinModuleRelatedByPaymentModuleId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
||||||
|
{
|
||||||
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
|
$query->joinWith('ModuleRelatedByPaymentModuleId', $joinBehavior);
|
||||||
|
|
||||||
|
return $this->getOrders($query, $con);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If this collection has already been initialized with
|
||||||
|
* an identical criteria, it returns the collection.
|
||||||
|
* Otherwise if this Customer is new, it will return
|
||||||
|
* an empty collection; or if this Customer has previously
|
||||||
|
* been saved, it will retrieve related Orders from storage.
|
||||||
|
*
|
||||||
|
* This method is protected by default in order to keep the public
|
||||||
|
* api reasonable. You can provide public methods for those you
|
||||||
|
* actually need in Customer.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||||
|
* @param ConnectionInterface $con optional connection object
|
||||||
|
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||||
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
|
*/
|
||||||
|
public function getOrdersJoinModuleRelatedByDeliveryModuleId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
||||||
|
{
|
||||||
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
|
$query->joinWith('ModuleRelatedByDeliveryModuleId', $joinBehavior);
|
||||||
|
|
||||||
|
return $this->getOrders($query, $con);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If this collection has already been initialized with
|
||||||
|
* an identical criteria, it returns the collection.
|
||||||
|
* Otherwise if this Customer is new, it will return
|
||||||
|
* an empty collection; or if this Customer has previously
|
||||||
|
* been saved, it will retrieve related Orders from storage.
|
||||||
|
*
|
||||||
|
* This method is protected by default in order to keep the public
|
||||||
|
* api reasonable. You can provide public methods for those you
|
||||||
|
* actually need in Customer.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||||
|
* @param ConnectionInterface $con optional connection object
|
||||||
|
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||||
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
|
*/
|
||||||
|
public function getOrdersJoinLang($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
||||||
|
{
|
||||||
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
|
$query->joinWith('Lang', $joinBehavior);
|
||||||
|
|
||||||
|
return $this->getOrders($query, $con);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clears out the collCarts collection
|
* Clears out the collCarts collection
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ use Propel\Runtime\ActiveQuery\Criteria;
|
|||||||
use Propel\Runtime\ActiveQuery\ModelCriteria;
|
use Propel\Runtime\ActiveQuery\ModelCriteria;
|
||||||
use Propel\Runtime\ActiveRecord\ActiveRecordInterface;
|
use Propel\Runtime\ActiveRecord\ActiveRecordInterface;
|
||||||
use Propel\Runtime\Collection\Collection;
|
use Propel\Runtime\Collection\Collection;
|
||||||
|
use Propel\Runtime\Collection\ObjectCollection;
|
||||||
use Propel\Runtime\Connection\ConnectionInterface;
|
use Propel\Runtime\Connection\ConnectionInterface;
|
||||||
use Propel\Runtime\Exception\BadMethodCallException;
|
use Propel\Runtime\Exception\BadMethodCallException;
|
||||||
use Propel\Runtime\Exception\PropelException;
|
use Propel\Runtime\Exception\PropelException;
|
||||||
@@ -18,6 +19,8 @@ use Propel\Runtime\Parser\AbstractParser;
|
|||||||
use Propel\Runtime\Util\PropelDateTime;
|
use Propel\Runtime\Util\PropelDateTime;
|
||||||
use Thelia\Model\Lang as ChildLang;
|
use Thelia\Model\Lang as ChildLang;
|
||||||
use Thelia\Model\LangQuery as ChildLangQuery;
|
use Thelia\Model\LangQuery as ChildLangQuery;
|
||||||
|
use Thelia\Model\Order as ChildOrder;
|
||||||
|
use Thelia\Model\OrderQuery as ChildOrderQuery;
|
||||||
use Thelia\Model\Map\LangTableMap;
|
use Thelia\Model\Map\LangTableMap;
|
||||||
|
|
||||||
abstract class Lang implements ActiveRecordInterface
|
abstract class Lang implements ActiveRecordInterface
|
||||||
@@ -144,6 +147,12 @@ abstract class Lang implements ActiveRecordInterface
|
|||||||
*/
|
*/
|
||||||
protected $updated_at;
|
protected $updated_at;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var ObjectCollection|ChildOrder[] Collection to store aggregation of ChildOrder objects.
|
||||||
|
*/
|
||||||
|
protected $collOrders;
|
||||||
|
protected $collOrdersPartial;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flag to prevent endless save loop, if this object is referenced
|
* Flag to prevent endless save loop, if this object is referenced
|
||||||
* by another object which falls in this transaction.
|
* by another object which falls in this transaction.
|
||||||
@@ -152,6 +161,12 @@ abstract class Lang implements ActiveRecordInterface
|
|||||||
*/
|
*/
|
||||||
protected $alreadyInSave = false;
|
protected $alreadyInSave = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An array of objects scheduled for deletion.
|
||||||
|
* @var ObjectCollection
|
||||||
|
*/
|
||||||
|
protected $ordersScheduledForDeletion = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes internal state of Thelia\Model\Base\Lang object.
|
* Initializes internal state of Thelia\Model\Base\Lang object.
|
||||||
*/
|
*/
|
||||||
@@ -1060,6 +1075,8 @@ abstract class Lang implements ActiveRecordInterface
|
|||||||
|
|
||||||
if ($deep) { // also de-associate any related objects?
|
if ($deep) { // also de-associate any related objects?
|
||||||
|
|
||||||
|
$this->collOrders = null;
|
||||||
|
|
||||||
} // if (deep)
|
} // if (deep)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1193,6 +1210,23 @@ abstract class Lang implements ActiveRecordInterface
|
|||||||
$this->resetModified();
|
$this->resetModified();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($this->ordersScheduledForDeletion !== null) {
|
||||||
|
if (!$this->ordersScheduledForDeletion->isEmpty()) {
|
||||||
|
\Thelia\Model\OrderQuery::create()
|
||||||
|
->filterByPrimaryKeys($this->ordersScheduledForDeletion->getPrimaryKeys(false))
|
||||||
|
->delete($con);
|
||||||
|
$this->ordersScheduledForDeletion = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->collOrders !== null) {
|
||||||
|
foreach ($this->collOrders as $referrerFK) {
|
||||||
|
if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) {
|
||||||
|
$affectedRows += $referrerFK->save($con);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$this->alreadyInSave = false;
|
$this->alreadyInSave = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1444,10 +1478,11 @@ abstract class Lang implements ActiveRecordInterface
|
|||||||
* Defaults to TableMap::TYPE_PHPNAME.
|
* Defaults to TableMap::TYPE_PHPNAME.
|
||||||
* @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE.
|
* @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE.
|
||||||
* @param array $alreadyDumpedObjects List of objects to skip to avoid recursion
|
* @param array $alreadyDumpedObjects List of objects to skip to avoid recursion
|
||||||
|
* @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE.
|
||||||
*
|
*
|
||||||
* @return array an associative array containing the field names (as keys) and field values
|
* @return array an associative array containing the field names (as keys) and field values
|
||||||
*/
|
*/
|
||||||
public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array())
|
public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false)
|
||||||
{
|
{
|
||||||
if (isset($alreadyDumpedObjects['Lang'][$this->getPrimaryKey()])) {
|
if (isset($alreadyDumpedObjects['Lang'][$this->getPrimaryKey()])) {
|
||||||
return '*RECURSION*';
|
return '*RECURSION*';
|
||||||
@@ -1477,6 +1512,11 @@ abstract class Lang implements ActiveRecordInterface
|
|||||||
$result[$key] = $virtualColumn;
|
$result[$key] = $virtualColumn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($includeForeignObjects) {
|
||||||
|
if (null !== $this->collOrders) {
|
||||||
|
$result['Orders'] = $this->collOrders->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
@@ -1697,6 +1737,20 @@ abstract class Lang implements ActiveRecordInterface
|
|||||||
$copyObj->setPosition($this->getPosition());
|
$copyObj->setPosition($this->getPosition());
|
||||||
$copyObj->setCreatedAt($this->getCreatedAt());
|
$copyObj->setCreatedAt($this->getCreatedAt());
|
||||||
$copyObj->setUpdatedAt($this->getUpdatedAt());
|
$copyObj->setUpdatedAt($this->getUpdatedAt());
|
||||||
|
|
||||||
|
if ($deepCopy) {
|
||||||
|
// important: temporarily setNew(false) because this affects the behavior of
|
||||||
|
// the getter/setter methods for fkey referrer objects.
|
||||||
|
$copyObj->setNew(false);
|
||||||
|
|
||||||
|
foreach ($this->getOrders() as $relObj) {
|
||||||
|
if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
|
||||||
|
$copyObj->addOrder($relObj->copy($deepCopy));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} // if ($deepCopy)
|
||||||
|
|
||||||
if ($makeNew) {
|
if ($makeNew) {
|
||||||
$copyObj->setNew(true);
|
$copyObj->setNew(true);
|
||||||
$copyObj->setId(NULL); // this is a auto-increment column, so set to default value
|
$copyObj->setId(NULL); // this is a auto-increment column, so set to default value
|
||||||
@@ -1725,6 +1779,415 @@ abstract class Lang implements ActiveRecordInterface
|
|||||||
return $copyObj;
|
return $copyObj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initializes a collection based on the name of a relation.
|
||||||
|
* Avoids crafting an 'init[$relationName]s' method name
|
||||||
|
* that wouldn't work when StandardEnglishPluralizer is used.
|
||||||
|
*
|
||||||
|
* @param string $relationName The name of the relation to initialize
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function initRelation($relationName)
|
||||||
|
{
|
||||||
|
if ('Order' == $relationName) {
|
||||||
|
return $this->initOrders();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clears out the collOrders collection
|
||||||
|
*
|
||||||
|
* This does not modify the database; however, it will remove any associated objects, causing
|
||||||
|
* them to be refetched by subsequent calls to accessor method.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
* @see addOrders()
|
||||||
|
*/
|
||||||
|
public function clearOrders()
|
||||||
|
{
|
||||||
|
$this->collOrders = null; // important to set this to NULL since that means it is uninitialized
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reset is the collOrders collection loaded partially.
|
||||||
|
*/
|
||||||
|
public function resetPartialOrders($v = true)
|
||||||
|
{
|
||||||
|
$this->collOrdersPartial = $v;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initializes the collOrders collection.
|
||||||
|
*
|
||||||
|
* By default this just sets the collOrders collection to an empty array (like clearcollOrders());
|
||||||
|
* however, you may wish to override this method in your stub class to provide setting appropriate
|
||||||
|
* to your application -- for example, setting the initial array to the values stored in database.
|
||||||
|
*
|
||||||
|
* @param boolean $overrideExisting If set to true, the method call initializes
|
||||||
|
* the collection even if it is not empty
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function initOrders($overrideExisting = true)
|
||||||
|
{
|
||||||
|
if (null !== $this->collOrders && !$overrideExisting) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$this->collOrders = new ObjectCollection();
|
||||||
|
$this->collOrders->setModel('\Thelia\Model\Order');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets an array of ChildOrder objects which contain a foreign key that references this object.
|
||||||
|
*
|
||||||
|
* If the $criteria is not null, it is used to always fetch the results from the database.
|
||||||
|
* Otherwise the results are fetched from the database the first time, then cached.
|
||||||
|
* Next time the same method is called without $criteria, the cached collection is returned.
|
||||||
|
* If this ChildLang is new, it will return
|
||||||
|
* an empty collection or the current collection; the criteria is ignored on a new object.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||||
|
* @param ConnectionInterface $con optional connection object
|
||||||
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
|
* @throws PropelException
|
||||||
|
*/
|
||||||
|
public function getOrders($criteria = null, ConnectionInterface $con = null)
|
||||||
|
{
|
||||||
|
$partial = $this->collOrdersPartial && !$this->isNew();
|
||||||
|
if (null === $this->collOrders || null !== $criteria || $partial) {
|
||||||
|
if ($this->isNew() && null === $this->collOrders) {
|
||||||
|
// return empty collection
|
||||||
|
$this->initOrders();
|
||||||
|
} else {
|
||||||
|
$collOrders = ChildOrderQuery::create(null, $criteria)
|
||||||
|
->filterByLang($this)
|
||||||
|
->find($con);
|
||||||
|
|
||||||
|
if (null !== $criteria) {
|
||||||
|
if (false !== $this->collOrdersPartial && count($collOrders)) {
|
||||||
|
$this->initOrders(false);
|
||||||
|
|
||||||
|
foreach ($collOrders as $obj) {
|
||||||
|
if (false == $this->collOrders->contains($obj)) {
|
||||||
|
$this->collOrders->append($obj);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->collOrdersPartial = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
$collOrders->getInternalIterator()->rewind();
|
||||||
|
|
||||||
|
return $collOrders;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($partial && $this->collOrders) {
|
||||||
|
foreach ($this->collOrders as $obj) {
|
||||||
|
if ($obj->isNew()) {
|
||||||
|
$collOrders[] = $obj;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->collOrders = $collOrders;
|
||||||
|
$this->collOrdersPartial = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->collOrders;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets a collection of Order objects related by a one-to-many relationship
|
||||||
|
* to the current object.
|
||||||
|
* It will also schedule objects for deletion based on a diff between old objects (aka persisted)
|
||||||
|
* and new objects from the given Propel collection.
|
||||||
|
*
|
||||||
|
* @param Collection $orders A Propel collection.
|
||||||
|
* @param ConnectionInterface $con Optional connection object
|
||||||
|
* @return ChildLang The current object (for fluent API support)
|
||||||
|
*/
|
||||||
|
public function setOrders(Collection $orders, ConnectionInterface $con = null)
|
||||||
|
{
|
||||||
|
$ordersToDelete = $this->getOrders(new Criteria(), $con)->diff($orders);
|
||||||
|
|
||||||
|
|
||||||
|
$this->ordersScheduledForDeletion = $ordersToDelete;
|
||||||
|
|
||||||
|
foreach ($ordersToDelete as $orderRemoved) {
|
||||||
|
$orderRemoved->setLang(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->collOrders = null;
|
||||||
|
foreach ($orders as $order) {
|
||||||
|
$this->addOrder($order);
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->collOrders = $orders;
|
||||||
|
$this->collOrdersPartial = false;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the number of related Order objects.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria
|
||||||
|
* @param boolean $distinct
|
||||||
|
* @param ConnectionInterface $con
|
||||||
|
* @return int Count of related Order objects.
|
||||||
|
* @throws PropelException
|
||||||
|
*/
|
||||||
|
public function countOrders(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
|
||||||
|
{
|
||||||
|
$partial = $this->collOrdersPartial && !$this->isNew();
|
||||||
|
if (null === $this->collOrders || null !== $criteria || $partial) {
|
||||||
|
if ($this->isNew() && null === $this->collOrders) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($partial && !$criteria) {
|
||||||
|
return count($this->getOrders());
|
||||||
|
}
|
||||||
|
|
||||||
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
|
if ($distinct) {
|
||||||
|
$query->distinct();
|
||||||
|
}
|
||||||
|
|
||||||
|
return $query
|
||||||
|
->filterByLang($this)
|
||||||
|
->count($con);
|
||||||
|
}
|
||||||
|
|
||||||
|
return count($this->collOrders);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method called to associate a ChildOrder object to this object
|
||||||
|
* through the ChildOrder foreign key attribute.
|
||||||
|
*
|
||||||
|
* @param ChildOrder $l ChildOrder
|
||||||
|
* @return \Thelia\Model\Lang The current object (for fluent API support)
|
||||||
|
*/
|
||||||
|
public function addOrder(ChildOrder $l)
|
||||||
|
{
|
||||||
|
if ($this->collOrders === null) {
|
||||||
|
$this->initOrders();
|
||||||
|
$this->collOrdersPartial = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!in_array($l, $this->collOrders->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
|
||||||
|
$this->doAddOrder($l);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Order $order The order object to add.
|
||||||
|
*/
|
||||||
|
protected function doAddOrder($order)
|
||||||
|
{
|
||||||
|
$this->collOrders[]= $order;
|
||||||
|
$order->setLang($this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Order $order The order object to remove.
|
||||||
|
* @return ChildLang The current object (for fluent API support)
|
||||||
|
*/
|
||||||
|
public function removeOrder($order)
|
||||||
|
{
|
||||||
|
if ($this->getOrders()->contains($order)) {
|
||||||
|
$this->collOrders->remove($this->collOrders->search($order));
|
||||||
|
if (null === $this->ordersScheduledForDeletion) {
|
||||||
|
$this->ordersScheduledForDeletion = clone $this->collOrders;
|
||||||
|
$this->ordersScheduledForDeletion->clear();
|
||||||
|
}
|
||||||
|
$this->ordersScheduledForDeletion[]= clone $order;
|
||||||
|
$order->setLang(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If this collection has already been initialized with
|
||||||
|
* an identical criteria, it returns the collection.
|
||||||
|
* Otherwise if this Lang is new, it will return
|
||||||
|
* an empty collection; or if this Lang has previously
|
||||||
|
* been saved, it will retrieve related Orders from storage.
|
||||||
|
*
|
||||||
|
* This method is protected by default in order to keep the public
|
||||||
|
* api reasonable. You can provide public methods for those you
|
||||||
|
* actually need in Lang.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||||
|
* @param ConnectionInterface $con optional connection object
|
||||||
|
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||||
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
|
*/
|
||||||
|
public function getOrdersJoinCurrency($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
||||||
|
{
|
||||||
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
|
$query->joinWith('Currency', $joinBehavior);
|
||||||
|
|
||||||
|
return $this->getOrders($query, $con);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If this collection has already been initialized with
|
||||||
|
* an identical criteria, it returns the collection.
|
||||||
|
* Otherwise if this Lang is new, it will return
|
||||||
|
* an empty collection; or if this Lang has previously
|
||||||
|
* been saved, it will retrieve related Orders from storage.
|
||||||
|
*
|
||||||
|
* This method is protected by default in order to keep the public
|
||||||
|
* api reasonable. You can provide public methods for those you
|
||||||
|
* actually need in Lang.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||||
|
* @param ConnectionInterface $con optional connection object
|
||||||
|
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||||
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
|
*/
|
||||||
|
public function getOrdersJoinCustomer($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
||||||
|
{
|
||||||
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
|
$query->joinWith('Customer', $joinBehavior);
|
||||||
|
|
||||||
|
return $this->getOrders($query, $con);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If this collection has already been initialized with
|
||||||
|
* an identical criteria, it returns the collection.
|
||||||
|
* Otherwise if this Lang is new, it will return
|
||||||
|
* an empty collection; or if this Lang has previously
|
||||||
|
* been saved, it will retrieve related Orders from storage.
|
||||||
|
*
|
||||||
|
* This method is protected by default in order to keep the public
|
||||||
|
* api reasonable. You can provide public methods for those you
|
||||||
|
* actually need in Lang.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||||
|
* @param ConnectionInterface $con optional connection object
|
||||||
|
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||||
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
|
*/
|
||||||
|
public function getOrdersJoinOrderAddressRelatedByInvoiceOrderAddressId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
||||||
|
{
|
||||||
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
|
$query->joinWith('OrderAddressRelatedByInvoiceOrderAddressId', $joinBehavior);
|
||||||
|
|
||||||
|
return $this->getOrders($query, $con);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If this collection has already been initialized with
|
||||||
|
* an identical criteria, it returns the collection.
|
||||||
|
* Otherwise if this Lang is new, it will return
|
||||||
|
* an empty collection; or if this Lang has previously
|
||||||
|
* been saved, it will retrieve related Orders from storage.
|
||||||
|
*
|
||||||
|
* This method is protected by default in order to keep the public
|
||||||
|
* api reasonable. You can provide public methods for those you
|
||||||
|
* actually need in Lang.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||||
|
* @param ConnectionInterface $con optional connection object
|
||||||
|
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||||
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
|
*/
|
||||||
|
public function getOrdersJoinOrderAddressRelatedByDeliveryOrderAddressId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
||||||
|
{
|
||||||
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
|
$query->joinWith('OrderAddressRelatedByDeliveryOrderAddressId', $joinBehavior);
|
||||||
|
|
||||||
|
return $this->getOrders($query, $con);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If this collection has already been initialized with
|
||||||
|
* an identical criteria, it returns the collection.
|
||||||
|
* Otherwise if this Lang is new, it will return
|
||||||
|
* an empty collection; or if this Lang has previously
|
||||||
|
* been saved, it will retrieve related Orders from storage.
|
||||||
|
*
|
||||||
|
* This method is protected by default in order to keep the public
|
||||||
|
* api reasonable. You can provide public methods for those you
|
||||||
|
* actually need in Lang.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||||
|
* @param ConnectionInterface $con optional connection object
|
||||||
|
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||||
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
|
*/
|
||||||
|
public function getOrdersJoinOrderStatus($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
||||||
|
{
|
||||||
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
|
$query->joinWith('OrderStatus', $joinBehavior);
|
||||||
|
|
||||||
|
return $this->getOrders($query, $con);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If this collection has already been initialized with
|
||||||
|
* an identical criteria, it returns the collection.
|
||||||
|
* Otherwise if this Lang is new, it will return
|
||||||
|
* an empty collection; or if this Lang has previously
|
||||||
|
* been saved, it will retrieve related Orders from storage.
|
||||||
|
*
|
||||||
|
* This method is protected by default in order to keep the public
|
||||||
|
* api reasonable. You can provide public methods for those you
|
||||||
|
* actually need in Lang.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||||
|
* @param ConnectionInterface $con optional connection object
|
||||||
|
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||||
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
|
*/
|
||||||
|
public function getOrdersJoinModuleRelatedByPaymentModuleId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
||||||
|
{
|
||||||
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
|
$query->joinWith('ModuleRelatedByPaymentModuleId', $joinBehavior);
|
||||||
|
|
||||||
|
return $this->getOrders($query, $con);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If this collection has already been initialized with
|
||||||
|
* an identical criteria, it returns the collection.
|
||||||
|
* Otherwise if this Lang is new, it will return
|
||||||
|
* an empty collection; or if this Lang has previously
|
||||||
|
* been saved, it will retrieve related Orders from storage.
|
||||||
|
*
|
||||||
|
* This method is protected by default in order to keep the public
|
||||||
|
* api reasonable. You can provide public methods for those you
|
||||||
|
* actually need in Lang.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||||
|
* @param ConnectionInterface $con optional connection object
|
||||||
|
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||||
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
|
*/
|
||||||
|
public function getOrdersJoinModuleRelatedByDeliveryModuleId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
||||||
|
{
|
||||||
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
|
$query->joinWith('ModuleRelatedByDeliveryModuleId', $joinBehavior);
|
||||||
|
|
||||||
|
return $this->getOrders($query, $con);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clears the current object and sets all attributes to their default values
|
* Clears the current object and sets all attributes to their default values
|
||||||
*/
|
*/
|
||||||
@@ -1764,8 +2227,17 @@ abstract class Lang implements ActiveRecordInterface
|
|||||||
public function clearAllReferences($deep = false)
|
public function clearAllReferences($deep = false)
|
||||||
{
|
{
|
||||||
if ($deep) {
|
if ($deep) {
|
||||||
|
if ($this->collOrders) {
|
||||||
|
foreach ($this->collOrders as $o) {
|
||||||
|
$o->clearAllReferences($deep);
|
||||||
|
}
|
||||||
|
}
|
||||||
} // if ($deep)
|
} // if ($deep)
|
||||||
|
|
||||||
|
if ($this->collOrders instanceof Collection) {
|
||||||
|
$this->collOrders->clearIterator();
|
||||||
|
}
|
||||||
|
$this->collOrders = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -7,6 +7,9 @@ use \PDO;
|
|||||||
use Propel\Runtime\Propel;
|
use Propel\Runtime\Propel;
|
||||||
use Propel\Runtime\ActiveQuery\Criteria;
|
use Propel\Runtime\ActiveQuery\Criteria;
|
||||||
use Propel\Runtime\ActiveQuery\ModelCriteria;
|
use Propel\Runtime\ActiveQuery\ModelCriteria;
|
||||||
|
use Propel\Runtime\ActiveQuery\ModelJoin;
|
||||||
|
use Propel\Runtime\Collection\Collection;
|
||||||
|
use Propel\Runtime\Collection\ObjectCollection;
|
||||||
use Propel\Runtime\Connection\ConnectionInterface;
|
use Propel\Runtime\Connection\ConnectionInterface;
|
||||||
use Propel\Runtime\Exception\PropelException;
|
use Propel\Runtime\Exception\PropelException;
|
||||||
use Thelia\Model\Lang as ChildLang;
|
use Thelia\Model\Lang as ChildLang;
|
||||||
@@ -54,6 +57,10 @@ use Thelia\Model\Map\LangTableMap;
|
|||||||
* @method ChildLangQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
* @method ChildLangQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
||||||
* @method ChildLangQuery innerJoin($relation) Adds a INNER JOIN clause to the query
|
* @method ChildLangQuery innerJoin($relation) Adds a INNER JOIN clause to the query
|
||||||
*
|
*
|
||||||
|
* @method ChildLangQuery leftJoinOrder($relationAlias = null) Adds a LEFT JOIN clause to the query using the Order relation
|
||||||
|
* @method ChildLangQuery rightJoinOrder($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Order relation
|
||||||
|
* @method ChildLangQuery innerJoinOrder($relationAlias = null) Adds a INNER JOIN clause to the query using the Order relation
|
||||||
|
*
|
||||||
* @method ChildLang findOne(ConnectionInterface $con = null) Return the first ChildLang matching the query
|
* @method ChildLang findOne(ConnectionInterface $con = null) Return the first ChildLang matching the query
|
||||||
* @method ChildLang findOneOrCreate(ConnectionInterface $con = null) Return the first ChildLang matching the query, or a new ChildLang object populated from the query conditions when no match is found
|
* @method ChildLang findOneOrCreate(ConnectionInterface $con = null) Return the first ChildLang matching the query, or a new ChildLang object populated from the query conditions when no match is found
|
||||||
*
|
*
|
||||||
@@ -764,6 +771,79 @@ abstract class LangQuery extends ModelCriteria
|
|||||||
return $this->addUsingAlias(LangTableMap::UPDATED_AT, $updatedAt, $comparison);
|
return $this->addUsingAlias(LangTableMap::UPDATED_AT, $updatedAt, $comparison);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query by a related \Thelia\Model\Order object
|
||||||
|
*
|
||||||
|
* @param \Thelia\Model\Order|ObjectCollection $order the related object to use as filter
|
||||||
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
|
*
|
||||||
|
* @return ChildLangQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByOrder($order, $comparison = null)
|
||||||
|
{
|
||||||
|
if ($order instanceof \Thelia\Model\Order) {
|
||||||
|
return $this
|
||||||
|
->addUsingAlias(LangTableMap::ID, $order->getLangId(), $comparison);
|
||||||
|
} elseif ($order instanceof ObjectCollection) {
|
||||||
|
return $this
|
||||||
|
->useOrderQuery()
|
||||||
|
->filterByPrimaryKeys($order->getPrimaryKeys())
|
||||||
|
->endUse();
|
||||||
|
} else {
|
||||||
|
throw new PropelException('filterByOrder() only accepts arguments of type \Thelia\Model\Order or Collection');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a JOIN clause to the query using the Order relation
|
||||||
|
*
|
||||||
|
* @param string $relationAlias optional alias for the relation
|
||||||
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||||
|
*
|
||||||
|
* @return ChildLangQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function joinOrder($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||||
|
{
|
||||||
|
$tableMap = $this->getTableMap();
|
||||||
|
$relationMap = $tableMap->getRelation('Order');
|
||||||
|
|
||||||
|
// create a ModelJoin object for this join
|
||||||
|
$join = new ModelJoin();
|
||||||
|
$join->setJoinType($joinType);
|
||||||
|
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
|
||||||
|
if ($previousJoin = $this->getPreviousJoin()) {
|
||||||
|
$join->setPreviousJoin($previousJoin);
|
||||||
|
}
|
||||||
|
|
||||||
|
// add the ModelJoin to the current object
|
||||||
|
if ($relationAlias) {
|
||||||
|
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||||
|
$this->addJoinObject($join, $relationAlias);
|
||||||
|
} else {
|
||||||
|
$this->addJoinObject($join, 'Order');
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use the Order relation Order object
|
||||||
|
*
|
||||||
|
* @see useQuery()
|
||||||
|
*
|
||||||
|
* @param string $relationAlias optional alias for the relation,
|
||||||
|
* to be used as main alias in the secondary query
|
||||||
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||||
|
*
|
||||||
|
* @return \Thelia\Model\OrderQuery A secondary query class using the current class as primary query
|
||||||
|
*/
|
||||||
|
public function useOrderQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||||
|
{
|
||||||
|
return $this
|
||||||
|
->joinOrder($relationAlias, $joinType)
|
||||||
|
->useQuery($relationAlias ? $relationAlias : 'Order', '\Thelia\Model\OrderQuery');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Exclude object from result
|
* Exclude object from result
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ use Thelia\Model\Module as ChildModule;
|
|||||||
use Thelia\Model\ModuleI18n as ChildModuleI18n;
|
use Thelia\Model\ModuleI18n as ChildModuleI18n;
|
||||||
use Thelia\Model\ModuleI18nQuery as ChildModuleI18nQuery;
|
use Thelia\Model\ModuleI18nQuery as ChildModuleI18nQuery;
|
||||||
use Thelia\Model\ModuleQuery as ChildModuleQuery;
|
use Thelia\Model\ModuleQuery as ChildModuleQuery;
|
||||||
|
use Thelia\Model\Order as ChildOrder;
|
||||||
|
use Thelia\Model\OrderQuery as ChildOrderQuery;
|
||||||
use Thelia\Model\Map\ModuleTableMap;
|
use Thelia\Model\Map\ModuleTableMap;
|
||||||
|
|
||||||
abstract class Module implements ActiveRecordInterface
|
abstract class Module implements ActiveRecordInterface
|
||||||
@@ -107,6 +109,18 @@ abstract class Module implements ActiveRecordInterface
|
|||||||
*/
|
*/
|
||||||
protected $updated_at;
|
protected $updated_at;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var ObjectCollection|ChildOrder[] Collection to store aggregation of ChildOrder objects.
|
||||||
|
*/
|
||||||
|
protected $collOrdersRelatedByPaymentModuleId;
|
||||||
|
protected $collOrdersRelatedByPaymentModuleIdPartial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var ObjectCollection|ChildOrder[] Collection to store aggregation of ChildOrder objects.
|
||||||
|
*/
|
||||||
|
protected $collOrdersRelatedByDeliveryModuleId;
|
||||||
|
protected $collOrdersRelatedByDeliveryModuleIdPartial;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var ObjectCollection|ChildGroupModule[] Collection to store aggregation of ChildGroupModule objects.
|
* @var ObjectCollection|ChildGroupModule[] Collection to store aggregation of ChildGroupModule objects.
|
||||||
*/
|
*/
|
||||||
@@ -141,6 +155,18 @@ abstract class Module implements ActiveRecordInterface
|
|||||||
*/
|
*/
|
||||||
protected $currentTranslations;
|
protected $currentTranslations;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An array of objects scheduled for deletion.
|
||||||
|
* @var ObjectCollection
|
||||||
|
*/
|
||||||
|
protected $ordersRelatedByPaymentModuleIdScheduledForDeletion = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An array of objects scheduled for deletion.
|
||||||
|
* @var ObjectCollection
|
||||||
|
*/
|
||||||
|
protected $ordersRelatedByDeliveryModuleIdScheduledForDeletion = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An array of objects scheduled for deletion.
|
* An array of objects scheduled for deletion.
|
||||||
* @var ObjectCollection
|
* @var ObjectCollection
|
||||||
@@ -816,6 +842,10 @@ abstract class Module implements ActiveRecordInterface
|
|||||||
|
|
||||||
if ($deep) { // also de-associate any related objects?
|
if ($deep) { // also de-associate any related objects?
|
||||||
|
|
||||||
|
$this->collOrdersRelatedByPaymentModuleId = null;
|
||||||
|
|
||||||
|
$this->collOrdersRelatedByDeliveryModuleId = null;
|
||||||
|
|
||||||
$this->collGroupModules = null;
|
$this->collGroupModules = null;
|
||||||
|
|
||||||
$this->collModuleI18ns = null;
|
$this->collModuleI18ns = null;
|
||||||
@@ -953,6 +983,40 @@ abstract class Module implements ActiveRecordInterface
|
|||||||
$this->resetModified();
|
$this->resetModified();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($this->ordersRelatedByPaymentModuleIdScheduledForDeletion !== null) {
|
||||||
|
if (!$this->ordersRelatedByPaymentModuleIdScheduledForDeletion->isEmpty()) {
|
||||||
|
\Thelia\Model\OrderQuery::create()
|
||||||
|
->filterByPrimaryKeys($this->ordersRelatedByPaymentModuleIdScheduledForDeletion->getPrimaryKeys(false))
|
||||||
|
->delete($con);
|
||||||
|
$this->ordersRelatedByPaymentModuleIdScheduledForDeletion = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->collOrdersRelatedByPaymentModuleId !== null) {
|
||||||
|
foreach ($this->collOrdersRelatedByPaymentModuleId as $referrerFK) {
|
||||||
|
if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) {
|
||||||
|
$affectedRows += $referrerFK->save($con);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->ordersRelatedByDeliveryModuleIdScheduledForDeletion !== null) {
|
||||||
|
if (!$this->ordersRelatedByDeliveryModuleIdScheduledForDeletion->isEmpty()) {
|
||||||
|
\Thelia\Model\OrderQuery::create()
|
||||||
|
->filterByPrimaryKeys($this->ordersRelatedByDeliveryModuleIdScheduledForDeletion->getPrimaryKeys(false))
|
||||||
|
->delete($con);
|
||||||
|
$this->ordersRelatedByDeliveryModuleIdScheduledForDeletion = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->collOrdersRelatedByDeliveryModuleId !== null) {
|
||||||
|
foreach ($this->collOrdersRelatedByDeliveryModuleId as $referrerFK) {
|
||||||
|
if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) {
|
||||||
|
$affectedRows += $referrerFK->save($con);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($this->groupModulesScheduledForDeletion !== null) {
|
if ($this->groupModulesScheduledForDeletion !== null) {
|
||||||
if (!$this->groupModulesScheduledForDeletion->isEmpty()) {
|
if (!$this->groupModulesScheduledForDeletion->isEmpty()) {
|
||||||
\Thelia\Model\GroupModuleQuery::create()
|
\Thelia\Model\GroupModuleQuery::create()
|
||||||
@@ -1203,6 +1267,12 @@ abstract class Module implements ActiveRecordInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($includeForeignObjects) {
|
if ($includeForeignObjects) {
|
||||||
|
if (null !== $this->collOrdersRelatedByPaymentModuleId) {
|
||||||
|
$result['OrdersRelatedByPaymentModuleId'] = $this->collOrdersRelatedByPaymentModuleId->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
|
||||||
|
}
|
||||||
|
if (null !== $this->collOrdersRelatedByDeliveryModuleId) {
|
||||||
|
$result['OrdersRelatedByDeliveryModuleId'] = $this->collOrdersRelatedByDeliveryModuleId->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
|
||||||
|
}
|
||||||
if (null !== $this->collGroupModules) {
|
if (null !== $this->collGroupModules) {
|
||||||
$result['GroupModules'] = $this->collGroupModules->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
|
$result['GroupModules'] = $this->collGroupModules->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
|
||||||
}
|
}
|
||||||
@@ -1394,6 +1464,18 @@ abstract class Module implements ActiveRecordInterface
|
|||||||
// the getter/setter methods for fkey referrer objects.
|
// the getter/setter methods for fkey referrer objects.
|
||||||
$copyObj->setNew(false);
|
$copyObj->setNew(false);
|
||||||
|
|
||||||
|
foreach ($this->getOrdersRelatedByPaymentModuleId() as $relObj) {
|
||||||
|
if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
|
||||||
|
$copyObj->addOrderRelatedByPaymentModuleId($relObj->copy($deepCopy));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($this->getOrdersRelatedByDeliveryModuleId() as $relObj) {
|
||||||
|
if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
|
||||||
|
$copyObj->addOrderRelatedByDeliveryModuleId($relObj->copy($deepCopy));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($this->getGroupModules() as $relObj) {
|
foreach ($this->getGroupModules() as $relObj) {
|
||||||
if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
|
if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
|
||||||
$copyObj->addGroupModule($relObj->copy($deepCopy));
|
$copyObj->addGroupModule($relObj->copy($deepCopy));
|
||||||
@@ -1447,6 +1529,12 @@ abstract class Module implements ActiveRecordInterface
|
|||||||
*/
|
*/
|
||||||
public function initRelation($relationName)
|
public function initRelation($relationName)
|
||||||
{
|
{
|
||||||
|
if ('OrderRelatedByPaymentModuleId' == $relationName) {
|
||||||
|
return $this->initOrdersRelatedByPaymentModuleId();
|
||||||
|
}
|
||||||
|
if ('OrderRelatedByDeliveryModuleId' == $relationName) {
|
||||||
|
return $this->initOrdersRelatedByDeliveryModuleId();
|
||||||
|
}
|
||||||
if ('GroupModule' == $relationName) {
|
if ('GroupModule' == $relationName) {
|
||||||
return $this->initGroupModules();
|
return $this->initGroupModules();
|
||||||
}
|
}
|
||||||
@@ -1455,6 +1543,742 @@ abstract class Module implements ActiveRecordInterface
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clears out the collOrdersRelatedByPaymentModuleId collection
|
||||||
|
*
|
||||||
|
* This does not modify the database; however, it will remove any associated objects, causing
|
||||||
|
* them to be refetched by subsequent calls to accessor method.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
* @see addOrdersRelatedByPaymentModuleId()
|
||||||
|
*/
|
||||||
|
public function clearOrdersRelatedByPaymentModuleId()
|
||||||
|
{
|
||||||
|
$this->collOrdersRelatedByPaymentModuleId = null; // important to set this to NULL since that means it is uninitialized
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reset is the collOrdersRelatedByPaymentModuleId collection loaded partially.
|
||||||
|
*/
|
||||||
|
public function resetPartialOrdersRelatedByPaymentModuleId($v = true)
|
||||||
|
{
|
||||||
|
$this->collOrdersRelatedByPaymentModuleIdPartial = $v;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initializes the collOrdersRelatedByPaymentModuleId collection.
|
||||||
|
*
|
||||||
|
* By default this just sets the collOrdersRelatedByPaymentModuleId collection to an empty array (like clearcollOrdersRelatedByPaymentModuleId());
|
||||||
|
* however, you may wish to override this method in your stub class to provide setting appropriate
|
||||||
|
* to your application -- for example, setting the initial array to the values stored in database.
|
||||||
|
*
|
||||||
|
* @param boolean $overrideExisting If set to true, the method call initializes
|
||||||
|
* the collection even if it is not empty
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function initOrdersRelatedByPaymentModuleId($overrideExisting = true)
|
||||||
|
{
|
||||||
|
if (null !== $this->collOrdersRelatedByPaymentModuleId && !$overrideExisting) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$this->collOrdersRelatedByPaymentModuleId = new ObjectCollection();
|
||||||
|
$this->collOrdersRelatedByPaymentModuleId->setModel('\Thelia\Model\Order');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets an array of ChildOrder objects which contain a foreign key that references this object.
|
||||||
|
*
|
||||||
|
* If the $criteria is not null, it is used to always fetch the results from the database.
|
||||||
|
* Otherwise the results are fetched from the database the first time, then cached.
|
||||||
|
* Next time the same method is called without $criteria, the cached collection is returned.
|
||||||
|
* If this ChildModule is new, it will return
|
||||||
|
* an empty collection or the current collection; the criteria is ignored on a new object.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||||
|
* @param ConnectionInterface $con optional connection object
|
||||||
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
|
* @throws PropelException
|
||||||
|
*/
|
||||||
|
public function getOrdersRelatedByPaymentModuleId($criteria = null, ConnectionInterface $con = null)
|
||||||
|
{
|
||||||
|
$partial = $this->collOrdersRelatedByPaymentModuleIdPartial && !$this->isNew();
|
||||||
|
if (null === $this->collOrdersRelatedByPaymentModuleId || null !== $criteria || $partial) {
|
||||||
|
if ($this->isNew() && null === $this->collOrdersRelatedByPaymentModuleId) {
|
||||||
|
// return empty collection
|
||||||
|
$this->initOrdersRelatedByPaymentModuleId();
|
||||||
|
} else {
|
||||||
|
$collOrdersRelatedByPaymentModuleId = ChildOrderQuery::create(null, $criteria)
|
||||||
|
->filterByModuleRelatedByPaymentModuleId($this)
|
||||||
|
->find($con);
|
||||||
|
|
||||||
|
if (null !== $criteria) {
|
||||||
|
if (false !== $this->collOrdersRelatedByPaymentModuleIdPartial && count($collOrdersRelatedByPaymentModuleId)) {
|
||||||
|
$this->initOrdersRelatedByPaymentModuleId(false);
|
||||||
|
|
||||||
|
foreach ($collOrdersRelatedByPaymentModuleId as $obj) {
|
||||||
|
if (false == $this->collOrdersRelatedByPaymentModuleId->contains($obj)) {
|
||||||
|
$this->collOrdersRelatedByPaymentModuleId->append($obj);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->collOrdersRelatedByPaymentModuleIdPartial = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
$collOrdersRelatedByPaymentModuleId->getInternalIterator()->rewind();
|
||||||
|
|
||||||
|
return $collOrdersRelatedByPaymentModuleId;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($partial && $this->collOrdersRelatedByPaymentModuleId) {
|
||||||
|
foreach ($this->collOrdersRelatedByPaymentModuleId as $obj) {
|
||||||
|
if ($obj->isNew()) {
|
||||||
|
$collOrdersRelatedByPaymentModuleId[] = $obj;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->collOrdersRelatedByPaymentModuleId = $collOrdersRelatedByPaymentModuleId;
|
||||||
|
$this->collOrdersRelatedByPaymentModuleIdPartial = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->collOrdersRelatedByPaymentModuleId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets a collection of OrderRelatedByPaymentModuleId objects related by a one-to-many relationship
|
||||||
|
* to the current object.
|
||||||
|
* It will also schedule objects for deletion based on a diff between old objects (aka persisted)
|
||||||
|
* and new objects from the given Propel collection.
|
||||||
|
*
|
||||||
|
* @param Collection $ordersRelatedByPaymentModuleId A Propel collection.
|
||||||
|
* @param ConnectionInterface $con Optional connection object
|
||||||
|
* @return ChildModule The current object (for fluent API support)
|
||||||
|
*/
|
||||||
|
public function setOrdersRelatedByPaymentModuleId(Collection $ordersRelatedByPaymentModuleId, ConnectionInterface $con = null)
|
||||||
|
{
|
||||||
|
$ordersRelatedByPaymentModuleIdToDelete = $this->getOrdersRelatedByPaymentModuleId(new Criteria(), $con)->diff($ordersRelatedByPaymentModuleId);
|
||||||
|
|
||||||
|
|
||||||
|
$this->ordersRelatedByPaymentModuleIdScheduledForDeletion = $ordersRelatedByPaymentModuleIdToDelete;
|
||||||
|
|
||||||
|
foreach ($ordersRelatedByPaymentModuleIdToDelete as $orderRelatedByPaymentModuleIdRemoved) {
|
||||||
|
$orderRelatedByPaymentModuleIdRemoved->setModuleRelatedByPaymentModuleId(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->collOrdersRelatedByPaymentModuleId = null;
|
||||||
|
foreach ($ordersRelatedByPaymentModuleId as $orderRelatedByPaymentModuleId) {
|
||||||
|
$this->addOrderRelatedByPaymentModuleId($orderRelatedByPaymentModuleId);
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->collOrdersRelatedByPaymentModuleId = $ordersRelatedByPaymentModuleId;
|
||||||
|
$this->collOrdersRelatedByPaymentModuleIdPartial = false;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the number of related Order objects.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria
|
||||||
|
* @param boolean $distinct
|
||||||
|
* @param ConnectionInterface $con
|
||||||
|
* @return int Count of related Order objects.
|
||||||
|
* @throws PropelException
|
||||||
|
*/
|
||||||
|
public function countOrdersRelatedByPaymentModuleId(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
|
||||||
|
{
|
||||||
|
$partial = $this->collOrdersRelatedByPaymentModuleIdPartial && !$this->isNew();
|
||||||
|
if (null === $this->collOrdersRelatedByPaymentModuleId || null !== $criteria || $partial) {
|
||||||
|
if ($this->isNew() && null === $this->collOrdersRelatedByPaymentModuleId) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($partial && !$criteria) {
|
||||||
|
return count($this->getOrdersRelatedByPaymentModuleId());
|
||||||
|
}
|
||||||
|
|
||||||
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
|
if ($distinct) {
|
||||||
|
$query->distinct();
|
||||||
|
}
|
||||||
|
|
||||||
|
return $query
|
||||||
|
->filterByModuleRelatedByPaymentModuleId($this)
|
||||||
|
->count($con);
|
||||||
|
}
|
||||||
|
|
||||||
|
return count($this->collOrdersRelatedByPaymentModuleId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method called to associate a ChildOrder object to this object
|
||||||
|
* through the ChildOrder foreign key attribute.
|
||||||
|
*
|
||||||
|
* @param ChildOrder $l ChildOrder
|
||||||
|
* @return \Thelia\Model\Module The current object (for fluent API support)
|
||||||
|
*/
|
||||||
|
public function addOrderRelatedByPaymentModuleId(ChildOrder $l)
|
||||||
|
{
|
||||||
|
if ($this->collOrdersRelatedByPaymentModuleId === null) {
|
||||||
|
$this->initOrdersRelatedByPaymentModuleId();
|
||||||
|
$this->collOrdersRelatedByPaymentModuleIdPartial = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!in_array($l, $this->collOrdersRelatedByPaymentModuleId->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
|
||||||
|
$this->doAddOrderRelatedByPaymentModuleId($l);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param OrderRelatedByPaymentModuleId $orderRelatedByPaymentModuleId The orderRelatedByPaymentModuleId object to add.
|
||||||
|
*/
|
||||||
|
protected function doAddOrderRelatedByPaymentModuleId($orderRelatedByPaymentModuleId)
|
||||||
|
{
|
||||||
|
$this->collOrdersRelatedByPaymentModuleId[]= $orderRelatedByPaymentModuleId;
|
||||||
|
$orderRelatedByPaymentModuleId->setModuleRelatedByPaymentModuleId($this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param OrderRelatedByPaymentModuleId $orderRelatedByPaymentModuleId The orderRelatedByPaymentModuleId object to remove.
|
||||||
|
* @return ChildModule The current object (for fluent API support)
|
||||||
|
*/
|
||||||
|
public function removeOrderRelatedByPaymentModuleId($orderRelatedByPaymentModuleId)
|
||||||
|
{
|
||||||
|
if ($this->getOrdersRelatedByPaymentModuleId()->contains($orderRelatedByPaymentModuleId)) {
|
||||||
|
$this->collOrdersRelatedByPaymentModuleId->remove($this->collOrdersRelatedByPaymentModuleId->search($orderRelatedByPaymentModuleId));
|
||||||
|
if (null === $this->ordersRelatedByPaymentModuleIdScheduledForDeletion) {
|
||||||
|
$this->ordersRelatedByPaymentModuleIdScheduledForDeletion = clone $this->collOrdersRelatedByPaymentModuleId;
|
||||||
|
$this->ordersRelatedByPaymentModuleIdScheduledForDeletion->clear();
|
||||||
|
}
|
||||||
|
$this->ordersRelatedByPaymentModuleIdScheduledForDeletion[]= clone $orderRelatedByPaymentModuleId;
|
||||||
|
$orderRelatedByPaymentModuleId->setModuleRelatedByPaymentModuleId(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If this collection has already been initialized with
|
||||||
|
* an identical criteria, it returns the collection.
|
||||||
|
* Otherwise if this Module is new, it will return
|
||||||
|
* an empty collection; or if this Module has previously
|
||||||
|
* been saved, it will retrieve related OrdersRelatedByPaymentModuleId from storage.
|
||||||
|
*
|
||||||
|
* This method is protected by default in order to keep the public
|
||||||
|
* api reasonable. You can provide public methods for those you
|
||||||
|
* actually need in Module.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||||
|
* @param ConnectionInterface $con optional connection object
|
||||||
|
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||||
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
|
*/
|
||||||
|
public function getOrdersRelatedByPaymentModuleIdJoinCurrency($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
||||||
|
{
|
||||||
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
|
$query->joinWith('Currency', $joinBehavior);
|
||||||
|
|
||||||
|
return $this->getOrdersRelatedByPaymentModuleId($query, $con);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If this collection has already been initialized with
|
||||||
|
* an identical criteria, it returns the collection.
|
||||||
|
* Otherwise if this Module is new, it will return
|
||||||
|
* an empty collection; or if this Module has previously
|
||||||
|
* been saved, it will retrieve related OrdersRelatedByPaymentModuleId from storage.
|
||||||
|
*
|
||||||
|
* This method is protected by default in order to keep the public
|
||||||
|
* api reasonable. You can provide public methods for those you
|
||||||
|
* actually need in Module.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||||
|
* @param ConnectionInterface $con optional connection object
|
||||||
|
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||||
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
|
*/
|
||||||
|
public function getOrdersRelatedByPaymentModuleIdJoinCustomer($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
||||||
|
{
|
||||||
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
|
$query->joinWith('Customer', $joinBehavior);
|
||||||
|
|
||||||
|
return $this->getOrdersRelatedByPaymentModuleId($query, $con);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If this collection has already been initialized with
|
||||||
|
* an identical criteria, it returns the collection.
|
||||||
|
* Otherwise if this Module is new, it will return
|
||||||
|
* an empty collection; or if this Module has previously
|
||||||
|
* been saved, it will retrieve related OrdersRelatedByPaymentModuleId from storage.
|
||||||
|
*
|
||||||
|
* This method is protected by default in order to keep the public
|
||||||
|
* api reasonable. You can provide public methods for those you
|
||||||
|
* actually need in Module.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||||
|
* @param ConnectionInterface $con optional connection object
|
||||||
|
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||||
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
|
*/
|
||||||
|
public function getOrdersRelatedByPaymentModuleIdJoinOrderAddressRelatedByInvoiceOrderAddressId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
||||||
|
{
|
||||||
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
|
$query->joinWith('OrderAddressRelatedByInvoiceOrderAddressId', $joinBehavior);
|
||||||
|
|
||||||
|
return $this->getOrdersRelatedByPaymentModuleId($query, $con);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If this collection has already been initialized with
|
||||||
|
* an identical criteria, it returns the collection.
|
||||||
|
* Otherwise if this Module is new, it will return
|
||||||
|
* an empty collection; or if this Module has previously
|
||||||
|
* been saved, it will retrieve related OrdersRelatedByPaymentModuleId from storage.
|
||||||
|
*
|
||||||
|
* This method is protected by default in order to keep the public
|
||||||
|
* api reasonable. You can provide public methods for those you
|
||||||
|
* actually need in Module.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||||
|
* @param ConnectionInterface $con optional connection object
|
||||||
|
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||||
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
|
*/
|
||||||
|
public function getOrdersRelatedByPaymentModuleIdJoinOrderAddressRelatedByDeliveryOrderAddressId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
||||||
|
{
|
||||||
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
|
$query->joinWith('OrderAddressRelatedByDeliveryOrderAddressId', $joinBehavior);
|
||||||
|
|
||||||
|
return $this->getOrdersRelatedByPaymentModuleId($query, $con);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If this collection has already been initialized with
|
||||||
|
* an identical criteria, it returns the collection.
|
||||||
|
* Otherwise if this Module is new, it will return
|
||||||
|
* an empty collection; or if this Module has previously
|
||||||
|
* been saved, it will retrieve related OrdersRelatedByPaymentModuleId from storage.
|
||||||
|
*
|
||||||
|
* This method is protected by default in order to keep the public
|
||||||
|
* api reasonable. You can provide public methods for those you
|
||||||
|
* actually need in Module.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||||
|
* @param ConnectionInterface $con optional connection object
|
||||||
|
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||||
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
|
*/
|
||||||
|
public function getOrdersRelatedByPaymentModuleIdJoinOrderStatus($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
||||||
|
{
|
||||||
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
|
$query->joinWith('OrderStatus', $joinBehavior);
|
||||||
|
|
||||||
|
return $this->getOrdersRelatedByPaymentModuleId($query, $con);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If this collection has already been initialized with
|
||||||
|
* an identical criteria, it returns the collection.
|
||||||
|
* Otherwise if this Module is new, it will return
|
||||||
|
* an empty collection; or if this Module has previously
|
||||||
|
* been saved, it will retrieve related OrdersRelatedByPaymentModuleId from storage.
|
||||||
|
*
|
||||||
|
* This method is protected by default in order to keep the public
|
||||||
|
* api reasonable. You can provide public methods for those you
|
||||||
|
* actually need in Module.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||||
|
* @param ConnectionInterface $con optional connection object
|
||||||
|
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||||
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
|
*/
|
||||||
|
public function getOrdersRelatedByPaymentModuleIdJoinLang($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
||||||
|
{
|
||||||
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
|
$query->joinWith('Lang', $joinBehavior);
|
||||||
|
|
||||||
|
return $this->getOrdersRelatedByPaymentModuleId($query, $con);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clears out the collOrdersRelatedByDeliveryModuleId collection
|
||||||
|
*
|
||||||
|
* This does not modify the database; however, it will remove any associated objects, causing
|
||||||
|
* them to be refetched by subsequent calls to accessor method.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
* @see addOrdersRelatedByDeliveryModuleId()
|
||||||
|
*/
|
||||||
|
public function clearOrdersRelatedByDeliveryModuleId()
|
||||||
|
{
|
||||||
|
$this->collOrdersRelatedByDeliveryModuleId = null; // important to set this to NULL since that means it is uninitialized
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reset is the collOrdersRelatedByDeliveryModuleId collection loaded partially.
|
||||||
|
*/
|
||||||
|
public function resetPartialOrdersRelatedByDeliveryModuleId($v = true)
|
||||||
|
{
|
||||||
|
$this->collOrdersRelatedByDeliveryModuleIdPartial = $v;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initializes the collOrdersRelatedByDeliveryModuleId collection.
|
||||||
|
*
|
||||||
|
* By default this just sets the collOrdersRelatedByDeliveryModuleId collection to an empty array (like clearcollOrdersRelatedByDeliveryModuleId());
|
||||||
|
* however, you may wish to override this method in your stub class to provide setting appropriate
|
||||||
|
* to your application -- for example, setting the initial array to the values stored in database.
|
||||||
|
*
|
||||||
|
* @param boolean $overrideExisting If set to true, the method call initializes
|
||||||
|
* the collection even if it is not empty
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function initOrdersRelatedByDeliveryModuleId($overrideExisting = true)
|
||||||
|
{
|
||||||
|
if (null !== $this->collOrdersRelatedByDeliveryModuleId && !$overrideExisting) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$this->collOrdersRelatedByDeliveryModuleId = new ObjectCollection();
|
||||||
|
$this->collOrdersRelatedByDeliveryModuleId->setModel('\Thelia\Model\Order');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets an array of ChildOrder objects which contain a foreign key that references this object.
|
||||||
|
*
|
||||||
|
* If the $criteria is not null, it is used to always fetch the results from the database.
|
||||||
|
* Otherwise the results are fetched from the database the first time, then cached.
|
||||||
|
* Next time the same method is called without $criteria, the cached collection is returned.
|
||||||
|
* If this ChildModule is new, it will return
|
||||||
|
* an empty collection or the current collection; the criteria is ignored on a new object.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||||
|
* @param ConnectionInterface $con optional connection object
|
||||||
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
|
* @throws PropelException
|
||||||
|
*/
|
||||||
|
public function getOrdersRelatedByDeliveryModuleId($criteria = null, ConnectionInterface $con = null)
|
||||||
|
{
|
||||||
|
$partial = $this->collOrdersRelatedByDeliveryModuleIdPartial && !$this->isNew();
|
||||||
|
if (null === $this->collOrdersRelatedByDeliveryModuleId || null !== $criteria || $partial) {
|
||||||
|
if ($this->isNew() && null === $this->collOrdersRelatedByDeliveryModuleId) {
|
||||||
|
// return empty collection
|
||||||
|
$this->initOrdersRelatedByDeliveryModuleId();
|
||||||
|
} else {
|
||||||
|
$collOrdersRelatedByDeliveryModuleId = ChildOrderQuery::create(null, $criteria)
|
||||||
|
->filterByModuleRelatedByDeliveryModuleId($this)
|
||||||
|
->find($con);
|
||||||
|
|
||||||
|
if (null !== $criteria) {
|
||||||
|
if (false !== $this->collOrdersRelatedByDeliveryModuleIdPartial && count($collOrdersRelatedByDeliveryModuleId)) {
|
||||||
|
$this->initOrdersRelatedByDeliveryModuleId(false);
|
||||||
|
|
||||||
|
foreach ($collOrdersRelatedByDeliveryModuleId as $obj) {
|
||||||
|
if (false == $this->collOrdersRelatedByDeliveryModuleId->contains($obj)) {
|
||||||
|
$this->collOrdersRelatedByDeliveryModuleId->append($obj);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->collOrdersRelatedByDeliveryModuleIdPartial = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
$collOrdersRelatedByDeliveryModuleId->getInternalIterator()->rewind();
|
||||||
|
|
||||||
|
return $collOrdersRelatedByDeliveryModuleId;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($partial && $this->collOrdersRelatedByDeliveryModuleId) {
|
||||||
|
foreach ($this->collOrdersRelatedByDeliveryModuleId as $obj) {
|
||||||
|
if ($obj->isNew()) {
|
||||||
|
$collOrdersRelatedByDeliveryModuleId[] = $obj;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->collOrdersRelatedByDeliveryModuleId = $collOrdersRelatedByDeliveryModuleId;
|
||||||
|
$this->collOrdersRelatedByDeliveryModuleIdPartial = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->collOrdersRelatedByDeliveryModuleId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets a collection of OrderRelatedByDeliveryModuleId objects related by a one-to-many relationship
|
||||||
|
* to the current object.
|
||||||
|
* It will also schedule objects for deletion based on a diff between old objects (aka persisted)
|
||||||
|
* and new objects from the given Propel collection.
|
||||||
|
*
|
||||||
|
* @param Collection $ordersRelatedByDeliveryModuleId A Propel collection.
|
||||||
|
* @param ConnectionInterface $con Optional connection object
|
||||||
|
* @return ChildModule The current object (for fluent API support)
|
||||||
|
*/
|
||||||
|
public function setOrdersRelatedByDeliveryModuleId(Collection $ordersRelatedByDeliveryModuleId, ConnectionInterface $con = null)
|
||||||
|
{
|
||||||
|
$ordersRelatedByDeliveryModuleIdToDelete = $this->getOrdersRelatedByDeliveryModuleId(new Criteria(), $con)->diff($ordersRelatedByDeliveryModuleId);
|
||||||
|
|
||||||
|
|
||||||
|
$this->ordersRelatedByDeliveryModuleIdScheduledForDeletion = $ordersRelatedByDeliveryModuleIdToDelete;
|
||||||
|
|
||||||
|
foreach ($ordersRelatedByDeliveryModuleIdToDelete as $orderRelatedByDeliveryModuleIdRemoved) {
|
||||||
|
$orderRelatedByDeliveryModuleIdRemoved->setModuleRelatedByDeliveryModuleId(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->collOrdersRelatedByDeliveryModuleId = null;
|
||||||
|
foreach ($ordersRelatedByDeliveryModuleId as $orderRelatedByDeliveryModuleId) {
|
||||||
|
$this->addOrderRelatedByDeliveryModuleId($orderRelatedByDeliveryModuleId);
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->collOrdersRelatedByDeliveryModuleId = $ordersRelatedByDeliveryModuleId;
|
||||||
|
$this->collOrdersRelatedByDeliveryModuleIdPartial = false;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the number of related Order objects.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria
|
||||||
|
* @param boolean $distinct
|
||||||
|
* @param ConnectionInterface $con
|
||||||
|
* @return int Count of related Order objects.
|
||||||
|
* @throws PropelException
|
||||||
|
*/
|
||||||
|
public function countOrdersRelatedByDeliveryModuleId(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
|
||||||
|
{
|
||||||
|
$partial = $this->collOrdersRelatedByDeliveryModuleIdPartial && !$this->isNew();
|
||||||
|
if (null === $this->collOrdersRelatedByDeliveryModuleId || null !== $criteria || $partial) {
|
||||||
|
if ($this->isNew() && null === $this->collOrdersRelatedByDeliveryModuleId) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($partial && !$criteria) {
|
||||||
|
return count($this->getOrdersRelatedByDeliveryModuleId());
|
||||||
|
}
|
||||||
|
|
||||||
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
|
if ($distinct) {
|
||||||
|
$query->distinct();
|
||||||
|
}
|
||||||
|
|
||||||
|
return $query
|
||||||
|
->filterByModuleRelatedByDeliveryModuleId($this)
|
||||||
|
->count($con);
|
||||||
|
}
|
||||||
|
|
||||||
|
return count($this->collOrdersRelatedByDeliveryModuleId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method called to associate a ChildOrder object to this object
|
||||||
|
* through the ChildOrder foreign key attribute.
|
||||||
|
*
|
||||||
|
* @param ChildOrder $l ChildOrder
|
||||||
|
* @return \Thelia\Model\Module The current object (for fluent API support)
|
||||||
|
*/
|
||||||
|
public function addOrderRelatedByDeliveryModuleId(ChildOrder $l)
|
||||||
|
{
|
||||||
|
if ($this->collOrdersRelatedByDeliveryModuleId === null) {
|
||||||
|
$this->initOrdersRelatedByDeliveryModuleId();
|
||||||
|
$this->collOrdersRelatedByDeliveryModuleIdPartial = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!in_array($l, $this->collOrdersRelatedByDeliveryModuleId->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
|
||||||
|
$this->doAddOrderRelatedByDeliveryModuleId($l);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param OrderRelatedByDeliveryModuleId $orderRelatedByDeliveryModuleId The orderRelatedByDeliveryModuleId object to add.
|
||||||
|
*/
|
||||||
|
protected function doAddOrderRelatedByDeliveryModuleId($orderRelatedByDeliveryModuleId)
|
||||||
|
{
|
||||||
|
$this->collOrdersRelatedByDeliveryModuleId[]= $orderRelatedByDeliveryModuleId;
|
||||||
|
$orderRelatedByDeliveryModuleId->setModuleRelatedByDeliveryModuleId($this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param OrderRelatedByDeliveryModuleId $orderRelatedByDeliveryModuleId The orderRelatedByDeliveryModuleId object to remove.
|
||||||
|
* @return ChildModule The current object (for fluent API support)
|
||||||
|
*/
|
||||||
|
public function removeOrderRelatedByDeliveryModuleId($orderRelatedByDeliveryModuleId)
|
||||||
|
{
|
||||||
|
if ($this->getOrdersRelatedByDeliveryModuleId()->contains($orderRelatedByDeliveryModuleId)) {
|
||||||
|
$this->collOrdersRelatedByDeliveryModuleId->remove($this->collOrdersRelatedByDeliveryModuleId->search($orderRelatedByDeliveryModuleId));
|
||||||
|
if (null === $this->ordersRelatedByDeliveryModuleIdScheduledForDeletion) {
|
||||||
|
$this->ordersRelatedByDeliveryModuleIdScheduledForDeletion = clone $this->collOrdersRelatedByDeliveryModuleId;
|
||||||
|
$this->ordersRelatedByDeliveryModuleIdScheduledForDeletion->clear();
|
||||||
|
}
|
||||||
|
$this->ordersRelatedByDeliveryModuleIdScheduledForDeletion[]= clone $orderRelatedByDeliveryModuleId;
|
||||||
|
$orderRelatedByDeliveryModuleId->setModuleRelatedByDeliveryModuleId(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If this collection has already been initialized with
|
||||||
|
* an identical criteria, it returns the collection.
|
||||||
|
* Otherwise if this Module is new, it will return
|
||||||
|
* an empty collection; or if this Module has previously
|
||||||
|
* been saved, it will retrieve related OrdersRelatedByDeliveryModuleId from storage.
|
||||||
|
*
|
||||||
|
* This method is protected by default in order to keep the public
|
||||||
|
* api reasonable. You can provide public methods for those you
|
||||||
|
* actually need in Module.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||||
|
* @param ConnectionInterface $con optional connection object
|
||||||
|
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||||
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
|
*/
|
||||||
|
public function getOrdersRelatedByDeliveryModuleIdJoinCurrency($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
||||||
|
{
|
||||||
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
|
$query->joinWith('Currency', $joinBehavior);
|
||||||
|
|
||||||
|
return $this->getOrdersRelatedByDeliveryModuleId($query, $con);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If this collection has already been initialized with
|
||||||
|
* an identical criteria, it returns the collection.
|
||||||
|
* Otherwise if this Module is new, it will return
|
||||||
|
* an empty collection; or if this Module has previously
|
||||||
|
* been saved, it will retrieve related OrdersRelatedByDeliveryModuleId from storage.
|
||||||
|
*
|
||||||
|
* This method is protected by default in order to keep the public
|
||||||
|
* api reasonable. You can provide public methods for those you
|
||||||
|
* actually need in Module.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||||
|
* @param ConnectionInterface $con optional connection object
|
||||||
|
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||||
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
|
*/
|
||||||
|
public function getOrdersRelatedByDeliveryModuleIdJoinCustomer($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
||||||
|
{
|
||||||
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
|
$query->joinWith('Customer', $joinBehavior);
|
||||||
|
|
||||||
|
return $this->getOrdersRelatedByDeliveryModuleId($query, $con);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If this collection has already been initialized with
|
||||||
|
* an identical criteria, it returns the collection.
|
||||||
|
* Otherwise if this Module is new, it will return
|
||||||
|
* an empty collection; or if this Module has previously
|
||||||
|
* been saved, it will retrieve related OrdersRelatedByDeliveryModuleId from storage.
|
||||||
|
*
|
||||||
|
* This method is protected by default in order to keep the public
|
||||||
|
* api reasonable. You can provide public methods for those you
|
||||||
|
* actually need in Module.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||||
|
* @param ConnectionInterface $con optional connection object
|
||||||
|
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||||
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
|
*/
|
||||||
|
public function getOrdersRelatedByDeliveryModuleIdJoinOrderAddressRelatedByInvoiceOrderAddressId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
||||||
|
{
|
||||||
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
|
$query->joinWith('OrderAddressRelatedByInvoiceOrderAddressId', $joinBehavior);
|
||||||
|
|
||||||
|
return $this->getOrdersRelatedByDeliveryModuleId($query, $con);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If this collection has already been initialized with
|
||||||
|
* an identical criteria, it returns the collection.
|
||||||
|
* Otherwise if this Module is new, it will return
|
||||||
|
* an empty collection; or if this Module has previously
|
||||||
|
* been saved, it will retrieve related OrdersRelatedByDeliveryModuleId from storage.
|
||||||
|
*
|
||||||
|
* This method is protected by default in order to keep the public
|
||||||
|
* api reasonable. You can provide public methods for those you
|
||||||
|
* actually need in Module.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||||
|
* @param ConnectionInterface $con optional connection object
|
||||||
|
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||||
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
|
*/
|
||||||
|
public function getOrdersRelatedByDeliveryModuleIdJoinOrderAddressRelatedByDeliveryOrderAddressId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
||||||
|
{
|
||||||
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
|
$query->joinWith('OrderAddressRelatedByDeliveryOrderAddressId', $joinBehavior);
|
||||||
|
|
||||||
|
return $this->getOrdersRelatedByDeliveryModuleId($query, $con);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If this collection has already been initialized with
|
||||||
|
* an identical criteria, it returns the collection.
|
||||||
|
* Otherwise if this Module is new, it will return
|
||||||
|
* an empty collection; or if this Module has previously
|
||||||
|
* been saved, it will retrieve related OrdersRelatedByDeliveryModuleId from storage.
|
||||||
|
*
|
||||||
|
* This method is protected by default in order to keep the public
|
||||||
|
* api reasonable. You can provide public methods for those you
|
||||||
|
* actually need in Module.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||||
|
* @param ConnectionInterface $con optional connection object
|
||||||
|
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||||
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
|
*/
|
||||||
|
public function getOrdersRelatedByDeliveryModuleIdJoinOrderStatus($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
||||||
|
{
|
||||||
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
|
$query->joinWith('OrderStatus', $joinBehavior);
|
||||||
|
|
||||||
|
return $this->getOrdersRelatedByDeliveryModuleId($query, $con);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If this collection has already been initialized with
|
||||||
|
* an identical criteria, it returns the collection.
|
||||||
|
* Otherwise if this Module is new, it will return
|
||||||
|
* an empty collection; or if this Module has previously
|
||||||
|
* been saved, it will retrieve related OrdersRelatedByDeliveryModuleId from storage.
|
||||||
|
*
|
||||||
|
* This method is protected by default in order to keep the public
|
||||||
|
* api reasonable. You can provide public methods for those you
|
||||||
|
* actually need in Module.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||||
|
* @param ConnectionInterface $con optional connection object
|
||||||
|
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||||
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
|
*/
|
||||||
|
public function getOrdersRelatedByDeliveryModuleIdJoinLang($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
||||||
|
{
|
||||||
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
|
$query->joinWith('Lang', $joinBehavior);
|
||||||
|
|
||||||
|
return $this->getOrdersRelatedByDeliveryModuleId($query, $con);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clears out the collGroupModules collection
|
* Clears out the collGroupModules collection
|
||||||
*
|
*
|
||||||
@@ -1955,6 +2779,16 @@ abstract class Module implements ActiveRecordInterface
|
|||||||
public function clearAllReferences($deep = false)
|
public function clearAllReferences($deep = false)
|
||||||
{
|
{
|
||||||
if ($deep) {
|
if ($deep) {
|
||||||
|
if ($this->collOrdersRelatedByPaymentModuleId) {
|
||||||
|
foreach ($this->collOrdersRelatedByPaymentModuleId as $o) {
|
||||||
|
$o->clearAllReferences($deep);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($this->collOrdersRelatedByDeliveryModuleId) {
|
||||||
|
foreach ($this->collOrdersRelatedByDeliveryModuleId as $o) {
|
||||||
|
$o->clearAllReferences($deep);
|
||||||
|
}
|
||||||
|
}
|
||||||
if ($this->collGroupModules) {
|
if ($this->collGroupModules) {
|
||||||
foreach ($this->collGroupModules as $o) {
|
foreach ($this->collGroupModules as $o) {
|
||||||
$o->clearAllReferences($deep);
|
$o->clearAllReferences($deep);
|
||||||
@@ -1971,6 +2805,14 @@ abstract class Module implements ActiveRecordInterface
|
|||||||
$this->currentLocale = 'en_US';
|
$this->currentLocale = 'en_US';
|
||||||
$this->currentTranslations = null;
|
$this->currentTranslations = null;
|
||||||
|
|
||||||
|
if ($this->collOrdersRelatedByPaymentModuleId instanceof Collection) {
|
||||||
|
$this->collOrdersRelatedByPaymentModuleId->clearIterator();
|
||||||
|
}
|
||||||
|
$this->collOrdersRelatedByPaymentModuleId = null;
|
||||||
|
if ($this->collOrdersRelatedByDeliveryModuleId instanceof Collection) {
|
||||||
|
$this->collOrdersRelatedByDeliveryModuleId->clearIterator();
|
||||||
|
}
|
||||||
|
$this->collOrdersRelatedByDeliveryModuleId = null;
|
||||||
if ($this->collGroupModules instanceof Collection) {
|
if ($this->collGroupModules instanceof Collection) {
|
||||||
$this->collGroupModules->clearIterator();
|
$this->collGroupModules->clearIterator();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,6 +44,14 @@ use Thelia\Model\Map\ModuleTableMap;
|
|||||||
* @method ChildModuleQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
* @method ChildModuleQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
||||||
* @method ChildModuleQuery innerJoin($relation) Adds a INNER JOIN clause to the query
|
* @method ChildModuleQuery innerJoin($relation) Adds a INNER JOIN clause to the query
|
||||||
*
|
*
|
||||||
|
* @method ChildModuleQuery leftJoinOrderRelatedByPaymentModuleId($relationAlias = null) Adds a LEFT JOIN clause to the query using the OrderRelatedByPaymentModuleId relation
|
||||||
|
* @method ChildModuleQuery rightJoinOrderRelatedByPaymentModuleId($relationAlias = null) Adds a RIGHT JOIN clause to the query using the OrderRelatedByPaymentModuleId relation
|
||||||
|
* @method ChildModuleQuery innerJoinOrderRelatedByPaymentModuleId($relationAlias = null) Adds a INNER JOIN clause to the query using the OrderRelatedByPaymentModuleId relation
|
||||||
|
*
|
||||||
|
* @method ChildModuleQuery leftJoinOrderRelatedByDeliveryModuleId($relationAlias = null) Adds a LEFT JOIN clause to the query using the OrderRelatedByDeliveryModuleId relation
|
||||||
|
* @method ChildModuleQuery rightJoinOrderRelatedByDeliveryModuleId($relationAlias = null) Adds a RIGHT JOIN clause to the query using the OrderRelatedByDeliveryModuleId relation
|
||||||
|
* @method ChildModuleQuery innerJoinOrderRelatedByDeliveryModuleId($relationAlias = null) Adds a INNER JOIN clause to the query using the OrderRelatedByDeliveryModuleId relation
|
||||||
|
*
|
||||||
* @method ChildModuleQuery leftJoinGroupModule($relationAlias = null) Adds a LEFT JOIN clause to the query using the GroupModule relation
|
* @method ChildModuleQuery leftJoinGroupModule($relationAlias = null) Adds a LEFT JOIN clause to the query using the GroupModule relation
|
||||||
* @method ChildModuleQuery rightJoinGroupModule($relationAlias = null) Adds a RIGHT JOIN clause to the query using the GroupModule relation
|
* @method ChildModuleQuery rightJoinGroupModule($relationAlias = null) Adds a RIGHT JOIN clause to the query using the GroupModule relation
|
||||||
* @method ChildModuleQuery innerJoinGroupModule($relationAlias = null) Adds a INNER JOIN clause to the query using the GroupModule relation
|
* @method ChildModuleQuery innerJoinGroupModule($relationAlias = null) Adds a INNER JOIN clause to the query using the GroupModule relation
|
||||||
@@ -557,6 +565,152 @@ abstract class ModuleQuery extends ModelCriteria
|
|||||||
return $this->addUsingAlias(ModuleTableMap::UPDATED_AT, $updatedAt, $comparison);
|
return $this->addUsingAlias(ModuleTableMap::UPDATED_AT, $updatedAt, $comparison);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query by a related \Thelia\Model\Order object
|
||||||
|
*
|
||||||
|
* @param \Thelia\Model\Order|ObjectCollection $order the related object to use as filter
|
||||||
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
|
*
|
||||||
|
* @return ChildModuleQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByOrderRelatedByPaymentModuleId($order, $comparison = null)
|
||||||
|
{
|
||||||
|
if ($order instanceof \Thelia\Model\Order) {
|
||||||
|
return $this
|
||||||
|
->addUsingAlias(ModuleTableMap::ID, $order->getPaymentModuleId(), $comparison);
|
||||||
|
} elseif ($order instanceof ObjectCollection) {
|
||||||
|
return $this
|
||||||
|
->useOrderRelatedByPaymentModuleIdQuery()
|
||||||
|
->filterByPrimaryKeys($order->getPrimaryKeys())
|
||||||
|
->endUse();
|
||||||
|
} else {
|
||||||
|
throw new PropelException('filterByOrderRelatedByPaymentModuleId() only accepts arguments of type \Thelia\Model\Order or Collection');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a JOIN clause to the query using the OrderRelatedByPaymentModuleId relation
|
||||||
|
*
|
||||||
|
* @param string $relationAlias optional alias for the relation
|
||||||
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||||
|
*
|
||||||
|
* @return ChildModuleQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function joinOrderRelatedByPaymentModuleId($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||||
|
{
|
||||||
|
$tableMap = $this->getTableMap();
|
||||||
|
$relationMap = $tableMap->getRelation('OrderRelatedByPaymentModuleId');
|
||||||
|
|
||||||
|
// create a ModelJoin object for this join
|
||||||
|
$join = new ModelJoin();
|
||||||
|
$join->setJoinType($joinType);
|
||||||
|
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
|
||||||
|
if ($previousJoin = $this->getPreviousJoin()) {
|
||||||
|
$join->setPreviousJoin($previousJoin);
|
||||||
|
}
|
||||||
|
|
||||||
|
// add the ModelJoin to the current object
|
||||||
|
if ($relationAlias) {
|
||||||
|
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||||
|
$this->addJoinObject($join, $relationAlias);
|
||||||
|
} else {
|
||||||
|
$this->addJoinObject($join, 'OrderRelatedByPaymentModuleId');
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use the OrderRelatedByPaymentModuleId relation Order object
|
||||||
|
*
|
||||||
|
* @see useQuery()
|
||||||
|
*
|
||||||
|
* @param string $relationAlias optional alias for the relation,
|
||||||
|
* to be used as main alias in the secondary query
|
||||||
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||||
|
*
|
||||||
|
* @return \Thelia\Model\OrderQuery A secondary query class using the current class as primary query
|
||||||
|
*/
|
||||||
|
public function useOrderRelatedByPaymentModuleIdQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||||
|
{
|
||||||
|
return $this
|
||||||
|
->joinOrderRelatedByPaymentModuleId($relationAlias, $joinType)
|
||||||
|
->useQuery($relationAlias ? $relationAlias : 'OrderRelatedByPaymentModuleId', '\Thelia\Model\OrderQuery');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query by a related \Thelia\Model\Order object
|
||||||
|
*
|
||||||
|
* @param \Thelia\Model\Order|ObjectCollection $order the related object to use as filter
|
||||||
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
|
*
|
||||||
|
* @return ChildModuleQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByOrderRelatedByDeliveryModuleId($order, $comparison = null)
|
||||||
|
{
|
||||||
|
if ($order instanceof \Thelia\Model\Order) {
|
||||||
|
return $this
|
||||||
|
->addUsingAlias(ModuleTableMap::ID, $order->getDeliveryModuleId(), $comparison);
|
||||||
|
} elseif ($order instanceof ObjectCollection) {
|
||||||
|
return $this
|
||||||
|
->useOrderRelatedByDeliveryModuleIdQuery()
|
||||||
|
->filterByPrimaryKeys($order->getPrimaryKeys())
|
||||||
|
->endUse();
|
||||||
|
} else {
|
||||||
|
throw new PropelException('filterByOrderRelatedByDeliveryModuleId() only accepts arguments of type \Thelia\Model\Order or Collection');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a JOIN clause to the query using the OrderRelatedByDeliveryModuleId relation
|
||||||
|
*
|
||||||
|
* @param string $relationAlias optional alias for the relation
|
||||||
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||||
|
*
|
||||||
|
* @return ChildModuleQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function joinOrderRelatedByDeliveryModuleId($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||||
|
{
|
||||||
|
$tableMap = $this->getTableMap();
|
||||||
|
$relationMap = $tableMap->getRelation('OrderRelatedByDeliveryModuleId');
|
||||||
|
|
||||||
|
// create a ModelJoin object for this join
|
||||||
|
$join = new ModelJoin();
|
||||||
|
$join->setJoinType($joinType);
|
||||||
|
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
|
||||||
|
if ($previousJoin = $this->getPreviousJoin()) {
|
||||||
|
$join->setPreviousJoin($previousJoin);
|
||||||
|
}
|
||||||
|
|
||||||
|
// add the ModelJoin to the current object
|
||||||
|
if ($relationAlias) {
|
||||||
|
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||||
|
$this->addJoinObject($join, $relationAlias);
|
||||||
|
} else {
|
||||||
|
$this->addJoinObject($join, 'OrderRelatedByDeliveryModuleId');
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use the OrderRelatedByDeliveryModuleId relation Order object
|
||||||
|
*
|
||||||
|
* @see useQuery()
|
||||||
|
*
|
||||||
|
* @param string $relationAlias optional alias for the relation,
|
||||||
|
* to be used as main alias in the secondary query
|
||||||
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||||
|
*
|
||||||
|
* @return \Thelia\Model\OrderQuery A secondary query class using the current class as primary query
|
||||||
|
*/
|
||||||
|
public function useOrderRelatedByDeliveryModuleIdQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||||
|
{
|
||||||
|
return $this
|
||||||
|
->joinOrderRelatedByDeliveryModuleId($relationAlias, $joinType)
|
||||||
|
->useQuery($relationAlias ? $relationAlias : 'OrderRelatedByDeliveryModuleId', '\Thelia\Model\OrderQuery');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the query by a related \Thelia\Model\GroupModule object
|
* Filter the query by a related \Thelia\Model\GroupModule object
|
||||||
*
|
*
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -144,14 +144,14 @@ abstract class OrderAddress implements ActiveRecordInterface
|
|||||||
/**
|
/**
|
||||||
* @var ObjectCollection|ChildOrder[] Collection to store aggregation of ChildOrder objects.
|
* @var ObjectCollection|ChildOrder[] Collection to store aggregation of ChildOrder objects.
|
||||||
*/
|
*/
|
||||||
protected $collOrdersRelatedByAddressInvoice;
|
protected $collOrdersRelatedByInvoiceOrderAddressId;
|
||||||
protected $collOrdersRelatedByAddressInvoicePartial;
|
protected $collOrdersRelatedByInvoiceOrderAddressIdPartial;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var ObjectCollection|ChildOrder[] Collection to store aggregation of ChildOrder objects.
|
* @var ObjectCollection|ChildOrder[] Collection to store aggregation of ChildOrder objects.
|
||||||
*/
|
*/
|
||||||
protected $collOrdersRelatedByAddressDelivery;
|
protected $collOrdersRelatedByDeliveryOrderAddressId;
|
||||||
protected $collOrdersRelatedByAddressDeliveryPartial;
|
protected $collOrdersRelatedByDeliveryOrderAddressIdPartial;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flag to prevent endless save loop, if this object is referenced
|
* Flag to prevent endless save loop, if this object is referenced
|
||||||
@@ -165,13 +165,13 @@ abstract class OrderAddress implements ActiveRecordInterface
|
|||||||
* An array of objects scheduled for deletion.
|
* An array of objects scheduled for deletion.
|
||||||
* @var ObjectCollection
|
* @var ObjectCollection
|
||||||
*/
|
*/
|
||||||
protected $ordersRelatedByAddressInvoiceScheduledForDeletion = null;
|
protected $ordersRelatedByInvoiceOrderAddressIdScheduledForDeletion = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An array of objects scheduled for deletion.
|
* An array of objects scheduled for deletion.
|
||||||
* @var ObjectCollection
|
* @var ObjectCollection
|
||||||
*/
|
*/
|
||||||
protected $ordersRelatedByAddressDeliveryScheduledForDeletion = null;
|
protected $ordersRelatedByDeliveryOrderAddressIdScheduledForDeletion = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes internal state of Thelia\Model\Base\OrderAddress object.
|
* Initializes internal state of Thelia\Model\Base\OrderAddress object.
|
||||||
@@ -1046,9 +1046,9 @@ abstract class OrderAddress implements ActiveRecordInterface
|
|||||||
|
|
||||||
if ($deep) { // also de-associate any related objects?
|
if ($deep) { // also de-associate any related objects?
|
||||||
|
|
||||||
$this->collOrdersRelatedByAddressInvoice = null;
|
$this->collOrdersRelatedByInvoiceOrderAddressId = null;
|
||||||
|
|
||||||
$this->collOrdersRelatedByAddressDelivery = null;
|
$this->collOrdersRelatedByDeliveryOrderAddressId = null;
|
||||||
|
|
||||||
} // if (deep)
|
} // if (deep)
|
||||||
}
|
}
|
||||||
@@ -1183,36 +1183,34 @@ abstract class OrderAddress implements ActiveRecordInterface
|
|||||||
$this->resetModified();
|
$this->resetModified();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->ordersRelatedByAddressInvoiceScheduledForDeletion !== null) {
|
if ($this->ordersRelatedByInvoiceOrderAddressIdScheduledForDeletion !== null) {
|
||||||
if (!$this->ordersRelatedByAddressInvoiceScheduledForDeletion->isEmpty()) {
|
if (!$this->ordersRelatedByInvoiceOrderAddressIdScheduledForDeletion->isEmpty()) {
|
||||||
foreach ($this->ordersRelatedByAddressInvoiceScheduledForDeletion as $orderRelatedByAddressInvoice) {
|
\Thelia\Model\OrderQuery::create()
|
||||||
// need to save related object because we set the relation to null
|
->filterByPrimaryKeys($this->ordersRelatedByInvoiceOrderAddressIdScheduledForDeletion->getPrimaryKeys(false))
|
||||||
$orderRelatedByAddressInvoice->save($con);
|
->delete($con);
|
||||||
}
|
$this->ordersRelatedByInvoiceOrderAddressIdScheduledForDeletion = null;
|
||||||
$this->ordersRelatedByAddressInvoiceScheduledForDeletion = null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->collOrdersRelatedByAddressInvoice !== null) {
|
if ($this->collOrdersRelatedByInvoiceOrderAddressId !== null) {
|
||||||
foreach ($this->collOrdersRelatedByAddressInvoice as $referrerFK) {
|
foreach ($this->collOrdersRelatedByInvoiceOrderAddressId as $referrerFK) {
|
||||||
if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) {
|
if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) {
|
||||||
$affectedRows += $referrerFK->save($con);
|
$affectedRows += $referrerFK->save($con);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->ordersRelatedByAddressDeliveryScheduledForDeletion !== null) {
|
if ($this->ordersRelatedByDeliveryOrderAddressIdScheduledForDeletion !== null) {
|
||||||
if (!$this->ordersRelatedByAddressDeliveryScheduledForDeletion->isEmpty()) {
|
if (!$this->ordersRelatedByDeliveryOrderAddressIdScheduledForDeletion->isEmpty()) {
|
||||||
foreach ($this->ordersRelatedByAddressDeliveryScheduledForDeletion as $orderRelatedByAddressDelivery) {
|
\Thelia\Model\OrderQuery::create()
|
||||||
// need to save related object because we set the relation to null
|
->filterByPrimaryKeys($this->ordersRelatedByDeliveryOrderAddressIdScheduledForDeletion->getPrimaryKeys(false))
|
||||||
$orderRelatedByAddressDelivery->save($con);
|
->delete($con);
|
||||||
}
|
$this->ordersRelatedByDeliveryOrderAddressIdScheduledForDeletion = null;
|
||||||
$this->ordersRelatedByAddressDeliveryScheduledForDeletion = null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->collOrdersRelatedByAddressDelivery !== null) {
|
if ($this->collOrdersRelatedByDeliveryOrderAddressId !== null) {
|
||||||
foreach ($this->collOrdersRelatedByAddressDelivery as $referrerFK) {
|
foreach ($this->collOrdersRelatedByDeliveryOrderAddressId as $referrerFK) {
|
||||||
if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) {
|
if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) {
|
||||||
$affectedRows += $referrerFK->save($con);
|
$affectedRows += $referrerFK->save($con);
|
||||||
}
|
}
|
||||||
@@ -1495,11 +1493,11 @@ abstract class OrderAddress implements ActiveRecordInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($includeForeignObjects) {
|
if ($includeForeignObjects) {
|
||||||
if (null !== $this->collOrdersRelatedByAddressInvoice) {
|
if (null !== $this->collOrdersRelatedByInvoiceOrderAddressId) {
|
||||||
$result['OrdersRelatedByAddressInvoice'] = $this->collOrdersRelatedByAddressInvoice->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
|
$result['OrdersRelatedByInvoiceOrderAddressId'] = $this->collOrdersRelatedByInvoiceOrderAddressId->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
|
||||||
}
|
}
|
||||||
if (null !== $this->collOrdersRelatedByAddressDelivery) {
|
if (null !== $this->collOrdersRelatedByDeliveryOrderAddressId) {
|
||||||
$result['OrdersRelatedByAddressDelivery'] = $this->collOrdersRelatedByAddressDelivery->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
|
$result['OrdersRelatedByDeliveryOrderAddressId'] = $this->collOrdersRelatedByDeliveryOrderAddressId->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1722,15 +1720,15 @@ abstract class OrderAddress implements ActiveRecordInterface
|
|||||||
// the getter/setter methods for fkey referrer objects.
|
// the getter/setter methods for fkey referrer objects.
|
||||||
$copyObj->setNew(false);
|
$copyObj->setNew(false);
|
||||||
|
|
||||||
foreach ($this->getOrdersRelatedByAddressInvoice() as $relObj) {
|
foreach ($this->getOrdersRelatedByInvoiceOrderAddressId() as $relObj) {
|
||||||
if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
|
if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
|
||||||
$copyObj->addOrderRelatedByAddressInvoice($relObj->copy($deepCopy));
|
$copyObj->addOrderRelatedByInvoiceOrderAddressId($relObj->copy($deepCopy));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($this->getOrdersRelatedByAddressDelivery() as $relObj) {
|
foreach ($this->getOrdersRelatedByDeliveryOrderAddressId() as $relObj) {
|
||||||
if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
|
if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
|
||||||
$copyObj->addOrderRelatedByAddressDelivery($relObj->copy($deepCopy));
|
$copyObj->addOrderRelatedByDeliveryOrderAddressId($relObj->copy($deepCopy));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1775,40 +1773,40 @@ abstract class OrderAddress implements ActiveRecordInterface
|
|||||||
*/
|
*/
|
||||||
public function initRelation($relationName)
|
public function initRelation($relationName)
|
||||||
{
|
{
|
||||||
if ('OrderRelatedByAddressInvoice' == $relationName) {
|
if ('OrderRelatedByInvoiceOrderAddressId' == $relationName) {
|
||||||
return $this->initOrdersRelatedByAddressInvoice();
|
return $this->initOrdersRelatedByInvoiceOrderAddressId();
|
||||||
}
|
}
|
||||||
if ('OrderRelatedByAddressDelivery' == $relationName) {
|
if ('OrderRelatedByDeliveryOrderAddressId' == $relationName) {
|
||||||
return $this->initOrdersRelatedByAddressDelivery();
|
return $this->initOrdersRelatedByDeliveryOrderAddressId();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clears out the collOrdersRelatedByAddressInvoice collection
|
* Clears out the collOrdersRelatedByInvoiceOrderAddressId collection
|
||||||
*
|
*
|
||||||
* This does not modify the database; however, it will remove any associated objects, causing
|
* This does not modify the database; however, it will remove any associated objects, causing
|
||||||
* them to be refetched by subsequent calls to accessor method.
|
* them to be refetched by subsequent calls to accessor method.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
* @see addOrdersRelatedByAddressInvoice()
|
* @see addOrdersRelatedByInvoiceOrderAddressId()
|
||||||
*/
|
*/
|
||||||
public function clearOrdersRelatedByAddressInvoice()
|
public function clearOrdersRelatedByInvoiceOrderAddressId()
|
||||||
{
|
{
|
||||||
$this->collOrdersRelatedByAddressInvoice = null; // important to set this to NULL since that means it is uninitialized
|
$this->collOrdersRelatedByInvoiceOrderAddressId = null; // important to set this to NULL since that means it is uninitialized
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reset is the collOrdersRelatedByAddressInvoice collection loaded partially.
|
* Reset is the collOrdersRelatedByInvoiceOrderAddressId collection loaded partially.
|
||||||
*/
|
*/
|
||||||
public function resetPartialOrdersRelatedByAddressInvoice($v = true)
|
public function resetPartialOrdersRelatedByInvoiceOrderAddressId($v = true)
|
||||||
{
|
{
|
||||||
$this->collOrdersRelatedByAddressInvoicePartial = $v;
|
$this->collOrdersRelatedByInvoiceOrderAddressIdPartial = $v;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes the collOrdersRelatedByAddressInvoice collection.
|
* Initializes the collOrdersRelatedByInvoiceOrderAddressId collection.
|
||||||
*
|
*
|
||||||
* By default this just sets the collOrdersRelatedByAddressInvoice collection to an empty array (like clearcollOrdersRelatedByAddressInvoice());
|
* By default this just sets the collOrdersRelatedByInvoiceOrderAddressId collection to an empty array (like clearcollOrdersRelatedByInvoiceOrderAddressId());
|
||||||
* however, you may wish to override this method in your stub class to provide setting appropriate
|
* however, you may wish to override this method in your stub class to provide setting appropriate
|
||||||
* to your application -- for example, setting the initial array to the values stored in database.
|
* to your application -- for example, setting the initial array to the values stored in database.
|
||||||
*
|
*
|
||||||
@@ -1817,13 +1815,13 @@ abstract class OrderAddress implements ActiveRecordInterface
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function initOrdersRelatedByAddressInvoice($overrideExisting = true)
|
public function initOrdersRelatedByInvoiceOrderAddressId($overrideExisting = true)
|
||||||
{
|
{
|
||||||
if (null !== $this->collOrdersRelatedByAddressInvoice && !$overrideExisting) {
|
if (null !== $this->collOrdersRelatedByInvoiceOrderAddressId && !$overrideExisting) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$this->collOrdersRelatedByAddressInvoice = new ObjectCollection();
|
$this->collOrdersRelatedByInvoiceOrderAddressId = new ObjectCollection();
|
||||||
$this->collOrdersRelatedByAddressInvoice->setModel('\Thelia\Model\Order');
|
$this->collOrdersRelatedByInvoiceOrderAddressId->setModel('\Thelia\Model\Order');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1840,80 +1838,80 @@ abstract class OrderAddress implements ActiveRecordInterface
|
|||||||
* @return Collection|ChildOrder[] List of ChildOrder objects
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
* @throws PropelException
|
* @throws PropelException
|
||||||
*/
|
*/
|
||||||
public function getOrdersRelatedByAddressInvoice($criteria = null, ConnectionInterface $con = null)
|
public function getOrdersRelatedByInvoiceOrderAddressId($criteria = null, ConnectionInterface $con = null)
|
||||||
{
|
{
|
||||||
$partial = $this->collOrdersRelatedByAddressInvoicePartial && !$this->isNew();
|
$partial = $this->collOrdersRelatedByInvoiceOrderAddressIdPartial && !$this->isNew();
|
||||||
if (null === $this->collOrdersRelatedByAddressInvoice || null !== $criteria || $partial) {
|
if (null === $this->collOrdersRelatedByInvoiceOrderAddressId || null !== $criteria || $partial) {
|
||||||
if ($this->isNew() && null === $this->collOrdersRelatedByAddressInvoice) {
|
if ($this->isNew() && null === $this->collOrdersRelatedByInvoiceOrderAddressId) {
|
||||||
// return empty collection
|
// return empty collection
|
||||||
$this->initOrdersRelatedByAddressInvoice();
|
$this->initOrdersRelatedByInvoiceOrderAddressId();
|
||||||
} else {
|
} else {
|
||||||
$collOrdersRelatedByAddressInvoice = ChildOrderQuery::create(null, $criteria)
|
$collOrdersRelatedByInvoiceOrderAddressId = ChildOrderQuery::create(null, $criteria)
|
||||||
->filterByOrderAddressRelatedByAddressInvoice($this)
|
->filterByOrderAddressRelatedByInvoiceOrderAddressId($this)
|
||||||
->find($con);
|
->find($con);
|
||||||
|
|
||||||
if (null !== $criteria) {
|
if (null !== $criteria) {
|
||||||
if (false !== $this->collOrdersRelatedByAddressInvoicePartial && count($collOrdersRelatedByAddressInvoice)) {
|
if (false !== $this->collOrdersRelatedByInvoiceOrderAddressIdPartial && count($collOrdersRelatedByInvoiceOrderAddressId)) {
|
||||||
$this->initOrdersRelatedByAddressInvoice(false);
|
$this->initOrdersRelatedByInvoiceOrderAddressId(false);
|
||||||
|
|
||||||
foreach ($collOrdersRelatedByAddressInvoice as $obj) {
|
foreach ($collOrdersRelatedByInvoiceOrderAddressId as $obj) {
|
||||||
if (false == $this->collOrdersRelatedByAddressInvoice->contains($obj)) {
|
if (false == $this->collOrdersRelatedByInvoiceOrderAddressId->contains($obj)) {
|
||||||
$this->collOrdersRelatedByAddressInvoice->append($obj);
|
$this->collOrdersRelatedByInvoiceOrderAddressId->append($obj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->collOrdersRelatedByAddressInvoicePartial = true;
|
$this->collOrdersRelatedByInvoiceOrderAddressIdPartial = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$collOrdersRelatedByAddressInvoice->getInternalIterator()->rewind();
|
$collOrdersRelatedByInvoiceOrderAddressId->getInternalIterator()->rewind();
|
||||||
|
|
||||||
return $collOrdersRelatedByAddressInvoice;
|
return $collOrdersRelatedByInvoiceOrderAddressId;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($partial && $this->collOrdersRelatedByAddressInvoice) {
|
if ($partial && $this->collOrdersRelatedByInvoiceOrderAddressId) {
|
||||||
foreach ($this->collOrdersRelatedByAddressInvoice as $obj) {
|
foreach ($this->collOrdersRelatedByInvoiceOrderAddressId as $obj) {
|
||||||
if ($obj->isNew()) {
|
if ($obj->isNew()) {
|
||||||
$collOrdersRelatedByAddressInvoice[] = $obj;
|
$collOrdersRelatedByInvoiceOrderAddressId[] = $obj;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->collOrdersRelatedByAddressInvoice = $collOrdersRelatedByAddressInvoice;
|
$this->collOrdersRelatedByInvoiceOrderAddressId = $collOrdersRelatedByInvoiceOrderAddressId;
|
||||||
$this->collOrdersRelatedByAddressInvoicePartial = false;
|
$this->collOrdersRelatedByInvoiceOrderAddressIdPartial = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->collOrdersRelatedByAddressInvoice;
|
return $this->collOrdersRelatedByInvoiceOrderAddressId;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets a collection of OrderRelatedByAddressInvoice objects related by a one-to-many relationship
|
* Sets a collection of OrderRelatedByInvoiceOrderAddressId objects related by a one-to-many relationship
|
||||||
* to the current object.
|
* to the current object.
|
||||||
* It will also schedule objects for deletion based on a diff between old objects (aka persisted)
|
* It will also schedule objects for deletion based on a diff between old objects (aka persisted)
|
||||||
* and new objects from the given Propel collection.
|
* and new objects from the given Propel collection.
|
||||||
*
|
*
|
||||||
* @param Collection $ordersRelatedByAddressInvoice A Propel collection.
|
* @param Collection $ordersRelatedByInvoiceOrderAddressId A Propel collection.
|
||||||
* @param ConnectionInterface $con Optional connection object
|
* @param ConnectionInterface $con Optional connection object
|
||||||
* @return ChildOrderAddress The current object (for fluent API support)
|
* @return ChildOrderAddress The current object (for fluent API support)
|
||||||
*/
|
*/
|
||||||
public function setOrdersRelatedByAddressInvoice(Collection $ordersRelatedByAddressInvoice, ConnectionInterface $con = null)
|
public function setOrdersRelatedByInvoiceOrderAddressId(Collection $ordersRelatedByInvoiceOrderAddressId, ConnectionInterface $con = null)
|
||||||
{
|
{
|
||||||
$ordersRelatedByAddressInvoiceToDelete = $this->getOrdersRelatedByAddressInvoice(new Criteria(), $con)->diff($ordersRelatedByAddressInvoice);
|
$ordersRelatedByInvoiceOrderAddressIdToDelete = $this->getOrdersRelatedByInvoiceOrderAddressId(new Criteria(), $con)->diff($ordersRelatedByInvoiceOrderAddressId);
|
||||||
|
|
||||||
|
|
||||||
$this->ordersRelatedByAddressInvoiceScheduledForDeletion = $ordersRelatedByAddressInvoiceToDelete;
|
$this->ordersRelatedByInvoiceOrderAddressIdScheduledForDeletion = $ordersRelatedByInvoiceOrderAddressIdToDelete;
|
||||||
|
|
||||||
foreach ($ordersRelatedByAddressInvoiceToDelete as $orderRelatedByAddressInvoiceRemoved) {
|
foreach ($ordersRelatedByInvoiceOrderAddressIdToDelete as $orderRelatedByInvoiceOrderAddressIdRemoved) {
|
||||||
$orderRelatedByAddressInvoiceRemoved->setOrderAddressRelatedByAddressInvoice(null);
|
$orderRelatedByInvoiceOrderAddressIdRemoved->setOrderAddressRelatedByInvoiceOrderAddressId(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->collOrdersRelatedByAddressInvoice = null;
|
$this->collOrdersRelatedByInvoiceOrderAddressId = null;
|
||||||
foreach ($ordersRelatedByAddressInvoice as $orderRelatedByAddressInvoice) {
|
foreach ($ordersRelatedByInvoiceOrderAddressId as $orderRelatedByInvoiceOrderAddressId) {
|
||||||
$this->addOrderRelatedByAddressInvoice($orderRelatedByAddressInvoice);
|
$this->addOrderRelatedByInvoiceOrderAddressId($orderRelatedByInvoiceOrderAddressId);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->collOrdersRelatedByAddressInvoice = $ordersRelatedByAddressInvoice;
|
$this->collOrdersRelatedByInvoiceOrderAddressId = $ordersRelatedByInvoiceOrderAddressId;
|
||||||
$this->collOrdersRelatedByAddressInvoicePartial = false;
|
$this->collOrdersRelatedByInvoiceOrderAddressIdPartial = false;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
@@ -1927,16 +1925,16 @@ abstract class OrderAddress implements ActiveRecordInterface
|
|||||||
* @return int Count of related Order objects.
|
* @return int Count of related Order objects.
|
||||||
* @throws PropelException
|
* @throws PropelException
|
||||||
*/
|
*/
|
||||||
public function countOrdersRelatedByAddressInvoice(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
|
public function countOrdersRelatedByInvoiceOrderAddressId(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
|
||||||
{
|
{
|
||||||
$partial = $this->collOrdersRelatedByAddressInvoicePartial && !$this->isNew();
|
$partial = $this->collOrdersRelatedByInvoiceOrderAddressIdPartial && !$this->isNew();
|
||||||
if (null === $this->collOrdersRelatedByAddressInvoice || null !== $criteria || $partial) {
|
if (null === $this->collOrdersRelatedByInvoiceOrderAddressId || null !== $criteria || $partial) {
|
||||||
if ($this->isNew() && null === $this->collOrdersRelatedByAddressInvoice) {
|
if ($this->isNew() && null === $this->collOrdersRelatedByInvoiceOrderAddressId) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($partial && !$criteria) {
|
if ($partial && !$criteria) {
|
||||||
return count($this->getOrdersRelatedByAddressInvoice());
|
return count($this->getOrdersRelatedByInvoiceOrderAddressId());
|
||||||
}
|
}
|
||||||
|
|
||||||
$query = ChildOrderQuery::create(null, $criteria);
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
@@ -1945,11 +1943,11 @@ abstract class OrderAddress implements ActiveRecordInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
return $query
|
return $query
|
||||||
->filterByOrderAddressRelatedByAddressInvoice($this)
|
->filterByOrderAddressRelatedByInvoiceOrderAddressId($this)
|
||||||
->count($con);
|
->count($con);
|
||||||
}
|
}
|
||||||
|
|
||||||
return count($this->collOrdersRelatedByAddressInvoice);
|
return count($this->collOrdersRelatedByInvoiceOrderAddressId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1959,43 +1957,43 @@ abstract class OrderAddress implements ActiveRecordInterface
|
|||||||
* @param ChildOrder $l ChildOrder
|
* @param ChildOrder $l ChildOrder
|
||||||
* @return \Thelia\Model\OrderAddress The current object (for fluent API support)
|
* @return \Thelia\Model\OrderAddress The current object (for fluent API support)
|
||||||
*/
|
*/
|
||||||
public function addOrderRelatedByAddressInvoice(ChildOrder $l)
|
public function addOrderRelatedByInvoiceOrderAddressId(ChildOrder $l)
|
||||||
{
|
{
|
||||||
if ($this->collOrdersRelatedByAddressInvoice === null) {
|
if ($this->collOrdersRelatedByInvoiceOrderAddressId === null) {
|
||||||
$this->initOrdersRelatedByAddressInvoice();
|
$this->initOrdersRelatedByInvoiceOrderAddressId();
|
||||||
$this->collOrdersRelatedByAddressInvoicePartial = true;
|
$this->collOrdersRelatedByInvoiceOrderAddressIdPartial = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!in_array($l, $this->collOrdersRelatedByAddressInvoice->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
|
if (!in_array($l, $this->collOrdersRelatedByInvoiceOrderAddressId->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
|
||||||
$this->doAddOrderRelatedByAddressInvoice($l);
|
$this->doAddOrderRelatedByInvoiceOrderAddressId($l);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param OrderRelatedByAddressInvoice $orderRelatedByAddressInvoice The orderRelatedByAddressInvoice object to add.
|
* @param OrderRelatedByInvoiceOrderAddressId $orderRelatedByInvoiceOrderAddressId The orderRelatedByInvoiceOrderAddressId object to add.
|
||||||
*/
|
*/
|
||||||
protected function doAddOrderRelatedByAddressInvoice($orderRelatedByAddressInvoice)
|
protected function doAddOrderRelatedByInvoiceOrderAddressId($orderRelatedByInvoiceOrderAddressId)
|
||||||
{
|
{
|
||||||
$this->collOrdersRelatedByAddressInvoice[]= $orderRelatedByAddressInvoice;
|
$this->collOrdersRelatedByInvoiceOrderAddressId[]= $orderRelatedByInvoiceOrderAddressId;
|
||||||
$orderRelatedByAddressInvoice->setOrderAddressRelatedByAddressInvoice($this);
|
$orderRelatedByInvoiceOrderAddressId->setOrderAddressRelatedByInvoiceOrderAddressId($this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param OrderRelatedByAddressInvoice $orderRelatedByAddressInvoice The orderRelatedByAddressInvoice object to remove.
|
* @param OrderRelatedByInvoiceOrderAddressId $orderRelatedByInvoiceOrderAddressId The orderRelatedByInvoiceOrderAddressId object to remove.
|
||||||
* @return ChildOrderAddress The current object (for fluent API support)
|
* @return ChildOrderAddress The current object (for fluent API support)
|
||||||
*/
|
*/
|
||||||
public function removeOrderRelatedByAddressInvoice($orderRelatedByAddressInvoice)
|
public function removeOrderRelatedByInvoiceOrderAddressId($orderRelatedByInvoiceOrderAddressId)
|
||||||
{
|
{
|
||||||
if ($this->getOrdersRelatedByAddressInvoice()->contains($orderRelatedByAddressInvoice)) {
|
if ($this->getOrdersRelatedByInvoiceOrderAddressId()->contains($orderRelatedByInvoiceOrderAddressId)) {
|
||||||
$this->collOrdersRelatedByAddressInvoice->remove($this->collOrdersRelatedByAddressInvoice->search($orderRelatedByAddressInvoice));
|
$this->collOrdersRelatedByInvoiceOrderAddressId->remove($this->collOrdersRelatedByInvoiceOrderAddressId->search($orderRelatedByInvoiceOrderAddressId));
|
||||||
if (null === $this->ordersRelatedByAddressInvoiceScheduledForDeletion) {
|
if (null === $this->ordersRelatedByInvoiceOrderAddressIdScheduledForDeletion) {
|
||||||
$this->ordersRelatedByAddressInvoiceScheduledForDeletion = clone $this->collOrdersRelatedByAddressInvoice;
|
$this->ordersRelatedByInvoiceOrderAddressIdScheduledForDeletion = clone $this->collOrdersRelatedByInvoiceOrderAddressId;
|
||||||
$this->ordersRelatedByAddressInvoiceScheduledForDeletion->clear();
|
$this->ordersRelatedByInvoiceOrderAddressIdScheduledForDeletion->clear();
|
||||||
}
|
}
|
||||||
$this->ordersRelatedByAddressInvoiceScheduledForDeletion[]= $orderRelatedByAddressInvoice;
|
$this->ordersRelatedByInvoiceOrderAddressIdScheduledForDeletion[]= clone $orderRelatedByInvoiceOrderAddressId;
|
||||||
$orderRelatedByAddressInvoice->setOrderAddressRelatedByAddressInvoice(null);
|
$orderRelatedByInvoiceOrderAddressId->setOrderAddressRelatedByInvoiceOrderAddressId(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
@@ -2007,7 +2005,7 @@ abstract class OrderAddress implements ActiveRecordInterface
|
|||||||
* an identical criteria, it returns the collection.
|
* an identical criteria, it returns the collection.
|
||||||
* Otherwise if this OrderAddress is new, it will return
|
* Otherwise if this OrderAddress is new, it will return
|
||||||
* an empty collection; or if this OrderAddress has previously
|
* an empty collection; or if this OrderAddress has previously
|
||||||
* been saved, it will retrieve related OrdersRelatedByAddressInvoice from storage.
|
* been saved, it will retrieve related OrdersRelatedByInvoiceOrderAddressId from storage.
|
||||||
*
|
*
|
||||||
* This method is protected by default in order to keep the public
|
* This method is protected by default in order to keep the public
|
||||||
* api reasonable. You can provide public methods for those you
|
* api reasonable. You can provide public methods for those you
|
||||||
@@ -2018,12 +2016,12 @@ abstract class OrderAddress implements ActiveRecordInterface
|
|||||||
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||||
* @return Collection|ChildOrder[] List of ChildOrder objects
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
*/
|
*/
|
||||||
public function getOrdersRelatedByAddressInvoiceJoinCurrency($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
public function getOrdersRelatedByInvoiceOrderAddressIdJoinCurrency($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
||||||
{
|
{
|
||||||
$query = ChildOrderQuery::create(null, $criteria);
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
$query->joinWith('Currency', $joinBehavior);
|
$query->joinWith('Currency', $joinBehavior);
|
||||||
|
|
||||||
return $this->getOrdersRelatedByAddressInvoice($query, $con);
|
return $this->getOrdersRelatedByInvoiceOrderAddressId($query, $con);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -2032,7 +2030,7 @@ abstract class OrderAddress implements ActiveRecordInterface
|
|||||||
* an identical criteria, it returns the collection.
|
* an identical criteria, it returns the collection.
|
||||||
* Otherwise if this OrderAddress is new, it will return
|
* Otherwise if this OrderAddress is new, it will return
|
||||||
* an empty collection; or if this OrderAddress has previously
|
* an empty collection; or if this OrderAddress has previously
|
||||||
* been saved, it will retrieve related OrdersRelatedByAddressInvoice from storage.
|
* been saved, it will retrieve related OrdersRelatedByInvoiceOrderAddressId from storage.
|
||||||
*
|
*
|
||||||
* This method is protected by default in order to keep the public
|
* This method is protected by default in order to keep the public
|
||||||
* api reasonable. You can provide public methods for those you
|
* api reasonable. You can provide public methods for those you
|
||||||
@@ -2043,12 +2041,12 @@ abstract class OrderAddress implements ActiveRecordInterface
|
|||||||
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||||
* @return Collection|ChildOrder[] List of ChildOrder objects
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
*/
|
*/
|
||||||
public function getOrdersRelatedByAddressInvoiceJoinCustomer($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
public function getOrdersRelatedByInvoiceOrderAddressIdJoinCustomer($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
||||||
{
|
{
|
||||||
$query = ChildOrderQuery::create(null, $criteria);
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
$query->joinWith('Customer', $joinBehavior);
|
$query->joinWith('Customer', $joinBehavior);
|
||||||
|
|
||||||
return $this->getOrdersRelatedByAddressInvoice($query, $con);
|
return $this->getOrdersRelatedByInvoiceOrderAddressId($query, $con);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -2057,7 +2055,7 @@ abstract class OrderAddress implements ActiveRecordInterface
|
|||||||
* an identical criteria, it returns the collection.
|
* an identical criteria, it returns the collection.
|
||||||
* Otherwise if this OrderAddress is new, it will return
|
* Otherwise if this OrderAddress is new, it will return
|
||||||
* an empty collection; or if this OrderAddress has previously
|
* an empty collection; or if this OrderAddress has previously
|
||||||
* been saved, it will retrieve related OrdersRelatedByAddressInvoice from storage.
|
* been saved, it will retrieve related OrdersRelatedByInvoiceOrderAddressId from storage.
|
||||||
*
|
*
|
||||||
* This method is protected by default in order to keep the public
|
* This method is protected by default in order to keep the public
|
||||||
* api reasonable. You can provide public methods for those you
|
* api reasonable. You can provide public methods for those you
|
||||||
@@ -2068,40 +2066,115 @@ abstract class OrderAddress implements ActiveRecordInterface
|
|||||||
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||||
* @return Collection|ChildOrder[] List of ChildOrder objects
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
*/
|
*/
|
||||||
public function getOrdersRelatedByAddressInvoiceJoinOrderStatus($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
public function getOrdersRelatedByInvoiceOrderAddressIdJoinOrderStatus($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
||||||
{
|
{
|
||||||
$query = ChildOrderQuery::create(null, $criteria);
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
$query->joinWith('OrderStatus', $joinBehavior);
|
$query->joinWith('OrderStatus', $joinBehavior);
|
||||||
|
|
||||||
return $this->getOrdersRelatedByAddressInvoice($query, $con);
|
return $this->getOrdersRelatedByInvoiceOrderAddressId($query, $con);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If this collection has already been initialized with
|
||||||
|
* an identical criteria, it returns the collection.
|
||||||
|
* Otherwise if this OrderAddress is new, it will return
|
||||||
|
* an empty collection; or if this OrderAddress has previously
|
||||||
|
* been saved, it will retrieve related OrdersRelatedByInvoiceOrderAddressId from storage.
|
||||||
|
*
|
||||||
|
* This method is protected by default in order to keep the public
|
||||||
|
* api reasonable. You can provide public methods for those you
|
||||||
|
* actually need in OrderAddress.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||||
|
* @param ConnectionInterface $con optional connection object
|
||||||
|
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||||
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
|
*/
|
||||||
|
public function getOrdersRelatedByInvoiceOrderAddressIdJoinModuleRelatedByPaymentModuleId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
||||||
|
{
|
||||||
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
|
$query->joinWith('ModuleRelatedByPaymentModuleId', $joinBehavior);
|
||||||
|
|
||||||
|
return $this->getOrdersRelatedByInvoiceOrderAddressId($query, $con);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If this collection has already been initialized with
|
||||||
|
* an identical criteria, it returns the collection.
|
||||||
|
* Otherwise if this OrderAddress is new, it will return
|
||||||
|
* an empty collection; or if this OrderAddress has previously
|
||||||
|
* been saved, it will retrieve related OrdersRelatedByInvoiceOrderAddressId from storage.
|
||||||
|
*
|
||||||
|
* This method is protected by default in order to keep the public
|
||||||
|
* api reasonable. You can provide public methods for those you
|
||||||
|
* actually need in OrderAddress.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||||
|
* @param ConnectionInterface $con optional connection object
|
||||||
|
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||||
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
|
*/
|
||||||
|
public function getOrdersRelatedByInvoiceOrderAddressIdJoinModuleRelatedByDeliveryModuleId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
||||||
|
{
|
||||||
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
|
$query->joinWith('ModuleRelatedByDeliveryModuleId', $joinBehavior);
|
||||||
|
|
||||||
|
return $this->getOrdersRelatedByInvoiceOrderAddressId($query, $con);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If this collection has already been initialized with
|
||||||
|
* an identical criteria, it returns the collection.
|
||||||
|
* Otherwise if this OrderAddress is new, it will return
|
||||||
|
* an empty collection; or if this OrderAddress has previously
|
||||||
|
* been saved, it will retrieve related OrdersRelatedByInvoiceOrderAddressId from storage.
|
||||||
|
*
|
||||||
|
* This method is protected by default in order to keep the public
|
||||||
|
* api reasonable. You can provide public methods for those you
|
||||||
|
* actually need in OrderAddress.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||||
|
* @param ConnectionInterface $con optional connection object
|
||||||
|
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||||
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
|
*/
|
||||||
|
public function getOrdersRelatedByInvoiceOrderAddressIdJoinLang($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
||||||
|
{
|
||||||
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
|
$query->joinWith('Lang', $joinBehavior);
|
||||||
|
|
||||||
|
return $this->getOrdersRelatedByInvoiceOrderAddressId($query, $con);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clears out the collOrdersRelatedByAddressDelivery collection
|
* Clears out the collOrdersRelatedByDeliveryOrderAddressId collection
|
||||||
*
|
*
|
||||||
* This does not modify the database; however, it will remove any associated objects, causing
|
* This does not modify the database; however, it will remove any associated objects, causing
|
||||||
* them to be refetched by subsequent calls to accessor method.
|
* them to be refetched by subsequent calls to accessor method.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
* @see addOrdersRelatedByAddressDelivery()
|
* @see addOrdersRelatedByDeliveryOrderAddressId()
|
||||||
*/
|
*/
|
||||||
public function clearOrdersRelatedByAddressDelivery()
|
public function clearOrdersRelatedByDeliveryOrderAddressId()
|
||||||
{
|
{
|
||||||
$this->collOrdersRelatedByAddressDelivery = null; // important to set this to NULL since that means it is uninitialized
|
$this->collOrdersRelatedByDeliveryOrderAddressId = null; // important to set this to NULL since that means it is uninitialized
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reset is the collOrdersRelatedByAddressDelivery collection loaded partially.
|
* Reset is the collOrdersRelatedByDeliveryOrderAddressId collection loaded partially.
|
||||||
*/
|
*/
|
||||||
public function resetPartialOrdersRelatedByAddressDelivery($v = true)
|
public function resetPartialOrdersRelatedByDeliveryOrderAddressId($v = true)
|
||||||
{
|
{
|
||||||
$this->collOrdersRelatedByAddressDeliveryPartial = $v;
|
$this->collOrdersRelatedByDeliveryOrderAddressIdPartial = $v;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes the collOrdersRelatedByAddressDelivery collection.
|
* Initializes the collOrdersRelatedByDeliveryOrderAddressId collection.
|
||||||
*
|
*
|
||||||
* By default this just sets the collOrdersRelatedByAddressDelivery collection to an empty array (like clearcollOrdersRelatedByAddressDelivery());
|
* By default this just sets the collOrdersRelatedByDeliveryOrderAddressId collection to an empty array (like clearcollOrdersRelatedByDeliveryOrderAddressId());
|
||||||
* however, you may wish to override this method in your stub class to provide setting appropriate
|
* however, you may wish to override this method in your stub class to provide setting appropriate
|
||||||
* to your application -- for example, setting the initial array to the values stored in database.
|
* to your application -- for example, setting the initial array to the values stored in database.
|
||||||
*
|
*
|
||||||
@@ -2110,13 +2183,13 @@ abstract class OrderAddress implements ActiveRecordInterface
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function initOrdersRelatedByAddressDelivery($overrideExisting = true)
|
public function initOrdersRelatedByDeliveryOrderAddressId($overrideExisting = true)
|
||||||
{
|
{
|
||||||
if (null !== $this->collOrdersRelatedByAddressDelivery && !$overrideExisting) {
|
if (null !== $this->collOrdersRelatedByDeliveryOrderAddressId && !$overrideExisting) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$this->collOrdersRelatedByAddressDelivery = new ObjectCollection();
|
$this->collOrdersRelatedByDeliveryOrderAddressId = new ObjectCollection();
|
||||||
$this->collOrdersRelatedByAddressDelivery->setModel('\Thelia\Model\Order');
|
$this->collOrdersRelatedByDeliveryOrderAddressId->setModel('\Thelia\Model\Order');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2133,80 +2206,80 @@ abstract class OrderAddress implements ActiveRecordInterface
|
|||||||
* @return Collection|ChildOrder[] List of ChildOrder objects
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
* @throws PropelException
|
* @throws PropelException
|
||||||
*/
|
*/
|
||||||
public function getOrdersRelatedByAddressDelivery($criteria = null, ConnectionInterface $con = null)
|
public function getOrdersRelatedByDeliveryOrderAddressId($criteria = null, ConnectionInterface $con = null)
|
||||||
{
|
{
|
||||||
$partial = $this->collOrdersRelatedByAddressDeliveryPartial && !$this->isNew();
|
$partial = $this->collOrdersRelatedByDeliveryOrderAddressIdPartial && !$this->isNew();
|
||||||
if (null === $this->collOrdersRelatedByAddressDelivery || null !== $criteria || $partial) {
|
if (null === $this->collOrdersRelatedByDeliveryOrderAddressId || null !== $criteria || $partial) {
|
||||||
if ($this->isNew() && null === $this->collOrdersRelatedByAddressDelivery) {
|
if ($this->isNew() && null === $this->collOrdersRelatedByDeliveryOrderAddressId) {
|
||||||
// return empty collection
|
// return empty collection
|
||||||
$this->initOrdersRelatedByAddressDelivery();
|
$this->initOrdersRelatedByDeliveryOrderAddressId();
|
||||||
} else {
|
} else {
|
||||||
$collOrdersRelatedByAddressDelivery = ChildOrderQuery::create(null, $criteria)
|
$collOrdersRelatedByDeliveryOrderAddressId = ChildOrderQuery::create(null, $criteria)
|
||||||
->filterByOrderAddressRelatedByAddressDelivery($this)
|
->filterByOrderAddressRelatedByDeliveryOrderAddressId($this)
|
||||||
->find($con);
|
->find($con);
|
||||||
|
|
||||||
if (null !== $criteria) {
|
if (null !== $criteria) {
|
||||||
if (false !== $this->collOrdersRelatedByAddressDeliveryPartial && count($collOrdersRelatedByAddressDelivery)) {
|
if (false !== $this->collOrdersRelatedByDeliveryOrderAddressIdPartial && count($collOrdersRelatedByDeliveryOrderAddressId)) {
|
||||||
$this->initOrdersRelatedByAddressDelivery(false);
|
$this->initOrdersRelatedByDeliveryOrderAddressId(false);
|
||||||
|
|
||||||
foreach ($collOrdersRelatedByAddressDelivery as $obj) {
|
foreach ($collOrdersRelatedByDeliveryOrderAddressId as $obj) {
|
||||||
if (false == $this->collOrdersRelatedByAddressDelivery->contains($obj)) {
|
if (false == $this->collOrdersRelatedByDeliveryOrderAddressId->contains($obj)) {
|
||||||
$this->collOrdersRelatedByAddressDelivery->append($obj);
|
$this->collOrdersRelatedByDeliveryOrderAddressId->append($obj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->collOrdersRelatedByAddressDeliveryPartial = true;
|
$this->collOrdersRelatedByDeliveryOrderAddressIdPartial = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$collOrdersRelatedByAddressDelivery->getInternalIterator()->rewind();
|
$collOrdersRelatedByDeliveryOrderAddressId->getInternalIterator()->rewind();
|
||||||
|
|
||||||
return $collOrdersRelatedByAddressDelivery;
|
return $collOrdersRelatedByDeliveryOrderAddressId;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($partial && $this->collOrdersRelatedByAddressDelivery) {
|
if ($partial && $this->collOrdersRelatedByDeliveryOrderAddressId) {
|
||||||
foreach ($this->collOrdersRelatedByAddressDelivery as $obj) {
|
foreach ($this->collOrdersRelatedByDeliveryOrderAddressId as $obj) {
|
||||||
if ($obj->isNew()) {
|
if ($obj->isNew()) {
|
||||||
$collOrdersRelatedByAddressDelivery[] = $obj;
|
$collOrdersRelatedByDeliveryOrderAddressId[] = $obj;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->collOrdersRelatedByAddressDelivery = $collOrdersRelatedByAddressDelivery;
|
$this->collOrdersRelatedByDeliveryOrderAddressId = $collOrdersRelatedByDeliveryOrderAddressId;
|
||||||
$this->collOrdersRelatedByAddressDeliveryPartial = false;
|
$this->collOrdersRelatedByDeliveryOrderAddressIdPartial = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->collOrdersRelatedByAddressDelivery;
|
return $this->collOrdersRelatedByDeliveryOrderAddressId;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets a collection of OrderRelatedByAddressDelivery objects related by a one-to-many relationship
|
* Sets a collection of OrderRelatedByDeliveryOrderAddressId objects related by a one-to-many relationship
|
||||||
* to the current object.
|
* to the current object.
|
||||||
* It will also schedule objects for deletion based on a diff between old objects (aka persisted)
|
* It will also schedule objects for deletion based on a diff between old objects (aka persisted)
|
||||||
* and new objects from the given Propel collection.
|
* and new objects from the given Propel collection.
|
||||||
*
|
*
|
||||||
* @param Collection $ordersRelatedByAddressDelivery A Propel collection.
|
* @param Collection $ordersRelatedByDeliveryOrderAddressId A Propel collection.
|
||||||
* @param ConnectionInterface $con Optional connection object
|
* @param ConnectionInterface $con Optional connection object
|
||||||
* @return ChildOrderAddress The current object (for fluent API support)
|
* @return ChildOrderAddress The current object (for fluent API support)
|
||||||
*/
|
*/
|
||||||
public function setOrdersRelatedByAddressDelivery(Collection $ordersRelatedByAddressDelivery, ConnectionInterface $con = null)
|
public function setOrdersRelatedByDeliveryOrderAddressId(Collection $ordersRelatedByDeliveryOrderAddressId, ConnectionInterface $con = null)
|
||||||
{
|
{
|
||||||
$ordersRelatedByAddressDeliveryToDelete = $this->getOrdersRelatedByAddressDelivery(new Criteria(), $con)->diff($ordersRelatedByAddressDelivery);
|
$ordersRelatedByDeliveryOrderAddressIdToDelete = $this->getOrdersRelatedByDeliveryOrderAddressId(new Criteria(), $con)->diff($ordersRelatedByDeliveryOrderAddressId);
|
||||||
|
|
||||||
|
|
||||||
$this->ordersRelatedByAddressDeliveryScheduledForDeletion = $ordersRelatedByAddressDeliveryToDelete;
|
$this->ordersRelatedByDeliveryOrderAddressIdScheduledForDeletion = $ordersRelatedByDeliveryOrderAddressIdToDelete;
|
||||||
|
|
||||||
foreach ($ordersRelatedByAddressDeliveryToDelete as $orderRelatedByAddressDeliveryRemoved) {
|
foreach ($ordersRelatedByDeliveryOrderAddressIdToDelete as $orderRelatedByDeliveryOrderAddressIdRemoved) {
|
||||||
$orderRelatedByAddressDeliveryRemoved->setOrderAddressRelatedByAddressDelivery(null);
|
$orderRelatedByDeliveryOrderAddressIdRemoved->setOrderAddressRelatedByDeliveryOrderAddressId(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->collOrdersRelatedByAddressDelivery = null;
|
$this->collOrdersRelatedByDeliveryOrderAddressId = null;
|
||||||
foreach ($ordersRelatedByAddressDelivery as $orderRelatedByAddressDelivery) {
|
foreach ($ordersRelatedByDeliveryOrderAddressId as $orderRelatedByDeliveryOrderAddressId) {
|
||||||
$this->addOrderRelatedByAddressDelivery($orderRelatedByAddressDelivery);
|
$this->addOrderRelatedByDeliveryOrderAddressId($orderRelatedByDeliveryOrderAddressId);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->collOrdersRelatedByAddressDelivery = $ordersRelatedByAddressDelivery;
|
$this->collOrdersRelatedByDeliveryOrderAddressId = $ordersRelatedByDeliveryOrderAddressId;
|
||||||
$this->collOrdersRelatedByAddressDeliveryPartial = false;
|
$this->collOrdersRelatedByDeliveryOrderAddressIdPartial = false;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
@@ -2220,16 +2293,16 @@ abstract class OrderAddress implements ActiveRecordInterface
|
|||||||
* @return int Count of related Order objects.
|
* @return int Count of related Order objects.
|
||||||
* @throws PropelException
|
* @throws PropelException
|
||||||
*/
|
*/
|
||||||
public function countOrdersRelatedByAddressDelivery(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
|
public function countOrdersRelatedByDeliveryOrderAddressId(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
|
||||||
{
|
{
|
||||||
$partial = $this->collOrdersRelatedByAddressDeliveryPartial && !$this->isNew();
|
$partial = $this->collOrdersRelatedByDeliveryOrderAddressIdPartial && !$this->isNew();
|
||||||
if (null === $this->collOrdersRelatedByAddressDelivery || null !== $criteria || $partial) {
|
if (null === $this->collOrdersRelatedByDeliveryOrderAddressId || null !== $criteria || $partial) {
|
||||||
if ($this->isNew() && null === $this->collOrdersRelatedByAddressDelivery) {
|
if ($this->isNew() && null === $this->collOrdersRelatedByDeliveryOrderAddressId) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($partial && !$criteria) {
|
if ($partial && !$criteria) {
|
||||||
return count($this->getOrdersRelatedByAddressDelivery());
|
return count($this->getOrdersRelatedByDeliveryOrderAddressId());
|
||||||
}
|
}
|
||||||
|
|
||||||
$query = ChildOrderQuery::create(null, $criteria);
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
@@ -2238,11 +2311,11 @@ abstract class OrderAddress implements ActiveRecordInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
return $query
|
return $query
|
||||||
->filterByOrderAddressRelatedByAddressDelivery($this)
|
->filterByOrderAddressRelatedByDeliveryOrderAddressId($this)
|
||||||
->count($con);
|
->count($con);
|
||||||
}
|
}
|
||||||
|
|
||||||
return count($this->collOrdersRelatedByAddressDelivery);
|
return count($this->collOrdersRelatedByDeliveryOrderAddressId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2252,43 +2325,43 @@ abstract class OrderAddress implements ActiveRecordInterface
|
|||||||
* @param ChildOrder $l ChildOrder
|
* @param ChildOrder $l ChildOrder
|
||||||
* @return \Thelia\Model\OrderAddress The current object (for fluent API support)
|
* @return \Thelia\Model\OrderAddress The current object (for fluent API support)
|
||||||
*/
|
*/
|
||||||
public function addOrderRelatedByAddressDelivery(ChildOrder $l)
|
public function addOrderRelatedByDeliveryOrderAddressId(ChildOrder $l)
|
||||||
{
|
{
|
||||||
if ($this->collOrdersRelatedByAddressDelivery === null) {
|
if ($this->collOrdersRelatedByDeliveryOrderAddressId === null) {
|
||||||
$this->initOrdersRelatedByAddressDelivery();
|
$this->initOrdersRelatedByDeliveryOrderAddressId();
|
||||||
$this->collOrdersRelatedByAddressDeliveryPartial = true;
|
$this->collOrdersRelatedByDeliveryOrderAddressIdPartial = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!in_array($l, $this->collOrdersRelatedByAddressDelivery->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
|
if (!in_array($l, $this->collOrdersRelatedByDeliveryOrderAddressId->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
|
||||||
$this->doAddOrderRelatedByAddressDelivery($l);
|
$this->doAddOrderRelatedByDeliveryOrderAddressId($l);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param OrderRelatedByAddressDelivery $orderRelatedByAddressDelivery The orderRelatedByAddressDelivery object to add.
|
* @param OrderRelatedByDeliveryOrderAddressId $orderRelatedByDeliveryOrderAddressId The orderRelatedByDeliveryOrderAddressId object to add.
|
||||||
*/
|
*/
|
||||||
protected function doAddOrderRelatedByAddressDelivery($orderRelatedByAddressDelivery)
|
protected function doAddOrderRelatedByDeliveryOrderAddressId($orderRelatedByDeliveryOrderAddressId)
|
||||||
{
|
{
|
||||||
$this->collOrdersRelatedByAddressDelivery[]= $orderRelatedByAddressDelivery;
|
$this->collOrdersRelatedByDeliveryOrderAddressId[]= $orderRelatedByDeliveryOrderAddressId;
|
||||||
$orderRelatedByAddressDelivery->setOrderAddressRelatedByAddressDelivery($this);
|
$orderRelatedByDeliveryOrderAddressId->setOrderAddressRelatedByDeliveryOrderAddressId($this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param OrderRelatedByAddressDelivery $orderRelatedByAddressDelivery The orderRelatedByAddressDelivery object to remove.
|
* @param OrderRelatedByDeliveryOrderAddressId $orderRelatedByDeliveryOrderAddressId The orderRelatedByDeliveryOrderAddressId object to remove.
|
||||||
* @return ChildOrderAddress The current object (for fluent API support)
|
* @return ChildOrderAddress The current object (for fluent API support)
|
||||||
*/
|
*/
|
||||||
public function removeOrderRelatedByAddressDelivery($orderRelatedByAddressDelivery)
|
public function removeOrderRelatedByDeliveryOrderAddressId($orderRelatedByDeliveryOrderAddressId)
|
||||||
{
|
{
|
||||||
if ($this->getOrdersRelatedByAddressDelivery()->contains($orderRelatedByAddressDelivery)) {
|
if ($this->getOrdersRelatedByDeliveryOrderAddressId()->contains($orderRelatedByDeliveryOrderAddressId)) {
|
||||||
$this->collOrdersRelatedByAddressDelivery->remove($this->collOrdersRelatedByAddressDelivery->search($orderRelatedByAddressDelivery));
|
$this->collOrdersRelatedByDeliveryOrderAddressId->remove($this->collOrdersRelatedByDeliveryOrderAddressId->search($orderRelatedByDeliveryOrderAddressId));
|
||||||
if (null === $this->ordersRelatedByAddressDeliveryScheduledForDeletion) {
|
if (null === $this->ordersRelatedByDeliveryOrderAddressIdScheduledForDeletion) {
|
||||||
$this->ordersRelatedByAddressDeliveryScheduledForDeletion = clone $this->collOrdersRelatedByAddressDelivery;
|
$this->ordersRelatedByDeliveryOrderAddressIdScheduledForDeletion = clone $this->collOrdersRelatedByDeliveryOrderAddressId;
|
||||||
$this->ordersRelatedByAddressDeliveryScheduledForDeletion->clear();
|
$this->ordersRelatedByDeliveryOrderAddressIdScheduledForDeletion->clear();
|
||||||
}
|
}
|
||||||
$this->ordersRelatedByAddressDeliveryScheduledForDeletion[]= $orderRelatedByAddressDelivery;
|
$this->ordersRelatedByDeliveryOrderAddressIdScheduledForDeletion[]= clone $orderRelatedByDeliveryOrderAddressId;
|
||||||
$orderRelatedByAddressDelivery->setOrderAddressRelatedByAddressDelivery(null);
|
$orderRelatedByDeliveryOrderAddressId->setOrderAddressRelatedByDeliveryOrderAddressId(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
@@ -2300,7 +2373,7 @@ abstract class OrderAddress implements ActiveRecordInterface
|
|||||||
* an identical criteria, it returns the collection.
|
* an identical criteria, it returns the collection.
|
||||||
* Otherwise if this OrderAddress is new, it will return
|
* Otherwise if this OrderAddress is new, it will return
|
||||||
* an empty collection; or if this OrderAddress has previously
|
* an empty collection; or if this OrderAddress has previously
|
||||||
* been saved, it will retrieve related OrdersRelatedByAddressDelivery from storage.
|
* been saved, it will retrieve related OrdersRelatedByDeliveryOrderAddressId from storage.
|
||||||
*
|
*
|
||||||
* This method is protected by default in order to keep the public
|
* This method is protected by default in order to keep the public
|
||||||
* api reasonable. You can provide public methods for those you
|
* api reasonable. You can provide public methods for those you
|
||||||
@@ -2311,12 +2384,12 @@ abstract class OrderAddress implements ActiveRecordInterface
|
|||||||
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||||
* @return Collection|ChildOrder[] List of ChildOrder objects
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
*/
|
*/
|
||||||
public function getOrdersRelatedByAddressDeliveryJoinCurrency($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
public function getOrdersRelatedByDeliveryOrderAddressIdJoinCurrency($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
||||||
{
|
{
|
||||||
$query = ChildOrderQuery::create(null, $criteria);
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
$query->joinWith('Currency', $joinBehavior);
|
$query->joinWith('Currency', $joinBehavior);
|
||||||
|
|
||||||
return $this->getOrdersRelatedByAddressDelivery($query, $con);
|
return $this->getOrdersRelatedByDeliveryOrderAddressId($query, $con);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -2325,7 +2398,7 @@ abstract class OrderAddress implements ActiveRecordInterface
|
|||||||
* an identical criteria, it returns the collection.
|
* an identical criteria, it returns the collection.
|
||||||
* Otherwise if this OrderAddress is new, it will return
|
* Otherwise if this OrderAddress is new, it will return
|
||||||
* an empty collection; or if this OrderAddress has previously
|
* an empty collection; or if this OrderAddress has previously
|
||||||
* been saved, it will retrieve related OrdersRelatedByAddressDelivery from storage.
|
* been saved, it will retrieve related OrdersRelatedByDeliveryOrderAddressId from storage.
|
||||||
*
|
*
|
||||||
* This method is protected by default in order to keep the public
|
* This method is protected by default in order to keep the public
|
||||||
* api reasonable. You can provide public methods for those you
|
* api reasonable. You can provide public methods for those you
|
||||||
@@ -2336,12 +2409,12 @@ abstract class OrderAddress implements ActiveRecordInterface
|
|||||||
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||||
* @return Collection|ChildOrder[] List of ChildOrder objects
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
*/
|
*/
|
||||||
public function getOrdersRelatedByAddressDeliveryJoinCustomer($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
public function getOrdersRelatedByDeliveryOrderAddressIdJoinCustomer($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
||||||
{
|
{
|
||||||
$query = ChildOrderQuery::create(null, $criteria);
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
$query->joinWith('Customer', $joinBehavior);
|
$query->joinWith('Customer', $joinBehavior);
|
||||||
|
|
||||||
return $this->getOrdersRelatedByAddressDelivery($query, $con);
|
return $this->getOrdersRelatedByDeliveryOrderAddressId($query, $con);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -2350,7 +2423,7 @@ abstract class OrderAddress implements ActiveRecordInterface
|
|||||||
* an identical criteria, it returns the collection.
|
* an identical criteria, it returns the collection.
|
||||||
* Otherwise if this OrderAddress is new, it will return
|
* Otherwise if this OrderAddress is new, it will return
|
||||||
* an empty collection; or if this OrderAddress has previously
|
* an empty collection; or if this OrderAddress has previously
|
||||||
* been saved, it will retrieve related OrdersRelatedByAddressDelivery from storage.
|
* been saved, it will retrieve related OrdersRelatedByDeliveryOrderAddressId from storage.
|
||||||
*
|
*
|
||||||
* This method is protected by default in order to keep the public
|
* This method is protected by default in order to keep the public
|
||||||
* api reasonable. You can provide public methods for those you
|
* api reasonable. You can provide public methods for those you
|
||||||
@@ -2361,12 +2434,87 @@ abstract class OrderAddress implements ActiveRecordInterface
|
|||||||
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||||
* @return Collection|ChildOrder[] List of ChildOrder objects
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
*/
|
*/
|
||||||
public function getOrdersRelatedByAddressDeliveryJoinOrderStatus($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
public function getOrdersRelatedByDeliveryOrderAddressIdJoinOrderStatus($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
||||||
{
|
{
|
||||||
$query = ChildOrderQuery::create(null, $criteria);
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
$query->joinWith('OrderStatus', $joinBehavior);
|
$query->joinWith('OrderStatus', $joinBehavior);
|
||||||
|
|
||||||
return $this->getOrdersRelatedByAddressDelivery($query, $con);
|
return $this->getOrdersRelatedByDeliveryOrderAddressId($query, $con);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If this collection has already been initialized with
|
||||||
|
* an identical criteria, it returns the collection.
|
||||||
|
* Otherwise if this OrderAddress is new, it will return
|
||||||
|
* an empty collection; or if this OrderAddress has previously
|
||||||
|
* been saved, it will retrieve related OrdersRelatedByDeliveryOrderAddressId from storage.
|
||||||
|
*
|
||||||
|
* This method is protected by default in order to keep the public
|
||||||
|
* api reasonable. You can provide public methods for those you
|
||||||
|
* actually need in OrderAddress.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||||
|
* @param ConnectionInterface $con optional connection object
|
||||||
|
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||||
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
|
*/
|
||||||
|
public function getOrdersRelatedByDeliveryOrderAddressIdJoinModuleRelatedByPaymentModuleId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
||||||
|
{
|
||||||
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
|
$query->joinWith('ModuleRelatedByPaymentModuleId', $joinBehavior);
|
||||||
|
|
||||||
|
return $this->getOrdersRelatedByDeliveryOrderAddressId($query, $con);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If this collection has already been initialized with
|
||||||
|
* an identical criteria, it returns the collection.
|
||||||
|
* Otherwise if this OrderAddress is new, it will return
|
||||||
|
* an empty collection; or if this OrderAddress has previously
|
||||||
|
* been saved, it will retrieve related OrdersRelatedByDeliveryOrderAddressId from storage.
|
||||||
|
*
|
||||||
|
* This method is protected by default in order to keep the public
|
||||||
|
* api reasonable. You can provide public methods for those you
|
||||||
|
* actually need in OrderAddress.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||||
|
* @param ConnectionInterface $con optional connection object
|
||||||
|
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||||
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
|
*/
|
||||||
|
public function getOrdersRelatedByDeliveryOrderAddressIdJoinModuleRelatedByDeliveryModuleId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
||||||
|
{
|
||||||
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
|
$query->joinWith('ModuleRelatedByDeliveryModuleId', $joinBehavior);
|
||||||
|
|
||||||
|
return $this->getOrdersRelatedByDeliveryOrderAddressId($query, $con);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If this collection has already been initialized with
|
||||||
|
* an identical criteria, it returns the collection.
|
||||||
|
* Otherwise if this OrderAddress is new, it will return
|
||||||
|
* an empty collection; or if this OrderAddress has previously
|
||||||
|
* been saved, it will retrieve related OrdersRelatedByDeliveryOrderAddressId from storage.
|
||||||
|
*
|
||||||
|
* This method is protected by default in order to keep the public
|
||||||
|
* api reasonable. You can provide public methods for those you
|
||||||
|
* actually need in OrderAddress.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||||
|
* @param ConnectionInterface $con optional connection object
|
||||||
|
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||||
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
|
*/
|
||||||
|
public function getOrdersRelatedByDeliveryOrderAddressIdJoinLang($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
||||||
|
{
|
||||||
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
|
$query->joinWith('Lang', $joinBehavior);
|
||||||
|
|
||||||
|
return $this->getOrdersRelatedByDeliveryOrderAddressId($query, $con);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2407,26 +2555,26 @@ abstract class OrderAddress implements ActiveRecordInterface
|
|||||||
public function clearAllReferences($deep = false)
|
public function clearAllReferences($deep = false)
|
||||||
{
|
{
|
||||||
if ($deep) {
|
if ($deep) {
|
||||||
if ($this->collOrdersRelatedByAddressInvoice) {
|
if ($this->collOrdersRelatedByInvoiceOrderAddressId) {
|
||||||
foreach ($this->collOrdersRelatedByAddressInvoice as $o) {
|
foreach ($this->collOrdersRelatedByInvoiceOrderAddressId as $o) {
|
||||||
$o->clearAllReferences($deep);
|
$o->clearAllReferences($deep);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($this->collOrdersRelatedByAddressDelivery) {
|
if ($this->collOrdersRelatedByDeliveryOrderAddressId) {
|
||||||
foreach ($this->collOrdersRelatedByAddressDelivery as $o) {
|
foreach ($this->collOrdersRelatedByDeliveryOrderAddressId as $o) {
|
||||||
$o->clearAllReferences($deep);
|
$o->clearAllReferences($deep);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // if ($deep)
|
} // if ($deep)
|
||||||
|
|
||||||
if ($this->collOrdersRelatedByAddressInvoice instanceof Collection) {
|
if ($this->collOrdersRelatedByInvoiceOrderAddressId instanceof Collection) {
|
||||||
$this->collOrdersRelatedByAddressInvoice->clearIterator();
|
$this->collOrdersRelatedByInvoiceOrderAddressId->clearIterator();
|
||||||
}
|
}
|
||||||
$this->collOrdersRelatedByAddressInvoice = null;
|
$this->collOrdersRelatedByInvoiceOrderAddressId = null;
|
||||||
if ($this->collOrdersRelatedByAddressDelivery instanceof Collection) {
|
if ($this->collOrdersRelatedByDeliveryOrderAddressId instanceof Collection) {
|
||||||
$this->collOrdersRelatedByAddressDelivery->clearIterator();
|
$this->collOrdersRelatedByDeliveryOrderAddressId->clearIterator();
|
||||||
}
|
}
|
||||||
$this->collOrdersRelatedByAddressDelivery = null;
|
$this->collOrdersRelatedByDeliveryOrderAddressId = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -55,13 +55,13 @@ use Thelia\Model\Map\OrderAddressTableMap;
|
|||||||
* @method ChildOrderAddressQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
* @method ChildOrderAddressQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
||||||
* @method ChildOrderAddressQuery innerJoin($relation) Adds a INNER JOIN clause to the query
|
* @method ChildOrderAddressQuery innerJoin($relation) Adds a INNER JOIN clause to the query
|
||||||
*
|
*
|
||||||
* @method ChildOrderAddressQuery leftJoinOrderRelatedByAddressInvoice($relationAlias = null) Adds a LEFT JOIN clause to the query using the OrderRelatedByAddressInvoice relation
|
* @method ChildOrderAddressQuery leftJoinOrderRelatedByInvoiceOrderAddressId($relationAlias = null) Adds a LEFT JOIN clause to the query using the OrderRelatedByInvoiceOrderAddressId relation
|
||||||
* @method ChildOrderAddressQuery rightJoinOrderRelatedByAddressInvoice($relationAlias = null) Adds a RIGHT JOIN clause to the query using the OrderRelatedByAddressInvoice relation
|
* @method ChildOrderAddressQuery rightJoinOrderRelatedByInvoiceOrderAddressId($relationAlias = null) Adds a RIGHT JOIN clause to the query using the OrderRelatedByInvoiceOrderAddressId relation
|
||||||
* @method ChildOrderAddressQuery innerJoinOrderRelatedByAddressInvoice($relationAlias = null) Adds a INNER JOIN clause to the query using the OrderRelatedByAddressInvoice relation
|
* @method ChildOrderAddressQuery innerJoinOrderRelatedByInvoiceOrderAddressId($relationAlias = null) Adds a INNER JOIN clause to the query using the OrderRelatedByInvoiceOrderAddressId relation
|
||||||
*
|
*
|
||||||
* @method ChildOrderAddressQuery leftJoinOrderRelatedByAddressDelivery($relationAlias = null) Adds a LEFT JOIN clause to the query using the OrderRelatedByAddressDelivery relation
|
* @method ChildOrderAddressQuery leftJoinOrderRelatedByDeliveryOrderAddressId($relationAlias = null) Adds a LEFT JOIN clause to the query using the OrderRelatedByDeliveryOrderAddressId relation
|
||||||
* @method ChildOrderAddressQuery rightJoinOrderRelatedByAddressDelivery($relationAlias = null) Adds a RIGHT JOIN clause to the query using the OrderRelatedByAddressDelivery relation
|
* @method ChildOrderAddressQuery rightJoinOrderRelatedByDeliveryOrderAddressId($relationAlias = null) Adds a RIGHT JOIN clause to the query using the OrderRelatedByDeliveryOrderAddressId relation
|
||||||
* @method ChildOrderAddressQuery innerJoinOrderRelatedByAddressDelivery($relationAlias = null) Adds a INNER JOIN clause to the query using the OrderRelatedByAddressDelivery relation
|
* @method ChildOrderAddressQuery innerJoinOrderRelatedByDeliveryOrderAddressId($relationAlias = null) Adds a INNER JOIN clause to the query using the OrderRelatedByDeliveryOrderAddressId relation
|
||||||
*
|
*
|
||||||
* @method ChildOrderAddress findOne(ConnectionInterface $con = null) Return the first ChildOrderAddress matching the query
|
* @method ChildOrderAddress findOne(ConnectionInterface $con = null) Return the first ChildOrderAddress matching the query
|
||||||
* @method ChildOrderAddress findOneOrCreate(ConnectionInterface $con = null) Return the first ChildOrderAddress matching the query, or a new ChildOrderAddress object populated from the query conditions when no match is found
|
* @method ChildOrderAddress findOneOrCreate(ConnectionInterface $con = null) Return the first ChildOrderAddress matching the query, or a new ChildOrderAddress object populated from the query conditions when no match is found
|
||||||
@@ -750,33 +750,33 @@ abstract class OrderAddressQuery extends ModelCriteria
|
|||||||
*
|
*
|
||||||
* @return ChildOrderAddressQuery The current query, for fluid interface
|
* @return ChildOrderAddressQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function filterByOrderRelatedByAddressInvoice($order, $comparison = null)
|
public function filterByOrderRelatedByInvoiceOrderAddressId($order, $comparison = null)
|
||||||
{
|
{
|
||||||
if ($order instanceof \Thelia\Model\Order) {
|
if ($order instanceof \Thelia\Model\Order) {
|
||||||
return $this
|
return $this
|
||||||
->addUsingAlias(OrderAddressTableMap::ID, $order->getAddressInvoice(), $comparison);
|
->addUsingAlias(OrderAddressTableMap::ID, $order->getInvoiceOrderAddressId(), $comparison);
|
||||||
} elseif ($order instanceof ObjectCollection) {
|
} elseif ($order instanceof ObjectCollection) {
|
||||||
return $this
|
return $this
|
||||||
->useOrderRelatedByAddressInvoiceQuery()
|
->useOrderRelatedByInvoiceOrderAddressIdQuery()
|
||||||
->filterByPrimaryKeys($order->getPrimaryKeys())
|
->filterByPrimaryKeys($order->getPrimaryKeys())
|
||||||
->endUse();
|
->endUse();
|
||||||
} else {
|
} else {
|
||||||
throw new PropelException('filterByOrderRelatedByAddressInvoice() only accepts arguments of type \Thelia\Model\Order or Collection');
|
throw new PropelException('filterByOrderRelatedByInvoiceOrderAddressId() only accepts arguments of type \Thelia\Model\Order or Collection');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a JOIN clause to the query using the OrderRelatedByAddressInvoice relation
|
* Adds a JOIN clause to the query using the OrderRelatedByInvoiceOrderAddressId relation
|
||||||
*
|
*
|
||||||
* @param string $relationAlias optional alias for the relation
|
* @param string $relationAlias optional alias for the relation
|
||||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||||
*
|
*
|
||||||
* @return ChildOrderAddressQuery The current query, for fluid interface
|
* @return ChildOrderAddressQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function joinOrderRelatedByAddressInvoice($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
public function joinOrderRelatedByInvoiceOrderAddressId($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||||
{
|
{
|
||||||
$tableMap = $this->getTableMap();
|
$tableMap = $this->getTableMap();
|
||||||
$relationMap = $tableMap->getRelation('OrderRelatedByAddressInvoice');
|
$relationMap = $tableMap->getRelation('OrderRelatedByInvoiceOrderAddressId');
|
||||||
|
|
||||||
// create a ModelJoin object for this join
|
// create a ModelJoin object for this join
|
||||||
$join = new ModelJoin();
|
$join = new ModelJoin();
|
||||||
@@ -791,14 +791,14 @@ abstract class OrderAddressQuery extends ModelCriteria
|
|||||||
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||||
$this->addJoinObject($join, $relationAlias);
|
$this->addJoinObject($join, $relationAlias);
|
||||||
} else {
|
} else {
|
||||||
$this->addJoinObject($join, 'OrderRelatedByAddressInvoice');
|
$this->addJoinObject($join, 'OrderRelatedByInvoiceOrderAddressId');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Use the OrderRelatedByAddressInvoice relation Order object
|
* Use the OrderRelatedByInvoiceOrderAddressId relation Order object
|
||||||
*
|
*
|
||||||
* @see useQuery()
|
* @see useQuery()
|
||||||
*
|
*
|
||||||
@@ -808,11 +808,11 @@ abstract class OrderAddressQuery extends ModelCriteria
|
|||||||
*
|
*
|
||||||
* @return \Thelia\Model\OrderQuery A secondary query class using the current class as primary query
|
* @return \Thelia\Model\OrderQuery A secondary query class using the current class as primary query
|
||||||
*/
|
*/
|
||||||
public function useOrderRelatedByAddressInvoiceQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
public function useOrderRelatedByInvoiceOrderAddressIdQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||||
{
|
{
|
||||||
return $this
|
return $this
|
||||||
->joinOrderRelatedByAddressInvoice($relationAlias, $joinType)
|
->joinOrderRelatedByInvoiceOrderAddressId($relationAlias, $joinType)
|
||||||
->useQuery($relationAlias ? $relationAlias : 'OrderRelatedByAddressInvoice', '\Thelia\Model\OrderQuery');
|
->useQuery($relationAlias ? $relationAlias : 'OrderRelatedByInvoiceOrderAddressId', '\Thelia\Model\OrderQuery');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -823,33 +823,33 @@ abstract class OrderAddressQuery extends ModelCriteria
|
|||||||
*
|
*
|
||||||
* @return ChildOrderAddressQuery The current query, for fluid interface
|
* @return ChildOrderAddressQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function filterByOrderRelatedByAddressDelivery($order, $comparison = null)
|
public function filterByOrderRelatedByDeliveryOrderAddressId($order, $comparison = null)
|
||||||
{
|
{
|
||||||
if ($order instanceof \Thelia\Model\Order) {
|
if ($order instanceof \Thelia\Model\Order) {
|
||||||
return $this
|
return $this
|
||||||
->addUsingAlias(OrderAddressTableMap::ID, $order->getAddressDelivery(), $comparison);
|
->addUsingAlias(OrderAddressTableMap::ID, $order->getDeliveryOrderAddressId(), $comparison);
|
||||||
} elseif ($order instanceof ObjectCollection) {
|
} elseif ($order instanceof ObjectCollection) {
|
||||||
return $this
|
return $this
|
||||||
->useOrderRelatedByAddressDeliveryQuery()
|
->useOrderRelatedByDeliveryOrderAddressIdQuery()
|
||||||
->filterByPrimaryKeys($order->getPrimaryKeys())
|
->filterByPrimaryKeys($order->getPrimaryKeys())
|
||||||
->endUse();
|
->endUse();
|
||||||
} else {
|
} else {
|
||||||
throw new PropelException('filterByOrderRelatedByAddressDelivery() only accepts arguments of type \Thelia\Model\Order or Collection');
|
throw new PropelException('filterByOrderRelatedByDeliveryOrderAddressId() only accepts arguments of type \Thelia\Model\Order or Collection');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a JOIN clause to the query using the OrderRelatedByAddressDelivery relation
|
* Adds a JOIN clause to the query using the OrderRelatedByDeliveryOrderAddressId relation
|
||||||
*
|
*
|
||||||
* @param string $relationAlias optional alias for the relation
|
* @param string $relationAlias optional alias for the relation
|
||||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||||
*
|
*
|
||||||
* @return ChildOrderAddressQuery The current query, for fluid interface
|
* @return ChildOrderAddressQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function joinOrderRelatedByAddressDelivery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
public function joinOrderRelatedByDeliveryOrderAddressId($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||||
{
|
{
|
||||||
$tableMap = $this->getTableMap();
|
$tableMap = $this->getTableMap();
|
||||||
$relationMap = $tableMap->getRelation('OrderRelatedByAddressDelivery');
|
$relationMap = $tableMap->getRelation('OrderRelatedByDeliveryOrderAddressId');
|
||||||
|
|
||||||
// create a ModelJoin object for this join
|
// create a ModelJoin object for this join
|
||||||
$join = new ModelJoin();
|
$join = new ModelJoin();
|
||||||
@@ -864,14 +864,14 @@ abstract class OrderAddressQuery extends ModelCriteria
|
|||||||
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||||
$this->addJoinObject($join, $relationAlias);
|
$this->addJoinObject($join, $relationAlias);
|
||||||
} else {
|
} else {
|
||||||
$this->addJoinObject($join, 'OrderRelatedByAddressDelivery');
|
$this->addJoinObject($join, 'OrderRelatedByDeliveryOrderAddressId');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Use the OrderRelatedByAddressDelivery relation Order object
|
* Use the OrderRelatedByDeliveryOrderAddressId relation Order object
|
||||||
*
|
*
|
||||||
* @see useQuery()
|
* @see useQuery()
|
||||||
*
|
*
|
||||||
@@ -881,11 +881,11 @@ abstract class OrderAddressQuery extends ModelCriteria
|
|||||||
*
|
*
|
||||||
* @return \Thelia\Model\OrderQuery A secondary query class using the current class as primary query
|
* @return \Thelia\Model\OrderQuery A secondary query class using the current class as primary query
|
||||||
*/
|
*/
|
||||||
public function useOrderRelatedByAddressDeliveryQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
public function useOrderRelatedByDeliveryOrderAddressIdQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||||
{
|
{
|
||||||
return $this
|
return $this
|
||||||
->joinOrderRelatedByAddressDelivery($relationAlias, $joinType)
|
->joinOrderRelatedByDeliveryOrderAddressId($relationAlias, $joinType)
|
||||||
->useQuery($relationAlias ? $relationAlias : 'OrderRelatedByAddressDelivery', '\Thelia\Model\OrderQuery');
|
->useQuery($relationAlias ? $relationAlias : 'OrderRelatedByDeliveryOrderAddressId', '\Thelia\Model\OrderQuery');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -24,38 +24,38 @@ use Thelia\Model\Map\OrderTableMap;
|
|||||||
* @method ChildOrderQuery orderById($order = Criteria::ASC) Order by the id column
|
* @method ChildOrderQuery orderById($order = Criteria::ASC) Order by the id column
|
||||||
* @method ChildOrderQuery orderByRef($order = Criteria::ASC) Order by the ref column
|
* @method ChildOrderQuery orderByRef($order = Criteria::ASC) Order by the ref column
|
||||||
* @method ChildOrderQuery orderByCustomerId($order = Criteria::ASC) Order by the customer_id column
|
* @method ChildOrderQuery orderByCustomerId($order = Criteria::ASC) Order by the customer_id column
|
||||||
* @method ChildOrderQuery orderByAddressInvoice($order = Criteria::ASC) Order by the address_invoice column
|
* @method ChildOrderQuery orderByInvoiceOrderAddressId($order = Criteria::ASC) Order by the invoice_order_address_id column
|
||||||
* @method ChildOrderQuery orderByAddressDelivery($order = Criteria::ASC) Order by the address_delivery column
|
* @method ChildOrderQuery orderByDeliveryOrderAddressId($order = Criteria::ASC) Order by the delivery_order_address_id column
|
||||||
* @method ChildOrderQuery orderByInvoiceDate($order = Criteria::ASC) Order by the invoice_date column
|
* @method ChildOrderQuery orderByInvoiceDate($order = Criteria::ASC) Order by the invoice_date column
|
||||||
* @method ChildOrderQuery orderByCurrencyId($order = Criteria::ASC) Order by the currency_id column
|
* @method ChildOrderQuery orderByCurrencyId($order = Criteria::ASC) Order by the currency_id column
|
||||||
* @method ChildOrderQuery orderByCurrencyRate($order = Criteria::ASC) Order by the currency_rate column
|
* @method ChildOrderQuery orderByCurrencyRate($order = Criteria::ASC) Order by the currency_rate column
|
||||||
* @method ChildOrderQuery orderByTransaction($order = Criteria::ASC) Order by the transaction column
|
* @method ChildOrderQuery orderByTransactionRef($order = Criteria::ASC) Order by the transaction_ref column
|
||||||
* @method ChildOrderQuery orderByDeliveryNum($order = Criteria::ASC) Order by the delivery_num column
|
* @method ChildOrderQuery orderByDeliveryRef($order = Criteria::ASC) Order by the delivery_ref column
|
||||||
* @method ChildOrderQuery orderByInvoice($order = Criteria::ASC) Order by the invoice column
|
* @method ChildOrderQuery orderByInvoiceRef($order = Criteria::ASC) Order by the invoice_ref column
|
||||||
* @method ChildOrderQuery orderByPostage($order = Criteria::ASC) Order by the postage column
|
* @method ChildOrderQuery orderByPostage($order = Criteria::ASC) Order by the postage column
|
||||||
* @method ChildOrderQuery orderByPayment($order = Criteria::ASC) Order by the payment column
|
* @method ChildOrderQuery orderByPaymentModuleId($order = Criteria::ASC) Order by the payment_module_id column
|
||||||
* @method ChildOrderQuery orderByCarrier($order = Criteria::ASC) Order by the carrier column
|
* @method ChildOrderQuery orderByDeliveryModuleId($order = Criteria::ASC) Order by the delivery_module_id column
|
||||||
* @method ChildOrderQuery orderByStatusId($order = Criteria::ASC) Order by the status_id column
|
* @method ChildOrderQuery orderByStatusId($order = Criteria::ASC) Order by the status_id column
|
||||||
* @method ChildOrderQuery orderByLang($order = Criteria::ASC) Order by the lang column
|
* @method ChildOrderQuery orderByLangId($order = Criteria::ASC) Order by the lang_id column
|
||||||
* @method ChildOrderQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
|
* @method ChildOrderQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
|
||||||
* @method ChildOrderQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
|
* @method ChildOrderQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
|
||||||
*
|
*
|
||||||
* @method ChildOrderQuery groupById() Group by the id column
|
* @method ChildOrderQuery groupById() Group by the id column
|
||||||
* @method ChildOrderQuery groupByRef() Group by the ref column
|
* @method ChildOrderQuery groupByRef() Group by the ref column
|
||||||
* @method ChildOrderQuery groupByCustomerId() Group by the customer_id column
|
* @method ChildOrderQuery groupByCustomerId() Group by the customer_id column
|
||||||
* @method ChildOrderQuery groupByAddressInvoice() Group by the address_invoice column
|
* @method ChildOrderQuery groupByInvoiceOrderAddressId() Group by the invoice_order_address_id column
|
||||||
* @method ChildOrderQuery groupByAddressDelivery() Group by the address_delivery column
|
* @method ChildOrderQuery groupByDeliveryOrderAddressId() Group by the delivery_order_address_id column
|
||||||
* @method ChildOrderQuery groupByInvoiceDate() Group by the invoice_date column
|
* @method ChildOrderQuery groupByInvoiceDate() Group by the invoice_date column
|
||||||
* @method ChildOrderQuery groupByCurrencyId() Group by the currency_id column
|
* @method ChildOrderQuery groupByCurrencyId() Group by the currency_id column
|
||||||
* @method ChildOrderQuery groupByCurrencyRate() Group by the currency_rate column
|
* @method ChildOrderQuery groupByCurrencyRate() Group by the currency_rate column
|
||||||
* @method ChildOrderQuery groupByTransaction() Group by the transaction column
|
* @method ChildOrderQuery groupByTransactionRef() Group by the transaction_ref column
|
||||||
* @method ChildOrderQuery groupByDeliveryNum() Group by the delivery_num column
|
* @method ChildOrderQuery groupByDeliveryRef() Group by the delivery_ref column
|
||||||
* @method ChildOrderQuery groupByInvoice() Group by the invoice column
|
* @method ChildOrderQuery groupByInvoiceRef() Group by the invoice_ref column
|
||||||
* @method ChildOrderQuery groupByPostage() Group by the postage column
|
* @method ChildOrderQuery groupByPostage() Group by the postage column
|
||||||
* @method ChildOrderQuery groupByPayment() Group by the payment column
|
* @method ChildOrderQuery groupByPaymentModuleId() Group by the payment_module_id column
|
||||||
* @method ChildOrderQuery groupByCarrier() Group by the carrier column
|
* @method ChildOrderQuery groupByDeliveryModuleId() Group by the delivery_module_id column
|
||||||
* @method ChildOrderQuery groupByStatusId() Group by the status_id column
|
* @method ChildOrderQuery groupByStatusId() Group by the status_id column
|
||||||
* @method ChildOrderQuery groupByLang() Group by the lang column
|
* @method ChildOrderQuery groupByLangId() Group by the lang_id column
|
||||||
* @method ChildOrderQuery groupByCreatedAt() Group by the created_at column
|
* @method ChildOrderQuery groupByCreatedAt() Group by the created_at column
|
||||||
* @method ChildOrderQuery groupByUpdatedAt() Group by the updated_at column
|
* @method ChildOrderQuery groupByUpdatedAt() Group by the updated_at column
|
||||||
*
|
*
|
||||||
@@ -71,18 +71,30 @@ use Thelia\Model\Map\OrderTableMap;
|
|||||||
* @method ChildOrderQuery rightJoinCustomer($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Customer relation
|
* @method ChildOrderQuery rightJoinCustomer($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Customer relation
|
||||||
* @method ChildOrderQuery innerJoinCustomer($relationAlias = null) Adds a INNER JOIN clause to the query using the Customer relation
|
* @method ChildOrderQuery innerJoinCustomer($relationAlias = null) Adds a INNER JOIN clause to the query using the Customer relation
|
||||||
*
|
*
|
||||||
* @method ChildOrderQuery leftJoinOrderAddressRelatedByAddressInvoice($relationAlias = null) Adds a LEFT JOIN clause to the query using the OrderAddressRelatedByAddressInvoice relation
|
* @method ChildOrderQuery leftJoinOrderAddressRelatedByInvoiceOrderAddressId($relationAlias = null) Adds a LEFT JOIN clause to the query using the OrderAddressRelatedByInvoiceOrderAddressId relation
|
||||||
* @method ChildOrderQuery rightJoinOrderAddressRelatedByAddressInvoice($relationAlias = null) Adds a RIGHT JOIN clause to the query using the OrderAddressRelatedByAddressInvoice relation
|
* @method ChildOrderQuery rightJoinOrderAddressRelatedByInvoiceOrderAddressId($relationAlias = null) Adds a RIGHT JOIN clause to the query using the OrderAddressRelatedByInvoiceOrderAddressId relation
|
||||||
* @method ChildOrderQuery innerJoinOrderAddressRelatedByAddressInvoice($relationAlias = null) Adds a INNER JOIN clause to the query using the OrderAddressRelatedByAddressInvoice relation
|
* @method ChildOrderQuery innerJoinOrderAddressRelatedByInvoiceOrderAddressId($relationAlias = null) Adds a INNER JOIN clause to the query using the OrderAddressRelatedByInvoiceOrderAddressId relation
|
||||||
*
|
*
|
||||||
* @method ChildOrderQuery leftJoinOrderAddressRelatedByAddressDelivery($relationAlias = null) Adds a LEFT JOIN clause to the query using the OrderAddressRelatedByAddressDelivery relation
|
* @method ChildOrderQuery leftJoinOrderAddressRelatedByDeliveryOrderAddressId($relationAlias = null) Adds a LEFT JOIN clause to the query using the OrderAddressRelatedByDeliveryOrderAddressId relation
|
||||||
* @method ChildOrderQuery rightJoinOrderAddressRelatedByAddressDelivery($relationAlias = null) Adds a RIGHT JOIN clause to the query using the OrderAddressRelatedByAddressDelivery relation
|
* @method ChildOrderQuery rightJoinOrderAddressRelatedByDeliveryOrderAddressId($relationAlias = null) Adds a RIGHT JOIN clause to the query using the OrderAddressRelatedByDeliveryOrderAddressId relation
|
||||||
* @method ChildOrderQuery innerJoinOrderAddressRelatedByAddressDelivery($relationAlias = null) Adds a INNER JOIN clause to the query using the OrderAddressRelatedByAddressDelivery relation
|
* @method ChildOrderQuery innerJoinOrderAddressRelatedByDeliveryOrderAddressId($relationAlias = null) Adds a INNER JOIN clause to the query using the OrderAddressRelatedByDeliveryOrderAddressId relation
|
||||||
*
|
*
|
||||||
* @method ChildOrderQuery leftJoinOrderStatus($relationAlias = null) Adds a LEFT JOIN clause to the query using the OrderStatus relation
|
* @method ChildOrderQuery leftJoinOrderStatus($relationAlias = null) Adds a LEFT JOIN clause to the query using the OrderStatus relation
|
||||||
* @method ChildOrderQuery rightJoinOrderStatus($relationAlias = null) Adds a RIGHT JOIN clause to the query using the OrderStatus relation
|
* @method ChildOrderQuery rightJoinOrderStatus($relationAlias = null) Adds a RIGHT JOIN clause to the query using the OrderStatus relation
|
||||||
* @method ChildOrderQuery innerJoinOrderStatus($relationAlias = null) Adds a INNER JOIN clause to the query using the OrderStatus relation
|
* @method ChildOrderQuery innerJoinOrderStatus($relationAlias = null) Adds a INNER JOIN clause to the query using the OrderStatus relation
|
||||||
*
|
*
|
||||||
|
* @method ChildOrderQuery leftJoinModuleRelatedByPaymentModuleId($relationAlias = null) Adds a LEFT JOIN clause to the query using the ModuleRelatedByPaymentModuleId relation
|
||||||
|
* @method ChildOrderQuery rightJoinModuleRelatedByPaymentModuleId($relationAlias = null) Adds a RIGHT JOIN clause to the query using the ModuleRelatedByPaymentModuleId relation
|
||||||
|
* @method ChildOrderQuery innerJoinModuleRelatedByPaymentModuleId($relationAlias = null) Adds a INNER JOIN clause to the query using the ModuleRelatedByPaymentModuleId relation
|
||||||
|
*
|
||||||
|
* @method ChildOrderQuery leftJoinModuleRelatedByDeliveryModuleId($relationAlias = null) Adds a LEFT JOIN clause to the query using the ModuleRelatedByDeliveryModuleId relation
|
||||||
|
* @method ChildOrderQuery rightJoinModuleRelatedByDeliveryModuleId($relationAlias = null) Adds a RIGHT JOIN clause to the query using the ModuleRelatedByDeliveryModuleId relation
|
||||||
|
* @method ChildOrderQuery innerJoinModuleRelatedByDeliveryModuleId($relationAlias = null) Adds a INNER JOIN clause to the query using the ModuleRelatedByDeliveryModuleId relation
|
||||||
|
*
|
||||||
|
* @method ChildOrderQuery leftJoinLang($relationAlias = null) Adds a LEFT JOIN clause to the query using the Lang relation
|
||||||
|
* @method ChildOrderQuery rightJoinLang($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Lang relation
|
||||||
|
* @method ChildOrderQuery innerJoinLang($relationAlias = null) Adds a INNER JOIN clause to the query using the Lang relation
|
||||||
|
*
|
||||||
* @method ChildOrderQuery leftJoinOrderProduct($relationAlias = null) Adds a LEFT JOIN clause to the query using the OrderProduct relation
|
* @method ChildOrderQuery leftJoinOrderProduct($relationAlias = null) Adds a LEFT JOIN clause to the query using the OrderProduct relation
|
||||||
* @method ChildOrderQuery rightJoinOrderProduct($relationAlias = null) Adds a RIGHT JOIN clause to the query using the OrderProduct relation
|
* @method ChildOrderQuery rightJoinOrderProduct($relationAlias = null) Adds a RIGHT JOIN clause to the query using the OrderProduct relation
|
||||||
* @method ChildOrderQuery innerJoinOrderProduct($relationAlias = null) Adds a INNER JOIN clause to the query using the OrderProduct relation
|
* @method ChildOrderQuery innerJoinOrderProduct($relationAlias = null) Adds a INNER JOIN clause to the query using the OrderProduct relation
|
||||||
@@ -97,38 +109,38 @@ use Thelia\Model\Map\OrderTableMap;
|
|||||||
* @method ChildOrder findOneById(int $id) Return the first ChildOrder filtered by the id column
|
* @method ChildOrder findOneById(int $id) Return the first ChildOrder filtered by the id column
|
||||||
* @method ChildOrder findOneByRef(string $ref) Return the first ChildOrder filtered by the ref column
|
* @method ChildOrder findOneByRef(string $ref) Return the first ChildOrder filtered by the ref column
|
||||||
* @method ChildOrder findOneByCustomerId(int $customer_id) Return the first ChildOrder filtered by the customer_id column
|
* @method ChildOrder findOneByCustomerId(int $customer_id) Return the first ChildOrder filtered by the customer_id column
|
||||||
* @method ChildOrder findOneByAddressInvoice(int $address_invoice) Return the first ChildOrder filtered by the address_invoice column
|
* @method ChildOrder findOneByInvoiceOrderAddressId(int $invoice_order_address_id) Return the first ChildOrder filtered by the invoice_order_address_id column
|
||||||
* @method ChildOrder findOneByAddressDelivery(int $address_delivery) Return the first ChildOrder filtered by the address_delivery column
|
* @method ChildOrder findOneByDeliveryOrderAddressId(int $delivery_order_address_id) Return the first ChildOrder filtered by the delivery_order_address_id column
|
||||||
* @method ChildOrder findOneByInvoiceDate(string $invoice_date) Return the first ChildOrder filtered by the invoice_date column
|
* @method ChildOrder findOneByInvoiceDate(string $invoice_date) Return the first ChildOrder filtered by the invoice_date column
|
||||||
* @method ChildOrder findOneByCurrencyId(int $currency_id) Return the first ChildOrder filtered by the currency_id column
|
* @method ChildOrder findOneByCurrencyId(int $currency_id) Return the first ChildOrder filtered by the currency_id column
|
||||||
* @method ChildOrder findOneByCurrencyRate(double $currency_rate) Return the first ChildOrder filtered by the currency_rate column
|
* @method ChildOrder findOneByCurrencyRate(double $currency_rate) Return the first ChildOrder filtered by the currency_rate column
|
||||||
* @method ChildOrder findOneByTransaction(string $transaction) Return the first ChildOrder filtered by the transaction column
|
* @method ChildOrder findOneByTransactionRef(string $transaction_ref) Return the first ChildOrder filtered by the transaction_ref column
|
||||||
* @method ChildOrder findOneByDeliveryNum(string $delivery_num) Return the first ChildOrder filtered by the delivery_num column
|
* @method ChildOrder findOneByDeliveryRef(string $delivery_ref) Return the first ChildOrder filtered by the delivery_ref column
|
||||||
* @method ChildOrder findOneByInvoice(string $invoice) Return the first ChildOrder filtered by the invoice column
|
* @method ChildOrder findOneByInvoiceRef(string $invoice_ref) Return the first ChildOrder filtered by the invoice_ref column
|
||||||
* @method ChildOrder findOneByPostage(double $postage) Return the first ChildOrder filtered by the postage column
|
* @method ChildOrder findOneByPostage(double $postage) Return the first ChildOrder filtered by the postage column
|
||||||
* @method ChildOrder findOneByPayment(string $payment) Return the first ChildOrder filtered by the payment column
|
* @method ChildOrder findOneByPaymentModuleId(int $payment_module_id) Return the first ChildOrder filtered by the payment_module_id column
|
||||||
* @method ChildOrder findOneByCarrier(string $carrier) Return the first ChildOrder filtered by the carrier column
|
* @method ChildOrder findOneByDeliveryModuleId(int $delivery_module_id) Return the first ChildOrder filtered by the delivery_module_id column
|
||||||
* @method ChildOrder findOneByStatusId(int $status_id) Return the first ChildOrder filtered by the status_id column
|
* @method ChildOrder findOneByStatusId(int $status_id) Return the first ChildOrder filtered by the status_id column
|
||||||
* @method ChildOrder findOneByLang(string $lang) Return the first ChildOrder filtered by the lang column
|
* @method ChildOrder findOneByLangId(int $lang_id) Return the first ChildOrder filtered by the lang_id column
|
||||||
* @method ChildOrder findOneByCreatedAt(string $created_at) Return the first ChildOrder filtered by the created_at column
|
* @method ChildOrder findOneByCreatedAt(string $created_at) Return the first ChildOrder filtered by the created_at column
|
||||||
* @method ChildOrder findOneByUpdatedAt(string $updated_at) Return the first ChildOrder filtered by the updated_at column
|
* @method ChildOrder findOneByUpdatedAt(string $updated_at) Return the first ChildOrder filtered by the updated_at column
|
||||||
*
|
*
|
||||||
* @method array findById(int $id) Return ChildOrder objects filtered by the id column
|
* @method array findById(int $id) Return ChildOrder objects filtered by the id column
|
||||||
* @method array findByRef(string $ref) Return ChildOrder objects filtered by the ref column
|
* @method array findByRef(string $ref) Return ChildOrder objects filtered by the ref column
|
||||||
* @method array findByCustomerId(int $customer_id) Return ChildOrder objects filtered by the customer_id column
|
* @method array findByCustomerId(int $customer_id) Return ChildOrder objects filtered by the customer_id column
|
||||||
* @method array findByAddressInvoice(int $address_invoice) Return ChildOrder objects filtered by the address_invoice column
|
* @method array findByInvoiceOrderAddressId(int $invoice_order_address_id) Return ChildOrder objects filtered by the invoice_order_address_id column
|
||||||
* @method array findByAddressDelivery(int $address_delivery) Return ChildOrder objects filtered by the address_delivery column
|
* @method array findByDeliveryOrderAddressId(int $delivery_order_address_id) Return ChildOrder objects filtered by the delivery_order_address_id column
|
||||||
* @method array findByInvoiceDate(string $invoice_date) Return ChildOrder objects filtered by the invoice_date column
|
* @method array findByInvoiceDate(string $invoice_date) Return ChildOrder objects filtered by the invoice_date column
|
||||||
* @method array findByCurrencyId(int $currency_id) Return ChildOrder objects filtered by the currency_id column
|
* @method array findByCurrencyId(int $currency_id) Return ChildOrder objects filtered by the currency_id column
|
||||||
* @method array findByCurrencyRate(double $currency_rate) Return ChildOrder objects filtered by the currency_rate column
|
* @method array findByCurrencyRate(double $currency_rate) Return ChildOrder objects filtered by the currency_rate column
|
||||||
* @method array findByTransaction(string $transaction) Return ChildOrder objects filtered by the transaction column
|
* @method array findByTransactionRef(string $transaction_ref) Return ChildOrder objects filtered by the transaction_ref column
|
||||||
* @method array findByDeliveryNum(string $delivery_num) Return ChildOrder objects filtered by the delivery_num column
|
* @method array findByDeliveryRef(string $delivery_ref) Return ChildOrder objects filtered by the delivery_ref column
|
||||||
* @method array findByInvoice(string $invoice) Return ChildOrder objects filtered by the invoice column
|
* @method array findByInvoiceRef(string $invoice_ref) Return ChildOrder objects filtered by the invoice_ref column
|
||||||
* @method array findByPostage(double $postage) Return ChildOrder objects filtered by the postage column
|
* @method array findByPostage(double $postage) Return ChildOrder objects filtered by the postage column
|
||||||
* @method array findByPayment(string $payment) Return ChildOrder objects filtered by the payment column
|
* @method array findByPaymentModuleId(int $payment_module_id) Return ChildOrder objects filtered by the payment_module_id column
|
||||||
* @method array findByCarrier(string $carrier) Return ChildOrder objects filtered by the carrier column
|
* @method array findByDeliveryModuleId(int $delivery_module_id) Return ChildOrder objects filtered by the delivery_module_id column
|
||||||
* @method array findByStatusId(int $status_id) Return ChildOrder objects filtered by the status_id column
|
* @method array findByStatusId(int $status_id) Return ChildOrder objects filtered by the status_id column
|
||||||
* @method array findByLang(string $lang) Return ChildOrder objects filtered by the lang column
|
* @method array findByLangId(int $lang_id) Return ChildOrder objects filtered by the lang_id column
|
||||||
* @method array findByCreatedAt(string $created_at) Return ChildOrder objects filtered by the created_at column
|
* @method array findByCreatedAt(string $created_at) Return ChildOrder objects filtered by the created_at column
|
||||||
* @method array findByUpdatedAt(string $updated_at) Return ChildOrder objects filtered by the updated_at column
|
* @method array findByUpdatedAt(string $updated_at) Return ChildOrder objects filtered by the updated_at column
|
||||||
*
|
*
|
||||||
@@ -219,7 +231,7 @@ abstract class OrderQuery extends ModelCriteria
|
|||||||
*/
|
*/
|
||||||
protected function findPkSimple($key, $con)
|
protected function findPkSimple($key, $con)
|
||||||
{
|
{
|
||||||
$sql = 'SELECT ID, REF, CUSTOMER_ID, ADDRESS_INVOICE, ADDRESS_DELIVERY, INVOICE_DATE, CURRENCY_ID, CURRENCY_RATE, TRANSACTION, DELIVERY_NUM, INVOICE, POSTAGE, PAYMENT, CARRIER, STATUS_ID, LANG, CREATED_AT, UPDATED_AT FROM order WHERE ID = :p0';
|
$sql = 'SELECT ID, REF, CUSTOMER_ID, INVOICE_ORDER_ADDRESS_ID, DELIVERY_ORDER_ADDRESS_ID, INVOICE_DATE, CURRENCY_ID, CURRENCY_RATE, TRANSACTION_REF, DELIVERY_REF, INVOICE_REF, POSTAGE, PAYMENT_MODULE_ID, DELIVERY_MODULE_ID, STATUS_ID, LANG_ID, CREATED_AT, UPDATED_AT FROM order WHERE ID = :p0';
|
||||||
try {
|
try {
|
||||||
$stmt = $con->prepare($sql);
|
$stmt = $con->prepare($sql);
|
||||||
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
|
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
|
||||||
@@ -422,18 +434,18 @@ abstract class OrderQuery extends ModelCriteria
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the query on the address_invoice column
|
* Filter the query on the invoice_order_address_id column
|
||||||
*
|
*
|
||||||
* Example usage:
|
* Example usage:
|
||||||
* <code>
|
* <code>
|
||||||
* $query->filterByAddressInvoice(1234); // WHERE address_invoice = 1234
|
* $query->filterByInvoiceOrderAddressId(1234); // WHERE invoice_order_address_id = 1234
|
||||||
* $query->filterByAddressInvoice(array(12, 34)); // WHERE address_invoice IN (12, 34)
|
* $query->filterByInvoiceOrderAddressId(array(12, 34)); // WHERE invoice_order_address_id IN (12, 34)
|
||||||
* $query->filterByAddressInvoice(array('min' => 12)); // WHERE address_invoice > 12
|
* $query->filterByInvoiceOrderAddressId(array('min' => 12)); // WHERE invoice_order_address_id > 12
|
||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
* @see filterByOrderAddressRelatedByAddressInvoice()
|
* @see filterByOrderAddressRelatedByInvoiceOrderAddressId()
|
||||||
*
|
*
|
||||||
* @param mixed $addressInvoice The value to use as filter.
|
* @param mixed $invoiceOrderAddressId The value to use as filter.
|
||||||
* Use scalar values for equality.
|
* Use scalar values for equality.
|
||||||
* Use array values for in_array() equivalent.
|
* Use array values for in_array() equivalent.
|
||||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||||
@@ -441,16 +453,16 @@ abstract class OrderQuery extends ModelCriteria
|
|||||||
*
|
*
|
||||||
* @return ChildOrderQuery The current query, for fluid interface
|
* @return ChildOrderQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function filterByAddressInvoice($addressInvoice = null, $comparison = null)
|
public function filterByInvoiceOrderAddressId($invoiceOrderAddressId = null, $comparison = null)
|
||||||
{
|
{
|
||||||
if (is_array($addressInvoice)) {
|
if (is_array($invoiceOrderAddressId)) {
|
||||||
$useMinMax = false;
|
$useMinMax = false;
|
||||||
if (isset($addressInvoice['min'])) {
|
if (isset($invoiceOrderAddressId['min'])) {
|
||||||
$this->addUsingAlias(OrderTableMap::ADDRESS_INVOICE, $addressInvoice['min'], Criteria::GREATER_EQUAL);
|
$this->addUsingAlias(OrderTableMap::INVOICE_ORDER_ADDRESS_ID, $invoiceOrderAddressId['min'], Criteria::GREATER_EQUAL);
|
||||||
$useMinMax = true;
|
$useMinMax = true;
|
||||||
}
|
}
|
||||||
if (isset($addressInvoice['max'])) {
|
if (isset($invoiceOrderAddressId['max'])) {
|
||||||
$this->addUsingAlias(OrderTableMap::ADDRESS_INVOICE, $addressInvoice['max'], Criteria::LESS_EQUAL);
|
$this->addUsingAlias(OrderTableMap::INVOICE_ORDER_ADDRESS_ID, $invoiceOrderAddressId['max'], Criteria::LESS_EQUAL);
|
||||||
$useMinMax = true;
|
$useMinMax = true;
|
||||||
}
|
}
|
||||||
if ($useMinMax) {
|
if ($useMinMax) {
|
||||||
@@ -461,22 +473,22 @@ abstract class OrderQuery extends ModelCriteria
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->addUsingAlias(OrderTableMap::ADDRESS_INVOICE, $addressInvoice, $comparison);
|
return $this->addUsingAlias(OrderTableMap::INVOICE_ORDER_ADDRESS_ID, $invoiceOrderAddressId, $comparison);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the query on the address_delivery column
|
* Filter the query on the delivery_order_address_id column
|
||||||
*
|
*
|
||||||
* Example usage:
|
* Example usage:
|
||||||
* <code>
|
* <code>
|
||||||
* $query->filterByAddressDelivery(1234); // WHERE address_delivery = 1234
|
* $query->filterByDeliveryOrderAddressId(1234); // WHERE delivery_order_address_id = 1234
|
||||||
* $query->filterByAddressDelivery(array(12, 34)); // WHERE address_delivery IN (12, 34)
|
* $query->filterByDeliveryOrderAddressId(array(12, 34)); // WHERE delivery_order_address_id IN (12, 34)
|
||||||
* $query->filterByAddressDelivery(array('min' => 12)); // WHERE address_delivery > 12
|
* $query->filterByDeliveryOrderAddressId(array('min' => 12)); // WHERE delivery_order_address_id > 12
|
||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
* @see filterByOrderAddressRelatedByAddressDelivery()
|
* @see filterByOrderAddressRelatedByDeliveryOrderAddressId()
|
||||||
*
|
*
|
||||||
* @param mixed $addressDelivery The value to use as filter.
|
* @param mixed $deliveryOrderAddressId The value to use as filter.
|
||||||
* Use scalar values for equality.
|
* Use scalar values for equality.
|
||||||
* Use array values for in_array() equivalent.
|
* Use array values for in_array() equivalent.
|
||||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||||
@@ -484,16 +496,16 @@ abstract class OrderQuery extends ModelCriteria
|
|||||||
*
|
*
|
||||||
* @return ChildOrderQuery The current query, for fluid interface
|
* @return ChildOrderQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function filterByAddressDelivery($addressDelivery = null, $comparison = null)
|
public function filterByDeliveryOrderAddressId($deliveryOrderAddressId = null, $comparison = null)
|
||||||
{
|
{
|
||||||
if (is_array($addressDelivery)) {
|
if (is_array($deliveryOrderAddressId)) {
|
||||||
$useMinMax = false;
|
$useMinMax = false;
|
||||||
if (isset($addressDelivery['min'])) {
|
if (isset($deliveryOrderAddressId['min'])) {
|
||||||
$this->addUsingAlias(OrderTableMap::ADDRESS_DELIVERY, $addressDelivery['min'], Criteria::GREATER_EQUAL);
|
$this->addUsingAlias(OrderTableMap::DELIVERY_ORDER_ADDRESS_ID, $deliveryOrderAddressId['min'], Criteria::GREATER_EQUAL);
|
||||||
$useMinMax = true;
|
$useMinMax = true;
|
||||||
}
|
}
|
||||||
if (isset($addressDelivery['max'])) {
|
if (isset($deliveryOrderAddressId['max'])) {
|
||||||
$this->addUsingAlias(OrderTableMap::ADDRESS_DELIVERY, $addressDelivery['max'], Criteria::LESS_EQUAL);
|
$this->addUsingAlias(OrderTableMap::DELIVERY_ORDER_ADDRESS_ID, $deliveryOrderAddressId['max'], Criteria::LESS_EQUAL);
|
||||||
$useMinMax = true;
|
$useMinMax = true;
|
||||||
}
|
}
|
||||||
if ($useMinMax) {
|
if ($useMinMax) {
|
||||||
@@ -504,7 +516,7 @@ abstract class OrderQuery extends ModelCriteria
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->addUsingAlias(OrderTableMap::ADDRESS_DELIVERY, $addressDelivery, $comparison);
|
return $this->addUsingAlias(OrderTableMap::DELIVERY_ORDER_ADDRESS_ID, $deliveryOrderAddressId, $comparison);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -635,90 +647,90 @@ abstract class OrderQuery extends ModelCriteria
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the query on the transaction column
|
* Filter the query on the transaction_ref column
|
||||||
*
|
*
|
||||||
* Example usage:
|
* Example usage:
|
||||||
* <code>
|
* <code>
|
||||||
* $query->filterByTransaction('fooValue'); // WHERE transaction = 'fooValue'
|
* $query->filterByTransactionRef('fooValue'); // WHERE transaction_ref = 'fooValue'
|
||||||
* $query->filterByTransaction('%fooValue%'); // WHERE transaction LIKE '%fooValue%'
|
* $query->filterByTransactionRef('%fooValue%'); // WHERE transaction_ref LIKE '%fooValue%'
|
||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
* @param string $transaction The value to use as filter.
|
* @param string $transactionRef The value to use as filter.
|
||||||
* Accepts wildcards (* and % trigger a LIKE)
|
* Accepts wildcards (* and % trigger a LIKE)
|
||||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
*
|
*
|
||||||
* @return ChildOrderQuery The current query, for fluid interface
|
* @return ChildOrderQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function filterByTransaction($transaction = null, $comparison = null)
|
public function filterByTransactionRef($transactionRef = null, $comparison = null)
|
||||||
{
|
{
|
||||||
if (null === $comparison) {
|
if (null === $comparison) {
|
||||||
if (is_array($transaction)) {
|
if (is_array($transactionRef)) {
|
||||||
$comparison = Criteria::IN;
|
$comparison = Criteria::IN;
|
||||||
} elseif (preg_match('/[\%\*]/', $transaction)) {
|
} elseif (preg_match('/[\%\*]/', $transactionRef)) {
|
||||||
$transaction = str_replace('*', '%', $transaction);
|
$transactionRef = str_replace('*', '%', $transactionRef);
|
||||||
$comparison = Criteria::LIKE;
|
$comparison = Criteria::LIKE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->addUsingAlias(OrderTableMap::TRANSACTION, $transaction, $comparison);
|
return $this->addUsingAlias(OrderTableMap::TRANSACTION_REF, $transactionRef, $comparison);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the query on the delivery_num column
|
* Filter the query on the delivery_ref column
|
||||||
*
|
*
|
||||||
* Example usage:
|
* Example usage:
|
||||||
* <code>
|
* <code>
|
||||||
* $query->filterByDeliveryNum('fooValue'); // WHERE delivery_num = 'fooValue'
|
* $query->filterByDeliveryRef('fooValue'); // WHERE delivery_ref = 'fooValue'
|
||||||
* $query->filterByDeliveryNum('%fooValue%'); // WHERE delivery_num LIKE '%fooValue%'
|
* $query->filterByDeliveryRef('%fooValue%'); // WHERE delivery_ref LIKE '%fooValue%'
|
||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
* @param string $deliveryNum The value to use as filter.
|
* @param string $deliveryRef The value to use as filter.
|
||||||
* Accepts wildcards (* and % trigger a LIKE)
|
* Accepts wildcards (* and % trigger a LIKE)
|
||||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
*
|
*
|
||||||
* @return ChildOrderQuery The current query, for fluid interface
|
* @return ChildOrderQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function filterByDeliveryNum($deliveryNum = null, $comparison = null)
|
public function filterByDeliveryRef($deliveryRef = null, $comparison = null)
|
||||||
{
|
{
|
||||||
if (null === $comparison) {
|
if (null === $comparison) {
|
||||||
if (is_array($deliveryNum)) {
|
if (is_array($deliveryRef)) {
|
||||||
$comparison = Criteria::IN;
|
$comparison = Criteria::IN;
|
||||||
} elseif (preg_match('/[\%\*]/', $deliveryNum)) {
|
} elseif (preg_match('/[\%\*]/', $deliveryRef)) {
|
||||||
$deliveryNum = str_replace('*', '%', $deliveryNum);
|
$deliveryRef = str_replace('*', '%', $deliveryRef);
|
||||||
$comparison = Criteria::LIKE;
|
$comparison = Criteria::LIKE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->addUsingAlias(OrderTableMap::DELIVERY_NUM, $deliveryNum, $comparison);
|
return $this->addUsingAlias(OrderTableMap::DELIVERY_REF, $deliveryRef, $comparison);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the query on the invoice column
|
* Filter the query on the invoice_ref column
|
||||||
*
|
*
|
||||||
* Example usage:
|
* Example usage:
|
||||||
* <code>
|
* <code>
|
||||||
* $query->filterByInvoice('fooValue'); // WHERE invoice = 'fooValue'
|
* $query->filterByInvoiceRef('fooValue'); // WHERE invoice_ref = 'fooValue'
|
||||||
* $query->filterByInvoice('%fooValue%'); // WHERE invoice LIKE '%fooValue%'
|
* $query->filterByInvoiceRef('%fooValue%'); // WHERE invoice_ref LIKE '%fooValue%'
|
||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
* @param string $invoice The value to use as filter.
|
* @param string $invoiceRef The value to use as filter.
|
||||||
* Accepts wildcards (* and % trigger a LIKE)
|
* Accepts wildcards (* and % trigger a LIKE)
|
||||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
*
|
*
|
||||||
* @return ChildOrderQuery The current query, for fluid interface
|
* @return ChildOrderQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function filterByInvoice($invoice = null, $comparison = null)
|
public function filterByInvoiceRef($invoiceRef = null, $comparison = null)
|
||||||
{
|
{
|
||||||
if (null === $comparison) {
|
if (null === $comparison) {
|
||||||
if (is_array($invoice)) {
|
if (is_array($invoiceRef)) {
|
||||||
$comparison = Criteria::IN;
|
$comparison = Criteria::IN;
|
||||||
} elseif (preg_match('/[\%\*]/', $invoice)) {
|
} elseif (preg_match('/[\%\*]/', $invoiceRef)) {
|
||||||
$invoice = str_replace('*', '%', $invoice);
|
$invoiceRef = str_replace('*', '%', $invoiceRef);
|
||||||
$comparison = Criteria::LIKE;
|
$comparison = Criteria::LIKE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->addUsingAlias(OrderTableMap::INVOICE, $invoice, $comparison);
|
return $this->addUsingAlias(OrderTableMap::INVOICE_REF, $invoiceRef, $comparison);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -763,61 +775,89 @@ abstract class OrderQuery extends ModelCriteria
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the query on the payment column
|
* Filter the query on the payment_module_id column
|
||||||
*
|
*
|
||||||
* Example usage:
|
* Example usage:
|
||||||
* <code>
|
* <code>
|
||||||
* $query->filterByPayment('fooValue'); // WHERE payment = 'fooValue'
|
* $query->filterByPaymentModuleId(1234); // WHERE payment_module_id = 1234
|
||||||
* $query->filterByPayment('%fooValue%'); // WHERE payment LIKE '%fooValue%'
|
* $query->filterByPaymentModuleId(array(12, 34)); // WHERE payment_module_id IN (12, 34)
|
||||||
|
* $query->filterByPaymentModuleId(array('min' => 12)); // WHERE payment_module_id > 12
|
||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
* @param string $payment The value to use as filter.
|
* @see filterByModuleRelatedByPaymentModuleId()
|
||||||
* Accepts wildcards (* and % trigger a LIKE)
|
*
|
||||||
|
* @param mixed $paymentModuleId The value to use as filter.
|
||||||
|
* Use scalar values for equality.
|
||||||
|
* Use array values for in_array() equivalent.
|
||||||
|
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
*
|
*
|
||||||
* @return ChildOrderQuery The current query, for fluid interface
|
* @return ChildOrderQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function filterByPayment($payment = null, $comparison = null)
|
public function filterByPaymentModuleId($paymentModuleId = null, $comparison = null)
|
||||||
{
|
{
|
||||||
if (null === $comparison) {
|
if (is_array($paymentModuleId)) {
|
||||||
if (is_array($payment)) {
|
$useMinMax = false;
|
||||||
|
if (isset($paymentModuleId['min'])) {
|
||||||
|
$this->addUsingAlias(OrderTableMap::PAYMENT_MODULE_ID, $paymentModuleId['min'], Criteria::GREATER_EQUAL);
|
||||||
|
$useMinMax = true;
|
||||||
|
}
|
||||||
|
if (isset($paymentModuleId['max'])) {
|
||||||
|
$this->addUsingAlias(OrderTableMap::PAYMENT_MODULE_ID, $paymentModuleId['max'], Criteria::LESS_EQUAL);
|
||||||
|
$useMinMax = true;
|
||||||
|
}
|
||||||
|
if ($useMinMax) {
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
if (null === $comparison) {
|
||||||
$comparison = Criteria::IN;
|
$comparison = Criteria::IN;
|
||||||
} elseif (preg_match('/[\%\*]/', $payment)) {
|
|
||||||
$payment = str_replace('*', '%', $payment);
|
|
||||||
$comparison = Criteria::LIKE;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->addUsingAlias(OrderTableMap::PAYMENT, $payment, $comparison);
|
return $this->addUsingAlias(OrderTableMap::PAYMENT_MODULE_ID, $paymentModuleId, $comparison);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the query on the carrier column
|
* Filter the query on the delivery_module_id column
|
||||||
*
|
*
|
||||||
* Example usage:
|
* Example usage:
|
||||||
* <code>
|
* <code>
|
||||||
* $query->filterByCarrier('fooValue'); // WHERE carrier = 'fooValue'
|
* $query->filterByDeliveryModuleId(1234); // WHERE delivery_module_id = 1234
|
||||||
* $query->filterByCarrier('%fooValue%'); // WHERE carrier LIKE '%fooValue%'
|
* $query->filterByDeliveryModuleId(array(12, 34)); // WHERE delivery_module_id IN (12, 34)
|
||||||
|
* $query->filterByDeliveryModuleId(array('min' => 12)); // WHERE delivery_module_id > 12
|
||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
* @param string $carrier The value to use as filter.
|
* @see filterByModuleRelatedByDeliveryModuleId()
|
||||||
* Accepts wildcards (* and % trigger a LIKE)
|
*
|
||||||
|
* @param mixed $deliveryModuleId The value to use as filter.
|
||||||
|
* Use scalar values for equality.
|
||||||
|
* Use array values for in_array() equivalent.
|
||||||
|
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
*
|
*
|
||||||
* @return ChildOrderQuery The current query, for fluid interface
|
* @return ChildOrderQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function filterByCarrier($carrier = null, $comparison = null)
|
public function filterByDeliveryModuleId($deliveryModuleId = null, $comparison = null)
|
||||||
{
|
{
|
||||||
if (null === $comparison) {
|
if (is_array($deliveryModuleId)) {
|
||||||
if (is_array($carrier)) {
|
$useMinMax = false;
|
||||||
|
if (isset($deliveryModuleId['min'])) {
|
||||||
|
$this->addUsingAlias(OrderTableMap::DELIVERY_MODULE_ID, $deliveryModuleId['min'], Criteria::GREATER_EQUAL);
|
||||||
|
$useMinMax = true;
|
||||||
|
}
|
||||||
|
if (isset($deliveryModuleId['max'])) {
|
||||||
|
$this->addUsingAlias(OrderTableMap::DELIVERY_MODULE_ID, $deliveryModuleId['max'], Criteria::LESS_EQUAL);
|
||||||
|
$useMinMax = true;
|
||||||
|
}
|
||||||
|
if ($useMinMax) {
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
if (null === $comparison) {
|
||||||
$comparison = Criteria::IN;
|
$comparison = Criteria::IN;
|
||||||
} elseif (preg_match('/[\%\*]/', $carrier)) {
|
|
||||||
$carrier = str_replace('*', '%', $carrier);
|
|
||||||
$comparison = Criteria::LIKE;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->addUsingAlias(OrderTableMap::CARRIER, $carrier, $comparison);
|
return $this->addUsingAlias(OrderTableMap::DELIVERY_MODULE_ID, $deliveryModuleId, $comparison);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -864,32 +904,46 @@ abstract class OrderQuery extends ModelCriteria
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the query on the lang column
|
* Filter the query on the lang_id column
|
||||||
*
|
*
|
||||||
* Example usage:
|
* Example usage:
|
||||||
* <code>
|
* <code>
|
||||||
* $query->filterByLang('fooValue'); // WHERE lang = 'fooValue'
|
* $query->filterByLangId(1234); // WHERE lang_id = 1234
|
||||||
* $query->filterByLang('%fooValue%'); // WHERE lang LIKE '%fooValue%'
|
* $query->filterByLangId(array(12, 34)); // WHERE lang_id IN (12, 34)
|
||||||
|
* $query->filterByLangId(array('min' => 12)); // WHERE lang_id > 12
|
||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
* @param string $lang The value to use as filter.
|
* @see filterByLang()
|
||||||
* Accepts wildcards (* and % trigger a LIKE)
|
*
|
||||||
|
* @param mixed $langId The value to use as filter.
|
||||||
|
* Use scalar values for equality.
|
||||||
|
* Use array values for in_array() equivalent.
|
||||||
|
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
*
|
*
|
||||||
* @return ChildOrderQuery The current query, for fluid interface
|
* @return ChildOrderQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function filterByLang($lang = null, $comparison = null)
|
public function filterByLangId($langId = null, $comparison = null)
|
||||||
{
|
{
|
||||||
if (null === $comparison) {
|
if (is_array($langId)) {
|
||||||
if (is_array($lang)) {
|
$useMinMax = false;
|
||||||
|
if (isset($langId['min'])) {
|
||||||
|
$this->addUsingAlias(OrderTableMap::LANG_ID, $langId['min'], Criteria::GREATER_EQUAL);
|
||||||
|
$useMinMax = true;
|
||||||
|
}
|
||||||
|
if (isset($langId['max'])) {
|
||||||
|
$this->addUsingAlias(OrderTableMap::LANG_ID, $langId['max'], Criteria::LESS_EQUAL);
|
||||||
|
$useMinMax = true;
|
||||||
|
}
|
||||||
|
if ($useMinMax) {
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
if (null === $comparison) {
|
||||||
$comparison = Criteria::IN;
|
$comparison = Criteria::IN;
|
||||||
} elseif (preg_match('/[\%\*]/', $lang)) {
|
|
||||||
$lang = str_replace('*', '%', $lang);
|
|
||||||
$comparison = Criteria::LIKE;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->addUsingAlias(OrderTableMap::LANG, $lang, $comparison);
|
return $this->addUsingAlias(OrderTableMap::LANG_ID, $langId, $comparison);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1011,7 +1065,7 @@ abstract class OrderQuery extends ModelCriteria
|
|||||||
*
|
*
|
||||||
* @return ChildOrderQuery The current query, for fluid interface
|
* @return ChildOrderQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function joinCurrency($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
public function joinCurrency($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||||
{
|
{
|
||||||
$tableMap = $this->getTableMap();
|
$tableMap = $this->getTableMap();
|
||||||
$relationMap = $tableMap->getRelation('Currency');
|
$relationMap = $tableMap->getRelation('Currency');
|
||||||
@@ -1046,7 +1100,7 @@ abstract class OrderQuery extends ModelCriteria
|
|||||||
*
|
*
|
||||||
* @return \Thelia\Model\CurrencyQuery A secondary query class using the current class as primary query
|
* @return \Thelia\Model\CurrencyQuery A secondary query class using the current class as primary query
|
||||||
*/
|
*/
|
||||||
public function useCurrencyQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
public function useCurrencyQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||||
{
|
{
|
||||||
return $this
|
return $this
|
||||||
->joinCurrency($relationAlias, $joinType)
|
->joinCurrency($relationAlias, $joinType)
|
||||||
@@ -1136,35 +1190,35 @@ abstract class OrderQuery extends ModelCriteria
|
|||||||
*
|
*
|
||||||
* @return ChildOrderQuery The current query, for fluid interface
|
* @return ChildOrderQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function filterByOrderAddressRelatedByAddressInvoice($orderAddress, $comparison = null)
|
public function filterByOrderAddressRelatedByInvoiceOrderAddressId($orderAddress, $comparison = null)
|
||||||
{
|
{
|
||||||
if ($orderAddress instanceof \Thelia\Model\OrderAddress) {
|
if ($orderAddress instanceof \Thelia\Model\OrderAddress) {
|
||||||
return $this
|
return $this
|
||||||
->addUsingAlias(OrderTableMap::ADDRESS_INVOICE, $orderAddress->getId(), $comparison);
|
->addUsingAlias(OrderTableMap::INVOICE_ORDER_ADDRESS_ID, $orderAddress->getId(), $comparison);
|
||||||
} elseif ($orderAddress instanceof ObjectCollection) {
|
} elseif ($orderAddress instanceof ObjectCollection) {
|
||||||
if (null === $comparison) {
|
if (null === $comparison) {
|
||||||
$comparison = Criteria::IN;
|
$comparison = Criteria::IN;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this
|
return $this
|
||||||
->addUsingAlias(OrderTableMap::ADDRESS_INVOICE, $orderAddress->toKeyValue('PrimaryKey', 'Id'), $comparison);
|
->addUsingAlias(OrderTableMap::INVOICE_ORDER_ADDRESS_ID, $orderAddress->toKeyValue('PrimaryKey', 'Id'), $comparison);
|
||||||
} else {
|
} else {
|
||||||
throw new PropelException('filterByOrderAddressRelatedByAddressInvoice() only accepts arguments of type \Thelia\Model\OrderAddress or Collection');
|
throw new PropelException('filterByOrderAddressRelatedByInvoiceOrderAddressId() only accepts arguments of type \Thelia\Model\OrderAddress or Collection');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a JOIN clause to the query using the OrderAddressRelatedByAddressInvoice relation
|
* Adds a JOIN clause to the query using the OrderAddressRelatedByInvoiceOrderAddressId relation
|
||||||
*
|
*
|
||||||
* @param string $relationAlias optional alias for the relation
|
* @param string $relationAlias optional alias for the relation
|
||||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||||
*
|
*
|
||||||
* @return ChildOrderQuery The current query, for fluid interface
|
* @return ChildOrderQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function joinOrderAddressRelatedByAddressInvoice($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
public function joinOrderAddressRelatedByInvoiceOrderAddressId($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||||
{
|
{
|
||||||
$tableMap = $this->getTableMap();
|
$tableMap = $this->getTableMap();
|
||||||
$relationMap = $tableMap->getRelation('OrderAddressRelatedByAddressInvoice');
|
$relationMap = $tableMap->getRelation('OrderAddressRelatedByInvoiceOrderAddressId');
|
||||||
|
|
||||||
// create a ModelJoin object for this join
|
// create a ModelJoin object for this join
|
||||||
$join = new ModelJoin();
|
$join = new ModelJoin();
|
||||||
@@ -1179,14 +1233,14 @@ abstract class OrderQuery extends ModelCriteria
|
|||||||
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||||
$this->addJoinObject($join, $relationAlias);
|
$this->addJoinObject($join, $relationAlias);
|
||||||
} else {
|
} else {
|
||||||
$this->addJoinObject($join, 'OrderAddressRelatedByAddressInvoice');
|
$this->addJoinObject($join, 'OrderAddressRelatedByInvoiceOrderAddressId');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Use the OrderAddressRelatedByAddressInvoice relation OrderAddress object
|
* Use the OrderAddressRelatedByInvoiceOrderAddressId relation OrderAddress object
|
||||||
*
|
*
|
||||||
* @see useQuery()
|
* @see useQuery()
|
||||||
*
|
*
|
||||||
@@ -1196,11 +1250,11 @@ abstract class OrderQuery extends ModelCriteria
|
|||||||
*
|
*
|
||||||
* @return \Thelia\Model\OrderAddressQuery A secondary query class using the current class as primary query
|
* @return \Thelia\Model\OrderAddressQuery A secondary query class using the current class as primary query
|
||||||
*/
|
*/
|
||||||
public function useOrderAddressRelatedByAddressInvoiceQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
public function useOrderAddressRelatedByInvoiceOrderAddressIdQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||||
{
|
{
|
||||||
return $this
|
return $this
|
||||||
->joinOrderAddressRelatedByAddressInvoice($relationAlias, $joinType)
|
->joinOrderAddressRelatedByInvoiceOrderAddressId($relationAlias, $joinType)
|
||||||
->useQuery($relationAlias ? $relationAlias : 'OrderAddressRelatedByAddressInvoice', '\Thelia\Model\OrderAddressQuery');
|
->useQuery($relationAlias ? $relationAlias : 'OrderAddressRelatedByInvoiceOrderAddressId', '\Thelia\Model\OrderAddressQuery');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1211,35 +1265,35 @@ abstract class OrderQuery extends ModelCriteria
|
|||||||
*
|
*
|
||||||
* @return ChildOrderQuery The current query, for fluid interface
|
* @return ChildOrderQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function filterByOrderAddressRelatedByAddressDelivery($orderAddress, $comparison = null)
|
public function filterByOrderAddressRelatedByDeliveryOrderAddressId($orderAddress, $comparison = null)
|
||||||
{
|
{
|
||||||
if ($orderAddress instanceof \Thelia\Model\OrderAddress) {
|
if ($orderAddress instanceof \Thelia\Model\OrderAddress) {
|
||||||
return $this
|
return $this
|
||||||
->addUsingAlias(OrderTableMap::ADDRESS_DELIVERY, $orderAddress->getId(), $comparison);
|
->addUsingAlias(OrderTableMap::DELIVERY_ORDER_ADDRESS_ID, $orderAddress->getId(), $comparison);
|
||||||
} elseif ($orderAddress instanceof ObjectCollection) {
|
} elseif ($orderAddress instanceof ObjectCollection) {
|
||||||
if (null === $comparison) {
|
if (null === $comparison) {
|
||||||
$comparison = Criteria::IN;
|
$comparison = Criteria::IN;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this
|
return $this
|
||||||
->addUsingAlias(OrderTableMap::ADDRESS_DELIVERY, $orderAddress->toKeyValue('PrimaryKey', 'Id'), $comparison);
|
->addUsingAlias(OrderTableMap::DELIVERY_ORDER_ADDRESS_ID, $orderAddress->toKeyValue('PrimaryKey', 'Id'), $comparison);
|
||||||
} else {
|
} else {
|
||||||
throw new PropelException('filterByOrderAddressRelatedByAddressDelivery() only accepts arguments of type \Thelia\Model\OrderAddress or Collection');
|
throw new PropelException('filterByOrderAddressRelatedByDeliveryOrderAddressId() only accepts arguments of type \Thelia\Model\OrderAddress or Collection');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a JOIN clause to the query using the OrderAddressRelatedByAddressDelivery relation
|
* Adds a JOIN clause to the query using the OrderAddressRelatedByDeliveryOrderAddressId relation
|
||||||
*
|
*
|
||||||
* @param string $relationAlias optional alias for the relation
|
* @param string $relationAlias optional alias for the relation
|
||||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||||
*
|
*
|
||||||
* @return ChildOrderQuery The current query, for fluid interface
|
* @return ChildOrderQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function joinOrderAddressRelatedByAddressDelivery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
public function joinOrderAddressRelatedByDeliveryOrderAddressId($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||||
{
|
{
|
||||||
$tableMap = $this->getTableMap();
|
$tableMap = $this->getTableMap();
|
||||||
$relationMap = $tableMap->getRelation('OrderAddressRelatedByAddressDelivery');
|
$relationMap = $tableMap->getRelation('OrderAddressRelatedByDeliveryOrderAddressId');
|
||||||
|
|
||||||
// create a ModelJoin object for this join
|
// create a ModelJoin object for this join
|
||||||
$join = new ModelJoin();
|
$join = new ModelJoin();
|
||||||
@@ -1254,14 +1308,14 @@ abstract class OrderQuery extends ModelCriteria
|
|||||||
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||||
$this->addJoinObject($join, $relationAlias);
|
$this->addJoinObject($join, $relationAlias);
|
||||||
} else {
|
} else {
|
||||||
$this->addJoinObject($join, 'OrderAddressRelatedByAddressDelivery');
|
$this->addJoinObject($join, 'OrderAddressRelatedByDeliveryOrderAddressId');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Use the OrderAddressRelatedByAddressDelivery relation OrderAddress object
|
* Use the OrderAddressRelatedByDeliveryOrderAddressId relation OrderAddress object
|
||||||
*
|
*
|
||||||
* @see useQuery()
|
* @see useQuery()
|
||||||
*
|
*
|
||||||
@@ -1271,11 +1325,11 @@ abstract class OrderQuery extends ModelCriteria
|
|||||||
*
|
*
|
||||||
* @return \Thelia\Model\OrderAddressQuery A secondary query class using the current class as primary query
|
* @return \Thelia\Model\OrderAddressQuery A secondary query class using the current class as primary query
|
||||||
*/
|
*/
|
||||||
public function useOrderAddressRelatedByAddressDeliveryQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
public function useOrderAddressRelatedByDeliveryOrderAddressIdQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||||
{
|
{
|
||||||
return $this
|
return $this
|
||||||
->joinOrderAddressRelatedByAddressDelivery($relationAlias, $joinType)
|
->joinOrderAddressRelatedByDeliveryOrderAddressId($relationAlias, $joinType)
|
||||||
->useQuery($relationAlias ? $relationAlias : 'OrderAddressRelatedByAddressDelivery', '\Thelia\Model\OrderAddressQuery');
|
->useQuery($relationAlias ? $relationAlias : 'OrderAddressRelatedByDeliveryOrderAddressId', '\Thelia\Model\OrderAddressQuery');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1311,7 +1365,7 @@ abstract class OrderQuery extends ModelCriteria
|
|||||||
*
|
*
|
||||||
* @return ChildOrderQuery The current query, for fluid interface
|
* @return ChildOrderQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function joinOrderStatus($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
public function joinOrderStatus($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||||
{
|
{
|
||||||
$tableMap = $this->getTableMap();
|
$tableMap = $this->getTableMap();
|
||||||
$relationMap = $tableMap->getRelation('OrderStatus');
|
$relationMap = $tableMap->getRelation('OrderStatus');
|
||||||
@@ -1346,13 +1400,238 @@ abstract class OrderQuery extends ModelCriteria
|
|||||||
*
|
*
|
||||||
* @return \Thelia\Model\OrderStatusQuery A secondary query class using the current class as primary query
|
* @return \Thelia\Model\OrderStatusQuery A secondary query class using the current class as primary query
|
||||||
*/
|
*/
|
||||||
public function useOrderStatusQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
public function useOrderStatusQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||||
{
|
{
|
||||||
return $this
|
return $this
|
||||||
->joinOrderStatus($relationAlias, $joinType)
|
->joinOrderStatus($relationAlias, $joinType)
|
||||||
->useQuery($relationAlias ? $relationAlias : 'OrderStatus', '\Thelia\Model\OrderStatusQuery');
|
->useQuery($relationAlias ? $relationAlias : 'OrderStatus', '\Thelia\Model\OrderStatusQuery');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query by a related \Thelia\Model\Module object
|
||||||
|
*
|
||||||
|
* @param \Thelia\Model\Module|ObjectCollection $module The related object(s) to use as filter
|
||||||
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
|
*
|
||||||
|
* @return ChildOrderQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByModuleRelatedByPaymentModuleId($module, $comparison = null)
|
||||||
|
{
|
||||||
|
if ($module instanceof \Thelia\Model\Module) {
|
||||||
|
return $this
|
||||||
|
->addUsingAlias(OrderTableMap::PAYMENT_MODULE_ID, $module->getId(), $comparison);
|
||||||
|
} elseif ($module instanceof ObjectCollection) {
|
||||||
|
if (null === $comparison) {
|
||||||
|
$comparison = Criteria::IN;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this
|
||||||
|
->addUsingAlias(OrderTableMap::PAYMENT_MODULE_ID, $module->toKeyValue('PrimaryKey', 'Id'), $comparison);
|
||||||
|
} else {
|
||||||
|
throw new PropelException('filterByModuleRelatedByPaymentModuleId() only accepts arguments of type \Thelia\Model\Module or Collection');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a JOIN clause to the query using the ModuleRelatedByPaymentModuleId relation
|
||||||
|
*
|
||||||
|
* @param string $relationAlias optional alias for the relation
|
||||||
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||||
|
*
|
||||||
|
* @return ChildOrderQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function joinModuleRelatedByPaymentModuleId($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||||
|
{
|
||||||
|
$tableMap = $this->getTableMap();
|
||||||
|
$relationMap = $tableMap->getRelation('ModuleRelatedByPaymentModuleId');
|
||||||
|
|
||||||
|
// create a ModelJoin object for this join
|
||||||
|
$join = new ModelJoin();
|
||||||
|
$join->setJoinType($joinType);
|
||||||
|
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
|
||||||
|
if ($previousJoin = $this->getPreviousJoin()) {
|
||||||
|
$join->setPreviousJoin($previousJoin);
|
||||||
|
}
|
||||||
|
|
||||||
|
// add the ModelJoin to the current object
|
||||||
|
if ($relationAlias) {
|
||||||
|
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||||
|
$this->addJoinObject($join, $relationAlias);
|
||||||
|
} else {
|
||||||
|
$this->addJoinObject($join, 'ModuleRelatedByPaymentModuleId');
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use the ModuleRelatedByPaymentModuleId relation Module object
|
||||||
|
*
|
||||||
|
* @see useQuery()
|
||||||
|
*
|
||||||
|
* @param string $relationAlias optional alias for the relation,
|
||||||
|
* to be used as main alias in the secondary query
|
||||||
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||||
|
*
|
||||||
|
* @return \Thelia\Model\ModuleQuery A secondary query class using the current class as primary query
|
||||||
|
*/
|
||||||
|
public function useModuleRelatedByPaymentModuleIdQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||||
|
{
|
||||||
|
return $this
|
||||||
|
->joinModuleRelatedByPaymentModuleId($relationAlias, $joinType)
|
||||||
|
->useQuery($relationAlias ? $relationAlias : 'ModuleRelatedByPaymentModuleId', '\Thelia\Model\ModuleQuery');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query by a related \Thelia\Model\Module object
|
||||||
|
*
|
||||||
|
* @param \Thelia\Model\Module|ObjectCollection $module The related object(s) to use as filter
|
||||||
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
|
*
|
||||||
|
* @return ChildOrderQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByModuleRelatedByDeliveryModuleId($module, $comparison = null)
|
||||||
|
{
|
||||||
|
if ($module instanceof \Thelia\Model\Module) {
|
||||||
|
return $this
|
||||||
|
->addUsingAlias(OrderTableMap::DELIVERY_MODULE_ID, $module->getId(), $comparison);
|
||||||
|
} elseif ($module instanceof ObjectCollection) {
|
||||||
|
if (null === $comparison) {
|
||||||
|
$comparison = Criteria::IN;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this
|
||||||
|
->addUsingAlias(OrderTableMap::DELIVERY_MODULE_ID, $module->toKeyValue('PrimaryKey', 'Id'), $comparison);
|
||||||
|
} else {
|
||||||
|
throw new PropelException('filterByModuleRelatedByDeliveryModuleId() only accepts arguments of type \Thelia\Model\Module or Collection');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a JOIN clause to the query using the ModuleRelatedByDeliveryModuleId relation
|
||||||
|
*
|
||||||
|
* @param string $relationAlias optional alias for the relation
|
||||||
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||||
|
*
|
||||||
|
* @return ChildOrderQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function joinModuleRelatedByDeliveryModuleId($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||||
|
{
|
||||||
|
$tableMap = $this->getTableMap();
|
||||||
|
$relationMap = $tableMap->getRelation('ModuleRelatedByDeliveryModuleId');
|
||||||
|
|
||||||
|
// create a ModelJoin object for this join
|
||||||
|
$join = new ModelJoin();
|
||||||
|
$join->setJoinType($joinType);
|
||||||
|
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
|
||||||
|
if ($previousJoin = $this->getPreviousJoin()) {
|
||||||
|
$join->setPreviousJoin($previousJoin);
|
||||||
|
}
|
||||||
|
|
||||||
|
// add the ModelJoin to the current object
|
||||||
|
if ($relationAlias) {
|
||||||
|
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||||
|
$this->addJoinObject($join, $relationAlias);
|
||||||
|
} else {
|
||||||
|
$this->addJoinObject($join, 'ModuleRelatedByDeliveryModuleId');
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use the ModuleRelatedByDeliveryModuleId relation Module object
|
||||||
|
*
|
||||||
|
* @see useQuery()
|
||||||
|
*
|
||||||
|
* @param string $relationAlias optional alias for the relation,
|
||||||
|
* to be used as main alias in the secondary query
|
||||||
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||||
|
*
|
||||||
|
* @return \Thelia\Model\ModuleQuery A secondary query class using the current class as primary query
|
||||||
|
*/
|
||||||
|
public function useModuleRelatedByDeliveryModuleIdQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||||
|
{
|
||||||
|
return $this
|
||||||
|
->joinModuleRelatedByDeliveryModuleId($relationAlias, $joinType)
|
||||||
|
->useQuery($relationAlias ? $relationAlias : 'ModuleRelatedByDeliveryModuleId', '\Thelia\Model\ModuleQuery');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query by a related \Thelia\Model\Lang object
|
||||||
|
*
|
||||||
|
* @param \Thelia\Model\Lang|ObjectCollection $lang The related object(s) to use as filter
|
||||||
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
|
*
|
||||||
|
* @return ChildOrderQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByLang($lang, $comparison = null)
|
||||||
|
{
|
||||||
|
if ($lang instanceof \Thelia\Model\Lang) {
|
||||||
|
return $this
|
||||||
|
->addUsingAlias(OrderTableMap::LANG_ID, $lang->getId(), $comparison);
|
||||||
|
} elseif ($lang instanceof ObjectCollection) {
|
||||||
|
if (null === $comparison) {
|
||||||
|
$comparison = Criteria::IN;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this
|
||||||
|
->addUsingAlias(OrderTableMap::LANG_ID, $lang->toKeyValue('PrimaryKey', 'Id'), $comparison);
|
||||||
|
} else {
|
||||||
|
throw new PropelException('filterByLang() only accepts arguments of type \Thelia\Model\Lang or Collection');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a JOIN clause to the query using the Lang relation
|
||||||
|
*
|
||||||
|
* @param string $relationAlias optional alias for the relation
|
||||||
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||||
|
*
|
||||||
|
* @return ChildOrderQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function joinLang($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||||
|
{
|
||||||
|
$tableMap = $this->getTableMap();
|
||||||
|
$relationMap = $tableMap->getRelation('Lang');
|
||||||
|
|
||||||
|
// create a ModelJoin object for this join
|
||||||
|
$join = new ModelJoin();
|
||||||
|
$join->setJoinType($joinType);
|
||||||
|
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
|
||||||
|
if ($previousJoin = $this->getPreviousJoin()) {
|
||||||
|
$join->setPreviousJoin($previousJoin);
|
||||||
|
}
|
||||||
|
|
||||||
|
// add the ModelJoin to the current object
|
||||||
|
if ($relationAlias) {
|
||||||
|
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||||
|
$this->addJoinObject($join, $relationAlias);
|
||||||
|
} else {
|
||||||
|
$this->addJoinObject($join, 'Lang');
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use the Lang relation Lang object
|
||||||
|
*
|
||||||
|
* @see useQuery()
|
||||||
|
*
|
||||||
|
* @param string $relationAlias optional alias for the relation,
|
||||||
|
* to be used as main alias in the secondary query
|
||||||
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||||
|
*
|
||||||
|
* @return \Thelia\Model\LangQuery A secondary query class using the current class as primary query
|
||||||
|
*/
|
||||||
|
public function useLangQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||||
|
{
|
||||||
|
return $this
|
||||||
|
->joinLang($relationAlias, $joinType)
|
||||||
|
->useQuery($relationAlias ? $relationAlias : 'Lang', '\Thelia\Model\LangQuery');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the query by a related \Thelia\Model\OrderProduct object
|
* Filter the query by a related \Thelia\Model\OrderProduct object
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -791,10 +791,9 @@ abstract class OrderStatus implements ActiveRecordInterface
|
|||||||
|
|
||||||
if ($this->ordersScheduledForDeletion !== null) {
|
if ($this->ordersScheduledForDeletion !== null) {
|
||||||
if (!$this->ordersScheduledForDeletion->isEmpty()) {
|
if (!$this->ordersScheduledForDeletion->isEmpty()) {
|
||||||
foreach ($this->ordersScheduledForDeletion as $order) {
|
\Thelia\Model\OrderQuery::create()
|
||||||
// need to save related object because we set the relation to null
|
->filterByPrimaryKeys($this->ordersScheduledForDeletion->getPrimaryKeys(false))
|
||||||
$order->save($con);
|
->delete($con);
|
||||||
}
|
|
||||||
$this->ordersScheduledForDeletion = null;
|
$this->ordersScheduledForDeletion = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1439,7 +1438,7 @@ abstract class OrderStatus implements ActiveRecordInterface
|
|||||||
$this->ordersScheduledForDeletion = clone $this->collOrders;
|
$this->ordersScheduledForDeletion = clone $this->collOrders;
|
||||||
$this->ordersScheduledForDeletion->clear();
|
$this->ordersScheduledForDeletion->clear();
|
||||||
}
|
}
|
||||||
$this->ordersScheduledForDeletion[]= $order;
|
$this->ordersScheduledForDeletion[]= clone $order;
|
||||||
$order->setOrderStatus(null);
|
$order->setOrderStatus(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1513,10 +1512,10 @@ abstract class OrderStatus implements ActiveRecordInterface
|
|||||||
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||||
* @return Collection|ChildOrder[] List of ChildOrder objects
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
*/
|
*/
|
||||||
public function getOrdersJoinOrderAddressRelatedByAddressInvoice($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
public function getOrdersJoinOrderAddressRelatedByInvoiceOrderAddressId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
||||||
{
|
{
|
||||||
$query = ChildOrderQuery::create(null, $criteria);
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
$query->joinWith('OrderAddressRelatedByAddressInvoice', $joinBehavior);
|
$query->joinWith('OrderAddressRelatedByInvoiceOrderAddressId', $joinBehavior);
|
||||||
|
|
||||||
return $this->getOrders($query, $con);
|
return $this->getOrders($query, $con);
|
||||||
}
|
}
|
||||||
@@ -1538,10 +1537,85 @@ abstract class OrderStatus implements ActiveRecordInterface
|
|||||||
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||||
* @return Collection|ChildOrder[] List of ChildOrder objects
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
*/
|
*/
|
||||||
public function getOrdersJoinOrderAddressRelatedByAddressDelivery($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
public function getOrdersJoinOrderAddressRelatedByDeliveryOrderAddressId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
||||||
{
|
{
|
||||||
$query = ChildOrderQuery::create(null, $criteria);
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
$query->joinWith('OrderAddressRelatedByAddressDelivery', $joinBehavior);
|
$query->joinWith('OrderAddressRelatedByDeliveryOrderAddressId', $joinBehavior);
|
||||||
|
|
||||||
|
return $this->getOrders($query, $con);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If this collection has already been initialized with
|
||||||
|
* an identical criteria, it returns the collection.
|
||||||
|
* Otherwise if this OrderStatus is new, it will return
|
||||||
|
* an empty collection; or if this OrderStatus has previously
|
||||||
|
* been saved, it will retrieve related Orders from storage.
|
||||||
|
*
|
||||||
|
* This method is protected by default in order to keep the public
|
||||||
|
* api reasonable. You can provide public methods for those you
|
||||||
|
* actually need in OrderStatus.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||||
|
* @param ConnectionInterface $con optional connection object
|
||||||
|
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||||
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
|
*/
|
||||||
|
public function getOrdersJoinModuleRelatedByPaymentModuleId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
||||||
|
{
|
||||||
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
|
$query->joinWith('ModuleRelatedByPaymentModuleId', $joinBehavior);
|
||||||
|
|
||||||
|
return $this->getOrders($query, $con);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If this collection has already been initialized with
|
||||||
|
* an identical criteria, it returns the collection.
|
||||||
|
* Otherwise if this OrderStatus is new, it will return
|
||||||
|
* an empty collection; or if this OrderStatus has previously
|
||||||
|
* been saved, it will retrieve related Orders from storage.
|
||||||
|
*
|
||||||
|
* This method is protected by default in order to keep the public
|
||||||
|
* api reasonable. You can provide public methods for those you
|
||||||
|
* actually need in OrderStatus.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||||
|
* @param ConnectionInterface $con optional connection object
|
||||||
|
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||||
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
|
*/
|
||||||
|
public function getOrdersJoinModuleRelatedByDeliveryModuleId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
||||||
|
{
|
||||||
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
|
$query->joinWith('ModuleRelatedByDeliveryModuleId', $joinBehavior);
|
||||||
|
|
||||||
|
return $this->getOrders($query, $con);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If this collection has already been initialized with
|
||||||
|
* an identical criteria, it returns the collection.
|
||||||
|
* Otherwise if this OrderStatus is new, it will return
|
||||||
|
* an empty collection; or if this OrderStatus has previously
|
||||||
|
* been saved, it will retrieve related Orders from storage.
|
||||||
|
*
|
||||||
|
* This method is protected by default in order to keep the public
|
||||||
|
* api reasonable. You can provide public methods for those you
|
||||||
|
* actually need in OrderStatus.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||||
|
* @param ConnectionInterface $con optional connection object
|
||||||
|
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||||
|
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||||
|
*/
|
||||||
|
public function getOrdersJoinLang($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
||||||
|
{
|
||||||
|
$query = ChildOrderQuery::create(null, $criteria);
|
||||||
|
$query->joinWith('Lang', $joinBehavior);
|
||||||
|
|
||||||
return $this->getOrders($query, $con);
|
return $this->getOrders($query, $con);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -420,7 +420,7 @@ abstract class OrderStatusQuery extends ModelCriteria
|
|||||||
*
|
*
|
||||||
* @return ChildOrderStatusQuery The current query, for fluid interface
|
* @return ChildOrderStatusQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function joinOrder($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
public function joinOrder($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||||
{
|
{
|
||||||
$tableMap = $this->getTableMap();
|
$tableMap = $this->getTableMap();
|
||||||
$relationMap = $tableMap->getRelation('Order');
|
$relationMap = $tableMap->getRelation('Order');
|
||||||
@@ -455,7 +455,7 @@ abstract class OrderStatusQuery extends ModelCriteria
|
|||||||
*
|
*
|
||||||
* @return \Thelia\Model\OrderQuery A secondary query class using the current class as primary query
|
* @return \Thelia\Model\OrderQuery A secondary query class using the current class as primary query
|
||||||
*/
|
*/
|
||||||
public function useOrderQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
public function useOrderQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||||
{
|
{
|
||||||
return $this
|
return $this
|
||||||
->joinOrder($relationAlias, $joinType)
|
->joinOrder($relationAlias, $joinType)
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ class CurrencyTableMap extends TableMap
|
|||||||
*/
|
*/
|
||||||
public function buildRelations()
|
public function buildRelations()
|
||||||
{
|
{
|
||||||
$this->addRelation('Order', '\\Thelia\\Model\\Order', RelationMap::ONE_TO_MANY, array('id' => 'currency_id', ), 'SET NULL', 'RESTRICT', 'Orders');
|
$this->addRelation('Order', '\\Thelia\\Model\\Order', RelationMap::ONE_TO_MANY, array('id' => 'currency_id', ), 'RESTRICT', 'RESTRICT', 'Orders');
|
||||||
$this->addRelation('Cart', '\\Thelia\\Model\\Cart', RelationMap::ONE_TO_MANY, array('id' => 'currency_id', ), null, null, 'Carts');
|
$this->addRelation('Cart', '\\Thelia\\Model\\Cart', RelationMap::ONE_TO_MANY, array('id' => 'currency_id', ), null, null, 'Carts');
|
||||||
$this->addRelation('ProductPrice', '\\Thelia\\Model\\ProductPrice', RelationMap::ONE_TO_MANY, array('id' => 'currency_id', ), 'CASCADE', null, 'ProductPrices');
|
$this->addRelation('ProductPrice', '\\Thelia\\Model\\ProductPrice', RelationMap::ONE_TO_MANY, array('id' => 'currency_id', ), 'CASCADE', null, 'ProductPrices');
|
||||||
$this->addRelation('CurrencyI18n', '\\Thelia\\Model\\CurrencyI18n', RelationMap::ONE_TO_MANY, array('id' => 'id', ), 'CASCADE', null, 'CurrencyI18ns');
|
$this->addRelation('CurrencyI18n', '\\Thelia\\Model\\CurrencyI18n', RelationMap::ONE_TO_MANY, array('id' => 'id', ), 'CASCADE', null, 'CurrencyI18ns');
|
||||||
@@ -210,7 +210,6 @@ class CurrencyTableMap extends TableMap
|
|||||||
{
|
{
|
||||||
// Invalidate objects in ".$this->getClassNameFromBuilder($joinedTableTableMapBuilder)." instance pool,
|
// Invalidate objects in ".$this->getClassNameFromBuilder($joinedTableTableMapBuilder)." instance pool,
|
||||||
// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
|
// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
|
||||||
OrderTableMap::clearInstancePool();
|
|
||||||
ProductPriceTableMap::clearInstancePool();
|
ProductPriceTableMap::clearInstancePool();
|
||||||
CurrencyI18nTableMap::clearInstancePool();
|
CurrencyI18nTableMap::clearInstancePool();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -225,7 +225,7 @@ class CustomerTableMap extends TableMap
|
|||||||
{
|
{
|
||||||
$this->addRelation('CustomerTitle', '\\Thelia\\Model\\CustomerTitle', RelationMap::MANY_TO_ONE, array('title_id' => 'id', ), 'RESTRICT', 'RESTRICT');
|
$this->addRelation('CustomerTitle', '\\Thelia\\Model\\CustomerTitle', RelationMap::MANY_TO_ONE, array('title_id' => 'id', ), 'RESTRICT', 'RESTRICT');
|
||||||
$this->addRelation('Address', '\\Thelia\\Model\\Address', RelationMap::ONE_TO_MANY, array('id' => 'customer_id', ), 'CASCADE', 'RESTRICT', 'Addresses');
|
$this->addRelation('Address', '\\Thelia\\Model\\Address', RelationMap::ONE_TO_MANY, array('id' => 'customer_id', ), 'CASCADE', 'RESTRICT', 'Addresses');
|
||||||
$this->addRelation('Order', '\\Thelia\\Model\\Order', RelationMap::ONE_TO_MANY, array('id' => 'customer_id', ), 'CASCADE', 'RESTRICT', 'Orders');
|
$this->addRelation('Order', '\\Thelia\\Model\\Order', RelationMap::ONE_TO_MANY, array('id' => 'customer_id', ), 'RESTRICT', 'RESTRICT', 'Orders');
|
||||||
$this->addRelation('Cart', '\\Thelia\\Model\\Cart', RelationMap::ONE_TO_MANY, array('id' => 'customer_id', ), null, null, 'Carts');
|
$this->addRelation('Cart', '\\Thelia\\Model\\Cart', RelationMap::ONE_TO_MANY, array('id' => 'customer_id', ), null, null, 'Carts');
|
||||||
} // buildRelations()
|
} // buildRelations()
|
||||||
|
|
||||||
@@ -249,7 +249,6 @@ class CustomerTableMap extends TableMap
|
|||||||
// Invalidate objects in ".$this->getClassNameFromBuilder($joinedTableTableMapBuilder)." instance pool,
|
// Invalidate objects in ".$this->getClassNameFromBuilder($joinedTableTableMapBuilder)." instance pool,
|
||||||
// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
|
// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
|
||||||
AddressTableMap::clearInstancePool();
|
AddressTableMap::clearInstancePool();
|
||||||
OrderTableMap::clearInstancePool();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -217,6 +217,7 @@ class LangTableMap extends TableMap
|
|||||||
*/
|
*/
|
||||||
public function buildRelations()
|
public function buildRelations()
|
||||||
{
|
{
|
||||||
|
$this->addRelation('Order', '\\Thelia\\Model\\Order', RelationMap::ONE_TO_MANY, array('id' => 'lang_id', ), 'RESTRICT', 'RESTRICT', 'Orders');
|
||||||
} // buildRelations()
|
} // buildRelations()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -184,6 +184,8 @@ class ModuleTableMap extends TableMap
|
|||||||
*/
|
*/
|
||||||
public function buildRelations()
|
public function buildRelations()
|
||||||
{
|
{
|
||||||
|
$this->addRelation('OrderRelatedByPaymentModuleId', '\\Thelia\\Model\\Order', RelationMap::ONE_TO_MANY, array('id' => 'payment_module_id', ), 'RESTRICT', 'RESTRICT', 'OrdersRelatedByPaymentModuleId');
|
||||||
|
$this->addRelation('OrderRelatedByDeliveryModuleId', '\\Thelia\\Model\\Order', RelationMap::ONE_TO_MANY, array('id' => 'delivery_module_id', ), 'RESTRICT', 'RESTRICT', 'OrdersRelatedByDeliveryModuleId');
|
||||||
$this->addRelation('GroupModule', '\\Thelia\\Model\\GroupModule', RelationMap::ONE_TO_MANY, array('id' => 'module_id', ), 'CASCADE', 'RESTRICT', 'GroupModules');
|
$this->addRelation('GroupModule', '\\Thelia\\Model\\GroupModule', RelationMap::ONE_TO_MANY, array('id' => 'module_id', ), 'CASCADE', 'RESTRICT', 'GroupModules');
|
||||||
$this->addRelation('ModuleI18n', '\\Thelia\\Model\\ModuleI18n', RelationMap::ONE_TO_MANY, array('id' => 'id', ), 'CASCADE', null, 'ModuleI18ns');
|
$this->addRelation('ModuleI18n', '\\Thelia\\Model\\ModuleI18n', RelationMap::ONE_TO_MANY, array('id' => 'id', ), 'CASCADE', null, 'ModuleI18ns');
|
||||||
} // buildRelations()
|
} // buildRelations()
|
||||||
|
|||||||
@@ -211,8 +211,8 @@ class OrderAddressTableMap extends TableMap
|
|||||||
*/
|
*/
|
||||||
public function buildRelations()
|
public function buildRelations()
|
||||||
{
|
{
|
||||||
$this->addRelation('OrderRelatedByAddressInvoice', '\\Thelia\\Model\\Order', RelationMap::ONE_TO_MANY, array('id' => 'address_invoice', ), 'SET NULL', 'RESTRICT', 'OrdersRelatedByAddressInvoice');
|
$this->addRelation('OrderRelatedByInvoiceOrderAddressId', '\\Thelia\\Model\\Order', RelationMap::ONE_TO_MANY, array('id' => 'invoice_order_address_id', ), 'RESTRICT', 'RESTRICT', 'OrdersRelatedByInvoiceOrderAddressId');
|
||||||
$this->addRelation('OrderRelatedByAddressDelivery', '\\Thelia\\Model\\Order', RelationMap::ONE_TO_MANY, array('id' => 'address_delivery', ), 'SET NULL', 'RESTRICT', 'OrdersRelatedByAddressDelivery');
|
$this->addRelation('OrderRelatedByDeliveryOrderAddressId', '\\Thelia\\Model\\Order', RelationMap::ONE_TO_MANY, array('id' => 'delivery_order_address_id', ), 'RESTRICT', 'RESTRICT', 'OrdersRelatedByDeliveryOrderAddressId');
|
||||||
} // buildRelations()
|
} // buildRelations()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -227,15 +227,6 @@ class OrderAddressTableMap extends TableMap
|
|||||||
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', ),
|
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', ),
|
||||||
);
|
);
|
||||||
} // getBehaviors()
|
} // getBehaviors()
|
||||||
/**
|
|
||||||
* Method to invalidate the instance pool of all tables related to order_address * by a foreign key with ON DELETE CASCADE
|
|
||||||
*/
|
|
||||||
public static function clearRelatedInstancePool()
|
|
||||||
{
|
|
||||||
// Invalidate objects in ".$this->getClassNameFromBuilder($joinedTableTableMapBuilder)." instance pool,
|
|
||||||
// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
|
|
||||||
OrderTableMap::clearInstancePool();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table.
|
* Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table.
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ class OrderStatusTableMap extends TableMap
|
|||||||
*/
|
*/
|
||||||
public function buildRelations()
|
public function buildRelations()
|
||||||
{
|
{
|
||||||
$this->addRelation('Order', '\\Thelia\\Model\\Order', RelationMap::ONE_TO_MANY, array('id' => 'status_id', ), 'SET NULL', 'RESTRICT', 'Orders');
|
$this->addRelation('Order', '\\Thelia\\Model\\Order', RelationMap::ONE_TO_MANY, array('id' => 'status_id', ), 'RESTRICT', 'RESTRICT', 'Orders');
|
||||||
$this->addRelation('OrderStatusI18n', '\\Thelia\\Model\\OrderStatusI18n', RelationMap::ONE_TO_MANY, array('id' => 'id', ), 'CASCADE', null, 'OrderStatusI18ns');
|
$this->addRelation('OrderStatusI18n', '\\Thelia\\Model\\OrderStatusI18n', RelationMap::ONE_TO_MANY, array('id' => 'id', ), 'CASCADE', null, 'OrderStatusI18ns');
|
||||||
} // buildRelations()
|
} // buildRelations()
|
||||||
|
|
||||||
@@ -184,7 +184,6 @@ class OrderStatusTableMap extends TableMap
|
|||||||
{
|
{
|
||||||
// Invalidate objects in ".$this->getClassNameFromBuilder($joinedTableTableMapBuilder)." instance pool,
|
// Invalidate objects in ".$this->getClassNameFromBuilder($joinedTableTableMapBuilder)." instance pool,
|
||||||
// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
|
// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
|
||||||
OrderTableMap::clearInstancePool();
|
|
||||||
OrderStatusI18nTableMap::clearInstancePool();
|
OrderStatusI18nTableMap::clearInstancePool();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -85,14 +85,14 @@ class OrderTableMap extends TableMap
|
|||||||
const CUSTOMER_ID = 'order.CUSTOMER_ID';
|
const CUSTOMER_ID = 'order.CUSTOMER_ID';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the column name for the ADDRESS_INVOICE field
|
* the column name for the INVOICE_ORDER_ADDRESS_ID field
|
||||||
*/
|
*/
|
||||||
const ADDRESS_INVOICE = 'order.ADDRESS_INVOICE';
|
const INVOICE_ORDER_ADDRESS_ID = 'order.INVOICE_ORDER_ADDRESS_ID';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the column name for the ADDRESS_DELIVERY field
|
* the column name for the DELIVERY_ORDER_ADDRESS_ID field
|
||||||
*/
|
*/
|
||||||
const ADDRESS_DELIVERY = 'order.ADDRESS_DELIVERY';
|
const DELIVERY_ORDER_ADDRESS_ID = 'order.DELIVERY_ORDER_ADDRESS_ID';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the column name for the INVOICE_DATE field
|
* the column name for the INVOICE_DATE field
|
||||||
@@ -110,19 +110,19 @@ class OrderTableMap extends TableMap
|
|||||||
const CURRENCY_RATE = 'order.CURRENCY_RATE';
|
const CURRENCY_RATE = 'order.CURRENCY_RATE';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the column name for the TRANSACTION field
|
* the column name for the TRANSACTION_REF field
|
||||||
*/
|
*/
|
||||||
const TRANSACTION = 'order.TRANSACTION';
|
const TRANSACTION_REF = 'order.TRANSACTION_REF';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the column name for the DELIVERY_NUM field
|
* the column name for the DELIVERY_REF field
|
||||||
*/
|
*/
|
||||||
const DELIVERY_NUM = 'order.DELIVERY_NUM';
|
const DELIVERY_REF = 'order.DELIVERY_REF';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the column name for the INVOICE field
|
* the column name for the INVOICE_REF field
|
||||||
*/
|
*/
|
||||||
const INVOICE = 'order.INVOICE';
|
const INVOICE_REF = 'order.INVOICE_REF';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the column name for the POSTAGE field
|
* the column name for the POSTAGE field
|
||||||
@@ -130,14 +130,14 @@ class OrderTableMap extends TableMap
|
|||||||
const POSTAGE = 'order.POSTAGE';
|
const POSTAGE = 'order.POSTAGE';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the column name for the PAYMENT field
|
* the column name for the PAYMENT_MODULE_ID field
|
||||||
*/
|
*/
|
||||||
const PAYMENT = 'order.PAYMENT';
|
const PAYMENT_MODULE_ID = 'order.PAYMENT_MODULE_ID';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the column name for the CARRIER field
|
* the column name for the DELIVERY_MODULE_ID field
|
||||||
*/
|
*/
|
||||||
const CARRIER = 'order.CARRIER';
|
const DELIVERY_MODULE_ID = 'order.DELIVERY_MODULE_ID';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the column name for the STATUS_ID field
|
* the column name for the STATUS_ID field
|
||||||
@@ -145,9 +145,9 @@ class OrderTableMap extends TableMap
|
|||||||
const STATUS_ID = 'order.STATUS_ID';
|
const STATUS_ID = 'order.STATUS_ID';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the column name for the LANG field
|
* the column name for the LANG_ID field
|
||||||
*/
|
*/
|
||||||
const LANG = 'order.LANG';
|
const LANG_ID = 'order.LANG_ID';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the column name for the CREATED_AT field
|
* the column name for the CREATED_AT field
|
||||||
@@ -171,11 +171,11 @@ class OrderTableMap extends TableMap
|
|||||||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||||
*/
|
*/
|
||||||
protected static $fieldNames = array (
|
protected static $fieldNames = array (
|
||||||
self::TYPE_PHPNAME => array('Id', 'Ref', 'CustomerId', 'AddressInvoice', 'AddressDelivery', 'InvoiceDate', 'CurrencyId', 'CurrencyRate', 'Transaction', 'DeliveryNum', 'Invoice', 'Postage', 'Payment', 'Carrier', 'StatusId', 'Lang', 'CreatedAt', 'UpdatedAt', ),
|
self::TYPE_PHPNAME => array('Id', 'Ref', 'CustomerId', 'InvoiceOrderAddressId', 'DeliveryOrderAddressId', 'InvoiceDate', 'CurrencyId', 'CurrencyRate', 'TransactionRef', 'DeliveryRef', 'InvoiceRef', 'Postage', 'PaymentModuleId', 'DeliveryModuleId', 'StatusId', 'LangId', 'CreatedAt', 'UpdatedAt', ),
|
||||||
self::TYPE_STUDLYPHPNAME => array('id', 'ref', 'customerId', 'addressInvoice', 'addressDelivery', 'invoiceDate', 'currencyId', 'currencyRate', 'transaction', 'deliveryNum', 'invoice', 'postage', 'payment', 'carrier', 'statusId', 'lang', 'createdAt', 'updatedAt', ),
|
self::TYPE_STUDLYPHPNAME => array('id', 'ref', 'customerId', 'invoiceOrderAddressId', 'deliveryOrderAddressId', 'invoiceDate', 'currencyId', 'currencyRate', 'transactionRef', 'deliveryRef', 'invoiceRef', 'postage', 'paymentModuleId', 'deliveryModuleId', 'statusId', 'langId', 'createdAt', 'updatedAt', ),
|
||||||
self::TYPE_COLNAME => array(OrderTableMap::ID, OrderTableMap::REF, OrderTableMap::CUSTOMER_ID, OrderTableMap::ADDRESS_INVOICE, OrderTableMap::ADDRESS_DELIVERY, OrderTableMap::INVOICE_DATE, OrderTableMap::CURRENCY_ID, OrderTableMap::CURRENCY_RATE, OrderTableMap::TRANSACTION, OrderTableMap::DELIVERY_NUM, OrderTableMap::INVOICE, OrderTableMap::POSTAGE, OrderTableMap::PAYMENT, OrderTableMap::CARRIER, OrderTableMap::STATUS_ID, OrderTableMap::LANG, OrderTableMap::CREATED_AT, OrderTableMap::UPDATED_AT, ),
|
self::TYPE_COLNAME => array(OrderTableMap::ID, OrderTableMap::REF, OrderTableMap::CUSTOMER_ID, OrderTableMap::INVOICE_ORDER_ADDRESS_ID, OrderTableMap::DELIVERY_ORDER_ADDRESS_ID, OrderTableMap::INVOICE_DATE, OrderTableMap::CURRENCY_ID, OrderTableMap::CURRENCY_RATE, OrderTableMap::TRANSACTION_REF, OrderTableMap::DELIVERY_REF, OrderTableMap::INVOICE_REF, OrderTableMap::POSTAGE, OrderTableMap::PAYMENT_MODULE_ID, OrderTableMap::DELIVERY_MODULE_ID, OrderTableMap::STATUS_ID, OrderTableMap::LANG_ID, OrderTableMap::CREATED_AT, OrderTableMap::UPDATED_AT, ),
|
||||||
self::TYPE_RAW_COLNAME => array('ID', 'REF', 'CUSTOMER_ID', 'ADDRESS_INVOICE', 'ADDRESS_DELIVERY', 'INVOICE_DATE', 'CURRENCY_ID', 'CURRENCY_RATE', 'TRANSACTION', 'DELIVERY_NUM', 'INVOICE', 'POSTAGE', 'PAYMENT', 'CARRIER', 'STATUS_ID', 'LANG', 'CREATED_AT', 'UPDATED_AT', ),
|
self::TYPE_RAW_COLNAME => array('ID', 'REF', 'CUSTOMER_ID', 'INVOICE_ORDER_ADDRESS_ID', 'DELIVERY_ORDER_ADDRESS_ID', 'INVOICE_DATE', 'CURRENCY_ID', 'CURRENCY_RATE', 'TRANSACTION_REF', 'DELIVERY_REF', 'INVOICE_REF', 'POSTAGE', 'PAYMENT_MODULE_ID', 'DELIVERY_MODULE_ID', 'STATUS_ID', 'LANG_ID', 'CREATED_AT', 'UPDATED_AT', ),
|
||||||
self::TYPE_FIELDNAME => array('id', 'ref', 'customer_id', 'address_invoice', 'address_delivery', 'invoice_date', 'currency_id', 'currency_rate', 'transaction', 'delivery_num', 'invoice', 'postage', 'payment', 'carrier', 'status_id', 'lang', 'created_at', 'updated_at', ),
|
self::TYPE_FIELDNAME => array('id', 'ref', 'customer_id', 'invoice_order_address_id', 'delivery_order_address_id', 'invoice_date', 'currency_id', 'currency_rate', 'transaction_ref', 'delivery_ref', 'invoice_ref', 'postage', 'payment_module_id', 'delivery_module_id', 'status_id', 'lang_id', 'created_at', 'updated_at', ),
|
||||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, )
|
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, )
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -186,11 +186,11 @@ class OrderTableMap extends TableMap
|
|||||||
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
|
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
|
||||||
*/
|
*/
|
||||||
protected static $fieldKeys = array (
|
protected static $fieldKeys = array (
|
||||||
self::TYPE_PHPNAME => array('Id' => 0, 'Ref' => 1, 'CustomerId' => 2, 'AddressInvoice' => 3, 'AddressDelivery' => 4, 'InvoiceDate' => 5, 'CurrencyId' => 6, 'CurrencyRate' => 7, 'Transaction' => 8, 'DeliveryNum' => 9, 'Invoice' => 10, 'Postage' => 11, 'Payment' => 12, 'Carrier' => 13, 'StatusId' => 14, 'Lang' => 15, 'CreatedAt' => 16, 'UpdatedAt' => 17, ),
|
self::TYPE_PHPNAME => array('Id' => 0, 'Ref' => 1, 'CustomerId' => 2, 'InvoiceOrderAddressId' => 3, 'DeliveryOrderAddressId' => 4, 'InvoiceDate' => 5, 'CurrencyId' => 6, 'CurrencyRate' => 7, 'TransactionRef' => 8, 'DeliveryRef' => 9, 'InvoiceRef' => 10, 'Postage' => 11, 'PaymentModuleId' => 12, 'DeliveryModuleId' => 13, 'StatusId' => 14, 'LangId' => 15, 'CreatedAt' => 16, 'UpdatedAt' => 17, ),
|
||||||
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'ref' => 1, 'customerId' => 2, 'addressInvoice' => 3, 'addressDelivery' => 4, 'invoiceDate' => 5, 'currencyId' => 6, 'currencyRate' => 7, 'transaction' => 8, 'deliveryNum' => 9, 'invoice' => 10, 'postage' => 11, 'payment' => 12, 'carrier' => 13, 'statusId' => 14, 'lang' => 15, 'createdAt' => 16, 'updatedAt' => 17, ),
|
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'ref' => 1, 'customerId' => 2, 'invoiceOrderAddressId' => 3, 'deliveryOrderAddressId' => 4, 'invoiceDate' => 5, 'currencyId' => 6, 'currencyRate' => 7, 'transactionRef' => 8, 'deliveryRef' => 9, 'invoiceRef' => 10, 'postage' => 11, 'paymentModuleId' => 12, 'deliveryModuleId' => 13, 'statusId' => 14, 'langId' => 15, 'createdAt' => 16, 'updatedAt' => 17, ),
|
||||||
self::TYPE_COLNAME => array(OrderTableMap::ID => 0, OrderTableMap::REF => 1, OrderTableMap::CUSTOMER_ID => 2, OrderTableMap::ADDRESS_INVOICE => 3, OrderTableMap::ADDRESS_DELIVERY => 4, OrderTableMap::INVOICE_DATE => 5, OrderTableMap::CURRENCY_ID => 6, OrderTableMap::CURRENCY_RATE => 7, OrderTableMap::TRANSACTION => 8, OrderTableMap::DELIVERY_NUM => 9, OrderTableMap::INVOICE => 10, OrderTableMap::POSTAGE => 11, OrderTableMap::PAYMENT => 12, OrderTableMap::CARRIER => 13, OrderTableMap::STATUS_ID => 14, OrderTableMap::LANG => 15, OrderTableMap::CREATED_AT => 16, OrderTableMap::UPDATED_AT => 17, ),
|
self::TYPE_COLNAME => array(OrderTableMap::ID => 0, OrderTableMap::REF => 1, OrderTableMap::CUSTOMER_ID => 2, OrderTableMap::INVOICE_ORDER_ADDRESS_ID => 3, OrderTableMap::DELIVERY_ORDER_ADDRESS_ID => 4, OrderTableMap::INVOICE_DATE => 5, OrderTableMap::CURRENCY_ID => 6, OrderTableMap::CURRENCY_RATE => 7, OrderTableMap::TRANSACTION_REF => 8, OrderTableMap::DELIVERY_REF => 9, OrderTableMap::INVOICE_REF => 10, OrderTableMap::POSTAGE => 11, OrderTableMap::PAYMENT_MODULE_ID => 12, OrderTableMap::DELIVERY_MODULE_ID => 13, OrderTableMap::STATUS_ID => 14, OrderTableMap::LANG_ID => 15, OrderTableMap::CREATED_AT => 16, OrderTableMap::UPDATED_AT => 17, ),
|
||||||
self::TYPE_RAW_COLNAME => array('ID' => 0, 'REF' => 1, 'CUSTOMER_ID' => 2, 'ADDRESS_INVOICE' => 3, 'ADDRESS_DELIVERY' => 4, 'INVOICE_DATE' => 5, 'CURRENCY_ID' => 6, 'CURRENCY_RATE' => 7, 'TRANSACTION' => 8, 'DELIVERY_NUM' => 9, 'INVOICE' => 10, 'POSTAGE' => 11, 'PAYMENT' => 12, 'CARRIER' => 13, 'STATUS_ID' => 14, 'LANG' => 15, 'CREATED_AT' => 16, 'UPDATED_AT' => 17, ),
|
self::TYPE_RAW_COLNAME => array('ID' => 0, 'REF' => 1, 'CUSTOMER_ID' => 2, 'INVOICE_ORDER_ADDRESS_ID' => 3, 'DELIVERY_ORDER_ADDRESS_ID' => 4, 'INVOICE_DATE' => 5, 'CURRENCY_ID' => 6, 'CURRENCY_RATE' => 7, 'TRANSACTION_REF' => 8, 'DELIVERY_REF' => 9, 'INVOICE_REF' => 10, 'POSTAGE' => 11, 'PAYMENT_MODULE_ID' => 12, 'DELIVERY_MODULE_ID' => 13, 'STATUS_ID' => 14, 'LANG_ID' => 15, 'CREATED_AT' => 16, 'UPDATED_AT' => 17, ),
|
||||||
self::TYPE_FIELDNAME => array('id' => 0, 'ref' => 1, 'customer_id' => 2, 'address_invoice' => 3, 'address_delivery' => 4, 'invoice_date' => 5, 'currency_id' => 6, 'currency_rate' => 7, 'transaction' => 8, 'delivery_num' => 9, 'invoice' => 10, 'postage' => 11, 'payment' => 12, 'carrier' => 13, 'status_id' => 14, 'lang' => 15, 'created_at' => 16, 'updated_at' => 17, ),
|
self::TYPE_FIELDNAME => array('id' => 0, 'ref' => 1, 'customer_id' => 2, 'invoice_order_address_id' => 3, 'delivery_order_address_id' => 4, 'invoice_date' => 5, 'currency_id' => 6, 'currency_rate' => 7, 'transaction_ref' => 8, 'delivery_ref' => 9, 'invoice_ref' => 10, 'postage' => 11, 'payment_module_id' => 12, 'delivery_module_id' => 13, 'status_id' => 14, 'lang_id' => 15, 'created_at' => 16, 'updated_at' => 17, ),
|
||||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, )
|
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, )
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -211,21 +211,21 @@ class OrderTableMap extends TableMap
|
|||||||
$this->setUseIdGenerator(true);
|
$this->setUseIdGenerator(true);
|
||||||
// columns
|
// columns
|
||||||
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
|
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
|
||||||
$this->addColumn('REF', 'Ref', 'VARCHAR', false, 45, null);
|
$this->addColumn('REF', 'Ref', 'VARCHAR', true, 45, null);
|
||||||
$this->addForeignKey('CUSTOMER_ID', 'CustomerId', 'INTEGER', 'customer', 'ID', true, null, null);
|
$this->addForeignKey('CUSTOMER_ID', 'CustomerId', 'INTEGER', 'customer', 'ID', true, null, null);
|
||||||
$this->addForeignKey('ADDRESS_INVOICE', 'AddressInvoice', 'INTEGER', 'order_address', 'ID', false, null, null);
|
$this->addForeignKey('INVOICE_ORDER_ADDRESS_ID', 'InvoiceOrderAddressId', 'INTEGER', 'order_address', 'ID', true, null, null);
|
||||||
$this->addForeignKey('ADDRESS_DELIVERY', 'AddressDelivery', 'INTEGER', 'order_address', 'ID', false, null, null);
|
$this->addForeignKey('DELIVERY_ORDER_ADDRESS_ID', 'DeliveryOrderAddressId', 'INTEGER', 'order_address', 'ID', true, null, null);
|
||||||
$this->addColumn('INVOICE_DATE', 'InvoiceDate', 'DATE', false, null, null);
|
$this->addColumn('INVOICE_DATE', 'InvoiceDate', 'DATE', true, null, null);
|
||||||
$this->addForeignKey('CURRENCY_ID', 'CurrencyId', 'INTEGER', 'currency', 'ID', false, null, null);
|
$this->addForeignKey('CURRENCY_ID', 'CurrencyId', 'INTEGER', 'currency', 'ID', true, null, null);
|
||||||
$this->addColumn('CURRENCY_RATE', 'CurrencyRate', 'FLOAT', true, null, null);
|
$this->addColumn('CURRENCY_RATE', 'CurrencyRate', 'FLOAT', true, null, null);
|
||||||
$this->addColumn('TRANSACTION', 'Transaction', 'VARCHAR', false, 100, null);
|
$this->addColumn('TRANSACTION_REF', 'TransactionRef', 'VARCHAR', false, 100, null);
|
||||||
$this->addColumn('DELIVERY_NUM', 'DeliveryNum', 'VARCHAR', false, 100, null);
|
$this->addColumn('DELIVERY_REF', 'DeliveryRef', 'VARCHAR', false, 100, null);
|
||||||
$this->addColumn('INVOICE', 'Invoice', 'VARCHAR', false, 100, null);
|
$this->addColumn('INVOICE_REF', 'InvoiceRef', 'VARCHAR', false, 100, null);
|
||||||
$this->addColumn('POSTAGE', 'Postage', 'FLOAT', false, null, null);
|
$this->addColumn('POSTAGE', 'Postage', 'FLOAT', true, null, null);
|
||||||
$this->addColumn('PAYMENT', 'Payment', 'VARCHAR', true, 45, null);
|
$this->addForeignKey('PAYMENT_MODULE_ID', 'PaymentModuleId', 'INTEGER', 'module', 'ID', true, null, null);
|
||||||
$this->addColumn('CARRIER', 'Carrier', 'VARCHAR', true, 45, null);
|
$this->addForeignKey('DELIVERY_MODULE_ID', 'DeliveryModuleId', 'INTEGER', 'module', 'ID', true, null, null);
|
||||||
$this->addForeignKey('STATUS_ID', 'StatusId', 'INTEGER', 'order_status', 'ID', false, null, null);
|
$this->addForeignKey('STATUS_ID', 'StatusId', 'INTEGER', 'order_status', 'ID', true, null, null);
|
||||||
$this->addColumn('LANG', 'Lang', 'VARCHAR', true, 10, null);
|
$this->addForeignKey('LANG_ID', 'LangId', 'INTEGER', 'lang', 'ID', true, null, null);
|
||||||
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
|
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
|
||||||
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
|
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
|
||||||
} // initialize()
|
} // initialize()
|
||||||
@@ -235,11 +235,14 @@ class OrderTableMap extends TableMap
|
|||||||
*/
|
*/
|
||||||
public function buildRelations()
|
public function buildRelations()
|
||||||
{
|
{
|
||||||
$this->addRelation('Currency', '\\Thelia\\Model\\Currency', RelationMap::MANY_TO_ONE, array('currency_id' => 'id', ), 'SET NULL', 'RESTRICT');
|
$this->addRelation('Currency', '\\Thelia\\Model\\Currency', RelationMap::MANY_TO_ONE, array('currency_id' => 'id', ), 'RESTRICT', 'RESTRICT');
|
||||||
$this->addRelation('Customer', '\\Thelia\\Model\\Customer', RelationMap::MANY_TO_ONE, array('customer_id' => 'id', ), 'CASCADE', 'RESTRICT');
|
$this->addRelation('Customer', '\\Thelia\\Model\\Customer', RelationMap::MANY_TO_ONE, array('customer_id' => 'id', ), 'RESTRICT', 'RESTRICT');
|
||||||
$this->addRelation('OrderAddressRelatedByAddressInvoice', '\\Thelia\\Model\\OrderAddress', RelationMap::MANY_TO_ONE, array('address_invoice' => 'id', ), 'SET NULL', 'RESTRICT');
|
$this->addRelation('OrderAddressRelatedByInvoiceOrderAddressId', '\\Thelia\\Model\\OrderAddress', RelationMap::MANY_TO_ONE, array('invoice_order_address_id' => 'id', ), 'RESTRICT', 'RESTRICT');
|
||||||
$this->addRelation('OrderAddressRelatedByAddressDelivery', '\\Thelia\\Model\\OrderAddress', RelationMap::MANY_TO_ONE, array('address_delivery' => 'id', ), 'SET NULL', 'RESTRICT');
|
$this->addRelation('OrderAddressRelatedByDeliveryOrderAddressId', '\\Thelia\\Model\\OrderAddress', RelationMap::MANY_TO_ONE, array('delivery_order_address_id' => 'id', ), 'RESTRICT', 'RESTRICT');
|
||||||
$this->addRelation('OrderStatus', '\\Thelia\\Model\\OrderStatus', RelationMap::MANY_TO_ONE, array('status_id' => 'id', ), 'SET NULL', 'RESTRICT');
|
$this->addRelation('OrderStatus', '\\Thelia\\Model\\OrderStatus', RelationMap::MANY_TO_ONE, array('status_id' => 'id', ), 'RESTRICT', 'RESTRICT');
|
||||||
|
$this->addRelation('ModuleRelatedByPaymentModuleId', '\\Thelia\\Model\\Module', RelationMap::MANY_TO_ONE, array('payment_module_id' => 'id', ), 'RESTRICT', 'RESTRICT');
|
||||||
|
$this->addRelation('ModuleRelatedByDeliveryModuleId', '\\Thelia\\Model\\Module', RelationMap::MANY_TO_ONE, array('delivery_module_id' => 'id', ), 'RESTRICT', 'RESTRICT');
|
||||||
|
$this->addRelation('Lang', '\\Thelia\\Model\\Lang', RelationMap::MANY_TO_ONE, array('lang_id' => 'id', ), 'RESTRICT', 'RESTRICT');
|
||||||
$this->addRelation('OrderProduct', '\\Thelia\\Model\\OrderProduct', RelationMap::ONE_TO_MANY, array('id' => 'order_id', ), 'CASCADE', 'RESTRICT', 'OrderProducts');
|
$this->addRelation('OrderProduct', '\\Thelia\\Model\\OrderProduct', RelationMap::ONE_TO_MANY, array('id' => 'order_id', ), 'CASCADE', 'RESTRICT', 'OrderProducts');
|
||||||
$this->addRelation('CouponOrder', '\\Thelia\\Model\\CouponOrder', RelationMap::ONE_TO_MANY, array('id' => 'order_id', ), 'CASCADE', 'RESTRICT', 'CouponOrders');
|
$this->addRelation('CouponOrder', '\\Thelia\\Model\\CouponOrder', RelationMap::ONE_TO_MANY, array('id' => 'order_id', ), 'CASCADE', 'RESTRICT', 'CouponOrders');
|
||||||
} // buildRelations()
|
} // buildRelations()
|
||||||
@@ -408,38 +411,38 @@ class OrderTableMap extends TableMap
|
|||||||
$criteria->addSelectColumn(OrderTableMap::ID);
|
$criteria->addSelectColumn(OrderTableMap::ID);
|
||||||
$criteria->addSelectColumn(OrderTableMap::REF);
|
$criteria->addSelectColumn(OrderTableMap::REF);
|
||||||
$criteria->addSelectColumn(OrderTableMap::CUSTOMER_ID);
|
$criteria->addSelectColumn(OrderTableMap::CUSTOMER_ID);
|
||||||
$criteria->addSelectColumn(OrderTableMap::ADDRESS_INVOICE);
|
$criteria->addSelectColumn(OrderTableMap::INVOICE_ORDER_ADDRESS_ID);
|
||||||
$criteria->addSelectColumn(OrderTableMap::ADDRESS_DELIVERY);
|
$criteria->addSelectColumn(OrderTableMap::DELIVERY_ORDER_ADDRESS_ID);
|
||||||
$criteria->addSelectColumn(OrderTableMap::INVOICE_DATE);
|
$criteria->addSelectColumn(OrderTableMap::INVOICE_DATE);
|
||||||
$criteria->addSelectColumn(OrderTableMap::CURRENCY_ID);
|
$criteria->addSelectColumn(OrderTableMap::CURRENCY_ID);
|
||||||
$criteria->addSelectColumn(OrderTableMap::CURRENCY_RATE);
|
$criteria->addSelectColumn(OrderTableMap::CURRENCY_RATE);
|
||||||
$criteria->addSelectColumn(OrderTableMap::TRANSACTION);
|
$criteria->addSelectColumn(OrderTableMap::TRANSACTION_REF);
|
||||||
$criteria->addSelectColumn(OrderTableMap::DELIVERY_NUM);
|
$criteria->addSelectColumn(OrderTableMap::DELIVERY_REF);
|
||||||
$criteria->addSelectColumn(OrderTableMap::INVOICE);
|
$criteria->addSelectColumn(OrderTableMap::INVOICE_REF);
|
||||||
$criteria->addSelectColumn(OrderTableMap::POSTAGE);
|
$criteria->addSelectColumn(OrderTableMap::POSTAGE);
|
||||||
$criteria->addSelectColumn(OrderTableMap::PAYMENT);
|
$criteria->addSelectColumn(OrderTableMap::PAYMENT_MODULE_ID);
|
||||||
$criteria->addSelectColumn(OrderTableMap::CARRIER);
|
$criteria->addSelectColumn(OrderTableMap::DELIVERY_MODULE_ID);
|
||||||
$criteria->addSelectColumn(OrderTableMap::STATUS_ID);
|
$criteria->addSelectColumn(OrderTableMap::STATUS_ID);
|
||||||
$criteria->addSelectColumn(OrderTableMap::LANG);
|
$criteria->addSelectColumn(OrderTableMap::LANG_ID);
|
||||||
$criteria->addSelectColumn(OrderTableMap::CREATED_AT);
|
$criteria->addSelectColumn(OrderTableMap::CREATED_AT);
|
||||||
$criteria->addSelectColumn(OrderTableMap::UPDATED_AT);
|
$criteria->addSelectColumn(OrderTableMap::UPDATED_AT);
|
||||||
} else {
|
} else {
|
||||||
$criteria->addSelectColumn($alias . '.ID');
|
$criteria->addSelectColumn($alias . '.ID');
|
||||||
$criteria->addSelectColumn($alias . '.REF');
|
$criteria->addSelectColumn($alias . '.REF');
|
||||||
$criteria->addSelectColumn($alias . '.CUSTOMER_ID');
|
$criteria->addSelectColumn($alias . '.CUSTOMER_ID');
|
||||||
$criteria->addSelectColumn($alias . '.ADDRESS_INVOICE');
|
$criteria->addSelectColumn($alias . '.INVOICE_ORDER_ADDRESS_ID');
|
||||||
$criteria->addSelectColumn($alias . '.ADDRESS_DELIVERY');
|
$criteria->addSelectColumn($alias . '.DELIVERY_ORDER_ADDRESS_ID');
|
||||||
$criteria->addSelectColumn($alias . '.INVOICE_DATE');
|
$criteria->addSelectColumn($alias . '.INVOICE_DATE');
|
||||||
$criteria->addSelectColumn($alias . '.CURRENCY_ID');
|
$criteria->addSelectColumn($alias . '.CURRENCY_ID');
|
||||||
$criteria->addSelectColumn($alias . '.CURRENCY_RATE');
|
$criteria->addSelectColumn($alias . '.CURRENCY_RATE');
|
||||||
$criteria->addSelectColumn($alias . '.TRANSACTION');
|
$criteria->addSelectColumn($alias . '.TRANSACTION_REF');
|
||||||
$criteria->addSelectColumn($alias . '.DELIVERY_NUM');
|
$criteria->addSelectColumn($alias . '.DELIVERY_REF');
|
||||||
$criteria->addSelectColumn($alias . '.INVOICE');
|
$criteria->addSelectColumn($alias . '.INVOICE_REF');
|
||||||
$criteria->addSelectColumn($alias . '.POSTAGE');
|
$criteria->addSelectColumn($alias . '.POSTAGE');
|
||||||
$criteria->addSelectColumn($alias . '.PAYMENT');
|
$criteria->addSelectColumn($alias . '.PAYMENT_MODULE_ID');
|
||||||
$criteria->addSelectColumn($alias . '.CARRIER');
|
$criteria->addSelectColumn($alias . '.DELIVERY_MODULE_ID');
|
||||||
$criteria->addSelectColumn($alias . '.STATUS_ID');
|
$criteria->addSelectColumn($alias . '.STATUS_ID');
|
||||||
$criteria->addSelectColumn($alias . '.LANG');
|
$criteria->addSelectColumn($alias . '.LANG_ID');
|
||||||
$criteria->addSelectColumn($alias . '.CREATED_AT');
|
$criteria->addSelectColumn($alias . '.CREATED_AT');
|
||||||
$criteria->addSelectColumn($alias . '.UPDATED_AT');
|
$criteria->addSelectColumn($alias . '.UPDATED_AT');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,10 @@ namespace Thelia\Model;
|
|||||||
|
|
||||||
use Thelia\Model\Base\Order as BaseOrder;
|
use Thelia\Model\Base\Order as BaseOrder;
|
||||||
|
|
||||||
class Order extends BaseOrder {
|
class Order extends BaseOrder
|
||||||
|
{
|
||||||
|
public $chosenDeliveryAddress = null;
|
||||||
|
public $chosenInvoiceModule = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* calculate the total amount
|
* calculate the total amount
|
||||||
|
|||||||
@@ -632,54 +632,73 @@ DROP TABLE IF EXISTS `order`;
|
|||||||
CREATE TABLE `order`
|
CREATE TABLE `order`
|
||||||
(
|
(
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
`ref` VARCHAR(45),
|
`ref` VARCHAR(45) NOT NULL,
|
||||||
`customer_id` INTEGER NOT NULL,
|
`customer_id` INTEGER NOT NULL,
|
||||||
`address_invoice` INTEGER,
|
`invoice_order_address_id` INTEGER NOT NULL,
|
||||||
`address_delivery` INTEGER,
|
`delivery_order_address_id` INTEGER NOT NULL,
|
||||||
`invoice_date` DATE,
|
`invoice_date` DATE NOT NULL,
|
||||||
`currency_id` INTEGER,
|
`currency_id` INTEGER NOT NULL,
|
||||||
`currency_rate` FLOAT NOT NULL,
|
`currency_rate` FLOAT NOT NULL,
|
||||||
`transaction` VARCHAR(100),
|
`transaction_ref` VARCHAR(100) COMMENT 'transaction reference - usually use to identify a transaction with banking modules',
|
||||||
`delivery_num` VARCHAR(100),
|
`delivery_ref` VARCHAR(100) COMMENT 'delivery reference - usually use to identify a delivery progress on a distant delivery tracker website',
|
||||||
`invoice` VARCHAR(100),
|
`invoice_ref` VARCHAR(100) COMMENT 'the invoice reference',
|
||||||
`postage` FLOAT,
|
`postage` FLOAT NOT NULL,
|
||||||
`payment` VARCHAR(45) NOT NULL,
|
`payment_module_id` INTEGER NOT NULL,
|
||||||
`carrier` VARCHAR(45) NOT NULL,
|
`delivery_module_id` INTEGER NOT NULL,
|
||||||
`status_id` INTEGER,
|
`status_id` INTEGER NOT NULL,
|
||||||
`lang` VARCHAR(10) NOT NULL,
|
`lang_id` INTEGER NOT NULL,
|
||||||
`created_at` DATETIME,
|
`created_at` DATETIME,
|
||||||
`updated_at` DATETIME,
|
`updated_at` DATETIME,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
|
UNIQUE INDEX `ref_UNIQUE` (`ref`),
|
||||||
INDEX `idx_order_currency_id` (`currency_id`),
|
INDEX `idx_order_currency_id` (`currency_id`),
|
||||||
INDEX `idx_order_customer_id` (`customer_id`),
|
INDEX `idx_order_customer_id` (`customer_id`),
|
||||||
INDEX `idx_order_address_invoice` (`address_invoice`),
|
INDEX `idx_order_invoice_order_address_id` (`invoice_order_address_id`),
|
||||||
INDEX `idx_order_address_delivery` (`address_delivery`),
|
INDEX `idx_order_delivery_order_address_id` (`delivery_order_address_id`),
|
||||||
INDEX `idx_order_status_id` (`status_id`),
|
INDEX `idx_order_status_id` (`status_id`),
|
||||||
|
INDEX `fk_order_payment_module_id` (`payment_module_id`),
|
||||||
|
INDEX `fk_order_delivery_module_id` (`delivery_module_id`),
|
||||||
|
INDEX `fk_order_lang_id` (`lang_id`),
|
||||||
CONSTRAINT `fk_order_currency_id`
|
CONSTRAINT `fk_order_currency_id`
|
||||||
FOREIGN KEY (`currency_id`)
|
FOREIGN KEY (`currency_id`)
|
||||||
REFERENCES `currency` (`id`)
|
REFERENCES `currency` (`id`)
|
||||||
ON UPDATE RESTRICT
|
ON UPDATE RESTRICT
|
||||||
ON DELETE SET NULL,
|
ON DELETE RESTRICT,
|
||||||
CONSTRAINT `fk_order_customer_id`
|
CONSTRAINT `fk_order_customer_id`
|
||||||
FOREIGN KEY (`customer_id`)
|
FOREIGN KEY (`customer_id`)
|
||||||
REFERENCES `customer` (`id`)
|
REFERENCES `customer` (`id`)
|
||||||
ON UPDATE RESTRICT
|
ON UPDATE RESTRICT
|
||||||
ON DELETE CASCADE,
|
ON DELETE RESTRICT,
|
||||||
CONSTRAINT `fk_order_address_invoice`
|
CONSTRAINT `fk_order_invoice_order_address_id`
|
||||||
FOREIGN KEY (`address_invoice`)
|
FOREIGN KEY (`invoice_order_address_id`)
|
||||||
REFERENCES `order_address` (`id`)
|
REFERENCES `order_address` (`id`)
|
||||||
ON UPDATE RESTRICT
|
ON UPDATE RESTRICT
|
||||||
ON DELETE SET NULL,
|
ON DELETE RESTRICT,
|
||||||
CONSTRAINT `fk_order_address_delivery`
|
CONSTRAINT `fk_order_delivery_order_address_id`
|
||||||
FOREIGN KEY (`address_delivery`)
|
FOREIGN KEY (`delivery_order_address_id`)
|
||||||
REFERENCES `order_address` (`id`)
|
REFERENCES `order_address` (`id`)
|
||||||
ON UPDATE RESTRICT
|
ON UPDATE RESTRICT
|
||||||
ON DELETE SET NULL,
|
ON DELETE RESTRICT,
|
||||||
CONSTRAINT `fk_order_status_id`
|
CONSTRAINT `fk_order_status_id`
|
||||||
FOREIGN KEY (`status_id`)
|
FOREIGN KEY (`status_id`)
|
||||||
REFERENCES `order_status` (`id`)
|
REFERENCES `order_status` (`id`)
|
||||||
ON UPDATE RESTRICT
|
ON UPDATE RESTRICT
|
||||||
ON DELETE SET NULL
|
ON DELETE RESTRICT,
|
||||||
|
CONSTRAINT `fk_order_payment_module_id`
|
||||||
|
FOREIGN KEY (`payment_module_id`)
|
||||||
|
REFERENCES `module` (`id`)
|
||||||
|
ON UPDATE RESTRICT
|
||||||
|
ON DELETE RESTRICT,
|
||||||
|
CONSTRAINT `fk_order_delivery_module_id`
|
||||||
|
FOREIGN KEY (`delivery_module_id`)
|
||||||
|
REFERENCES `module` (`id`)
|
||||||
|
ON UPDATE RESTRICT
|
||||||
|
ON DELETE RESTRICT,
|
||||||
|
CONSTRAINT `fk_order_lang_id`
|
||||||
|
FOREIGN KEY (`lang_id`)
|
||||||
|
REFERENCES `lang` (`id`)
|
||||||
|
ON UPDATE RESTRICT
|
||||||
|
ON DELETE RESTRICT
|
||||||
) ENGINE=InnoDB;
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
-- ---------------------------------------------------------------------
|
-- ---------------------------------------------------------------------
|
||||||
|
|||||||
@@ -491,51 +491,72 @@
|
|||||||
</table>
|
</table>
|
||||||
<table name="order" namespace="Thelia\Model">
|
<table name="order" namespace="Thelia\Model">
|
||||||
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
|
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
|
||||||
<column name="ref" size="45" type="VARCHAR" />
|
<column name="ref" required="true" size="45" type="VARCHAR" />
|
||||||
<column name="customer_id" required="true" type="INTEGER" />
|
<column name="customer_id" required="true" type="INTEGER" />
|
||||||
<column name="address_invoice" type="INTEGER" />
|
<column name="invoice_order_address_id" required="true" type="INTEGER" />
|
||||||
<column name="address_delivery" type="INTEGER" />
|
<column name="delivery_order_address_id" required="true" type="INTEGER" />
|
||||||
<column name="invoice_date" type="DATE" />
|
<column name="invoice_date" required="true" type="DATE" />
|
||||||
<column name="currency_id" type="INTEGER" />
|
<column name="currency_id" required="true" type="INTEGER" />
|
||||||
<column name="currency_rate" required="true" type="FLOAT" />
|
<column name="currency_rate" required="true" type="FLOAT" />
|
||||||
<column name="transaction" size="100" type="VARCHAR" />
|
<column description="transaction reference - usually use to identify a transaction with banking modules" name="transaction_ref" size="100" type="VARCHAR" />
|
||||||
<column name="delivery_num" size="100" type="VARCHAR" />
|
<column description="delivery reference - usually use to identify a delivery progress on a distant delivery tracker website" name="delivery_ref" size="100" type="VARCHAR" />
|
||||||
<column name="invoice" size="100" type="VARCHAR" />
|
<column description="the invoice reference" name="invoice_ref" size="100" type="VARCHAR" />
|
||||||
<column name="postage" type="FLOAT" />
|
<column name="postage" required="true" type="FLOAT" />
|
||||||
<column name="payment" required="true" size="45" type="VARCHAR" />
|
<column name="payment_module_id" required="true" type="INTEGER" />
|
||||||
<column name="carrier" required="true" size="45" type="VARCHAR" />
|
<column name="delivery_module_id" required="true" type="INTEGER" />
|
||||||
<column name="status_id" type="INTEGER" />
|
<column name="status_id" required="true" type="INTEGER" />
|
||||||
<column name="lang" required="true" size="10" type="VARCHAR" />
|
<column name="lang_id" required="true" type="INTEGER" />
|
||||||
<foreign-key foreignTable="currency" name="fk_order_currency_id" onDelete="SET NULL" onUpdate="RESTRICT">
|
<foreign-key foreignTable="currency" name="fk_order_currency_id" onDelete="RESTRICT" onUpdate="RESTRICT">
|
||||||
<reference foreign="id" local="currency_id" />
|
<reference foreign="id" local="currency_id" />
|
||||||
</foreign-key>
|
</foreign-key>
|
||||||
<foreign-key foreignTable="customer" name="fk_order_customer_id" onDelete="CASCADE" onUpdate="RESTRICT">
|
<foreign-key foreignTable="customer" name="fk_order_customer_id" onDelete="RESTRICT" onUpdate="RESTRICT">
|
||||||
<reference foreign="id" local="customer_id" />
|
<reference foreign="id" local="customer_id" />
|
||||||
</foreign-key>
|
</foreign-key>
|
||||||
<foreign-key foreignTable="order_address" name="fk_order_address_invoice" onDelete="SET NULL" onUpdate="RESTRICT">
|
<foreign-key foreignTable="order_address" name="fk_order_invoice_order_address_id" onDelete="RESTRICT" onUpdate="RESTRICT">
|
||||||
<reference foreign="id" local="address_invoice" />
|
<reference foreign="id" local="invoice_order_address_id" />
|
||||||
</foreign-key>
|
</foreign-key>
|
||||||
<foreign-key foreignTable="order_address" name="fk_order_address_delivery" onDelete="SET NULL" onUpdate="RESTRICT">
|
<foreign-key foreignTable="order_address" name="fk_order_delivery_order_address_id" onDelete="RESTRICT" onUpdate="RESTRICT">
|
||||||
<reference foreign="id" local="address_delivery" />
|
<reference foreign="id" local="delivery_order_address_id" />
|
||||||
</foreign-key>
|
</foreign-key>
|
||||||
<foreign-key foreignTable="order_status" name="fk_order_status_id" onDelete="SET NULL" onUpdate="RESTRICT">
|
<foreign-key foreignTable="order_status" name="fk_order_status_id" onDelete="RESTRICT" onUpdate="RESTRICT">
|
||||||
<reference foreign="id" local="status_id" />
|
<reference foreign="id" local="status_id" />
|
||||||
</foreign-key>
|
</foreign-key>
|
||||||
|
<foreign-key foreignTable="module" name="fk_order_payment_module_id" onDelete="RESTRICT" onUpdate="RESTRICT">
|
||||||
|
<reference foreign="id" local="payment_module_id" />
|
||||||
|
</foreign-key>
|
||||||
|
<foreign-key foreignTable="module" name="fk_order_delivery_module_id" onDelete="RESTRICT" onUpdate="RESTRICT">
|
||||||
|
<reference foreign="id" local="delivery_module_id" />
|
||||||
|
</foreign-key>
|
||||||
|
<foreign-key foreignTable="lang" name="fk_order_lang_id" onDelete="RESTRICT" onUpdate="RESTRICT">
|
||||||
|
<reference foreign="id" local="lang_id" />
|
||||||
|
</foreign-key>
|
||||||
<index name="idx_order_currency_id">
|
<index name="idx_order_currency_id">
|
||||||
<index-column name="currency_id" />
|
<index-column name="currency_id" />
|
||||||
</index>
|
</index>
|
||||||
<index name="idx_order_customer_id">
|
<index name="idx_order_customer_id">
|
||||||
<index-column name="customer_id" />
|
<index-column name="customer_id" />
|
||||||
</index>
|
</index>
|
||||||
<index name="idx_order_address_invoice">
|
<index name="idx_order_invoice_order_address_id">
|
||||||
<index-column name="address_invoice" />
|
<index-column name="invoice_order_address_id" />
|
||||||
</index>
|
</index>
|
||||||
<index name="idx_order_address_delivery">
|
<index name="idx_order_delivery_order_address_id">
|
||||||
<index-column name="address_delivery" />
|
<index-column name="delivery_order_address_id" />
|
||||||
</index>
|
</index>
|
||||||
<index name="idx_order_status_id">
|
<index name="idx_order_status_id">
|
||||||
<index-column name="status_id" />
|
<index-column name="status_id" />
|
||||||
</index>
|
</index>
|
||||||
|
<unique name="ref_UNIQUE">
|
||||||
|
<unique-column name="ref" />
|
||||||
|
</unique>
|
||||||
|
<index name="fk_order_payment_module_id">
|
||||||
|
<index-column name="payment_module_id" />
|
||||||
|
</index>
|
||||||
|
<index name="fk_order_delivery_module_id">
|
||||||
|
<index-column name="delivery_module_id" />
|
||||||
|
</index>
|
||||||
|
<index name="fk_order_lang_id">
|
||||||
|
<index-column name="lang_id" />
|
||||||
|
</index>
|
||||||
<behavior name="timestampable" />
|
<behavior name="timestampable" />
|
||||||
</table>
|
</table>
|
||||||
<table name="currency" namespace="Thelia\Model">
|
<table name="currency" namespace="Thelia\Model">
|
||||||
|
|||||||
@@ -17,10 +17,10 @@
|
|||||||
<h1 id="main-label" class="page-header">Your Cart</h1>
|
<h1 id="main-label" class="page-header">Your Cart</h1>
|
||||||
|
|
||||||
<div class="btn-group checkout-progress">
|
<div class="btn-group checkout-progress">
|
||||||
<a href="cart.php" role="button" class="btn btn-step active"><span class="step-nb">1</span> <span class="step-label">Your Cart</span></a>
|
<a href="#" role="button" class="btn btn-step active"><span class="step-nb">1</span> <span class="step-label">Your Cart</span></a>
|
||||||
<a href="cart-step2.php" role="button" class="btn btn-step disabled"><span class="step-nb">2</span> <span class="step-label">Billing and delivery</span></a>
|
<a href="#" role="button" class="btn btn-step disabled"><span class="step-nb">2</span> <span class="step-label">Billing and delivery</span></a>
|
||||||
<a href="cart-step3.php" role="button" class="btn btn-step disabled"><span class="step-nb">3</span> <span class="step-label">Check my order</span></a>
|
<a href="#" role="button" class="btn btn-step disabled"><span class="step-nb">3</span> <span class="step-label">Check my order</span></a>
|
||||||
<a href="cart-step4.php" role="button" class="btn btn-step disabled"><span class="step-nb">4</span> <span class="step-label">Secure payment</span></a>
|
<a href="#" role="button" class="btn btn-step disabled"><span class="step-nb">4</span> <span class="step-label">Secure payment</span></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<table class="table table-cart">
|
<table class="table table-cart">
|
||||||
@@ -133,7 +133,7 @@
|
|||||||
</table>
|
</table>
|
||||||
|
|
||||||
<a href="{navigate to="index"}" role="button" class="btn btn-continue-shopping"><span>Continue Shopping</span></a>
|
<a href="{navigate to="index"}" role="button" class="btn btn-continue-shopping"><span>Continue Shopping</span></a>
|
||||||
<a href="{url path="/order/billing"}" class="btn btn-checkout">Proceed checkout</a>
|
<a href="{url path="/order/delivery"}" class="btn btn-checkout">Proceed checkout</a>
|
||||||
|
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
|
|||||||
@@ -18,84 +18,28 @@
|
|||||||
<h1 id="main-label" class="page-header">Your Cart</h1>
|
<h1 id="main-label" class="page-header">Your Cart</h1>
|
||||||
|
|
||||||
<div class="btn-group checkout-progress">
|
<div class="btn-group checkout-progress">
|
||||||
<a href="cart.php" role="button" class="btn btn-step"><span class="step-nb">1</span> <span class="step-label">Your Cart</span></a>
|
<a href="{url path="/cart"}" role="button" class="btn btn-step"><span class="step-nb">1</span> <span class="step-label">Your Cart</span></a>
|
||||||
<a href="cart-step2.php" role="button" class="btn btn-step active"><span class="step-nb">2</span> <span class="step-label">Billing and delivery</span></a>
|
<a href="#" role="button" class="btn btn-step active"><span class="step-nb">2</span> <span class="step-label">Billing and delivery</span></a>
|
||||||
<a href="cart-step3.php" role="button" class="btn btn-step disabled"><span class="step-nb">3</span> <span class="step-label">Check my order</span></a>
|
<a href="#" role="button" class="btn btn-step disabled"><span class="step-nb">3</span> <span class="step-label">Check my order</span></a>
|
||||||
<a href="cart-step4.php" role="button" class="btn btn-step disabled"><span class="step-nb">4</span> <span class="step-label">Secure payment</span></a>
|
<a href="#" role="button" class="btn btn-step disabled"><span class="step-nb">4</span> <span class="step-label">Secure payment</span></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form id="form-cart-delivery" action="{url path="/order/deliver"}" method="post" role="form">
|
{form name="thelia.order.delivery"}
|
||||||
|
<form id="form-cart-delivery" action="{url path="/order/delivery"}" method="post" role="form" {form_enctype form=$form}>
|
||||||
|
|
||||||
<div id="billing-address" class="panel">
|
{form_hidden_fields form=$form}
|
||||||
<div class="panel-heading clearfix">
|
|
||||||
<a href="{url path="/address/create"}" class="btn btn-add-address">Add a new address</a>
|
|
||||||
Chose your billing address
|
|
||||||
</div>
|
|
||||||
<div class="panel-body">
|
|
||||||
<table class="table table-address" role="presentation" summary="Address Books">
|
|
||||||
<tbody>
|
|
||||||
|
|
||||||
{loop type="address" name="customer.addresses" customer="current"}
|
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
|
||||||
|
|
||||||
<tr>
|
{form_field form=$form field='delivery-address'}
|
||||||
<th>
|
|
||||||
<div class="radio">
|
|
||||||
<label for="billing-address_<?php echo $count; ?>">
|
|
||||||
<input type="radio" name="billing-address" value"{$ID}">
|
|
||||||
{$LABEL}
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
</th>
|
|
||||||
<td>
|
|
||||||
<ul class="list-address">
|
|
||||||
<li>
|
|
||||||
<span class="fn">{loop type="title" name="customer.title.info" id=$TITLE}{$SHORT}{/loop} {$LASTNAME|upper} {$FIRSTNAME|ucwords}</span>
|
|
||||||
<span class="org">{$COMPANY}</span>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<address class="adr">
|
|
||||||
<span class="street-address">{$ADDRESS1}</span>
|
|
||||||
{if $ADDRESS2 != ""}
|
|
||||||
<br><span class="street-address">{$ADDRESS2}</span>
|
|
||||||
{/if}
|
|
||||||
{if $ADDRESS3 != ""}
|
|
||||||
<br><span class="street-address">{$ADDRESS3}</span>
|
|
||||||
{/if}
|
|
||||||
<br><span class="postal-code">{$ZIPCODE}</span>
|
|
||||||
<span class="locality">{$CITY}, <span class="country-name">{loop type="country" name="customer.country.info" id=$COUNTRY}{$TITLE}{/loop}</span></span>
|
|
||||||
</address>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
{if $CELLPHONE != ""}
|
|
||||||
<span class="tel">{$CELLPHONE}</span>
|
|
||||||
{/if}
|
|
||||||
{if $PHONE != ""}
|
|
||||||
<br><span class="tel">{$PHONE}</span>
|
|
||||||
{/if}
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<div class="group-btn">
|
|
||||||
<a href="{url path="/address/update/{$ID}"}" class="btn btn-edit-address" data-toggle="tooltip" title="Edit this address"><i class="icon-pencil"></i> <span>{intl l="Edit"}</span></a>
|
|
||||||
{if $DEFAULT != 1}
|
|
||||||
<a href="{url path="/address/delete/{$ID}"}" class="btn btn-remove-address js-remove-address" title="{intl l="Remove this address"}" data-toggle="tooltip"><i class="icon-remove"></i> <span>{intl l="Cancel"}</span></a>
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
{/loop}
|
|
||||||
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="delivery-address" class="panel">
|
<div id="delivery-address" class="panel">
|
||||||
<div class="panel-heading clearfix">
|
<div class="panel-heading clearfix">
|
||||||
<a href="{url path="/address/create"}" class="btn btn-add-address">Add a new address</a>
|
<a href="{url path="/address/create"}" class="btn btn-add-address">Add a new address</a>
|
||||||
Chose your delivery address
|
Chose your delivery address
|
||||||
|
{if $error}
|
||||||
|
<span class="help-block"><span class="icon-remove"></span> {$message}</span>
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<table class="table table-address" role="presentation" summary="Address Books">
|
<table class="table table-address" role="presentation" summary="Address Books">
|
||||||
@@ -103,11 +47,14 @@
|
|||||||
|
|
||||||
{loop type="address" name="customer.addresses" customer="current"}
|
{loop type="address" name="customer.addresses" customer="current"}
|
||||||
|
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th>
|
<th>
|
||||||
<div class="radio">
|
<div class="radio">
|
||||||
<label for="delivery-address_<?php echo $count; ?>">
|
<label for="delivery-address_{$ID}">
|
||||||
<input type="radio" name="delivery-address" value"{$ID}">
|
|
||||||
|
<input type="radio" name="{$name}" value="{$ID}" {if $value == $ID}checked="checked"{/if} id="delivery-address_{$ID}">
|
||||||
|
|
||||||
{$LABEL}
|
{$LABEL}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
@@ -158,13 +105,24 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{/form_field}
|
||||||
|
|
||||||
|
{form_field form=$form field='delivery-module'}
|
||||||
|
|
||||||
<div id="delivery-method" class="panel">
|
<div id="delivery-method" class="panel">
|
||||||
<div class="panel-heading">Choose your delivery method</div>
|
<div class="panel-heading">
|
||||||
|
Choose your delivery method
|
||||||
|
{if $error}
|
||||||
|
<span class="help-block"><span class="icon-remove"></span> {$message}</span>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
{loop type="delivery" name="deliveries" force_return="true"}
|
{loop type="delivery" name="deliveries" force_return="true"}
|
||||||
<div class="radio">
|
<div class="radio">
|
||||||
<label for="delivery-method_1">
|
<label for="delivery-method_1">
|
||||||
<input type="radio" name="delivery-module" value="{$ID}">
|
{form_field form=$form field='delivery-module'}
|
||||||
|
<input type="radio" name="{$name}" {if $value == $ID}checked="checked"{/if} value="{$ID}">
|
||||||
|
{/form_field}
|
||||||
<strong>{$TITLE}</strong> / {currency attr="symbol"} {$PRICE}
|
<strong>{$TITLE}</strong> / {currency attr="symbol"} {$PRICE}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
@@ -172,10 +130,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<a href="cart.php" role="button" class="btn btn-back"><span>Back</span></a>
|
{/form_field}
|
||||||
|
|
||||||
|
<a href="{url path="/cart"}" role="button" class="btn btn-back"><span>Back</span></a>
|
||||||
<button type="submit" class="btn btn-checkout-next"><span>Next Step</span></button>
|
<button type="submit" class="btn btn-checkout-next"><span>Next Step</span></button>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
{/form}
|
||||||
|
|
||||||
</article>
|
</article>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
Reference in New Issue
Block a user