delivery form
This commit is contained in:
@@ -987,10 +987,9 @@ abstract class Currency implements ActiveRecordInterface
|
||||
|
||||
if ($this->ordersScheduledForDeletion !== null) {
|
||||
if (!$this->ordersScheduledForDeletion->isEmpty()) {
|
||||
foreach ($this->ordersScheduledForDeletion as $order) {
|
||||
// need to save related object because we set the relation to null
|
||||
$order->save($con);
|
||||
}
|
||||
\Thelia\Model\OrderQuery::create()
|
||||
->filterByPrimaryKeys($this->ordersScheduledForDeletion->getPrimaryKeys(false))
|
||||
->delete($con);
|
||||
$this->ordersScheduledForDeletion = null;
|
||||
}
|
||||
}
|
||||
@@ -1758,7 +1757,7 @@ abstract class Currency implements ActiveRecordInterface
|
||||
$this->ordersScheduledForDeletion = clone $this->collOrders;
|
||||
$this->ordersScheduledForDeletion->clear();
|
||||
}
|
||||
$this->ordersScheduledForDeletion[]= $order;
|
||||
$this->ordersScheduledForDeletion[]= clone $order;
|
||||
$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)
|
||||
* @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->joinWith('OrderAddressRelatedByAddressInvoice', $joinBehavior);
|
||||
$query->joinWith('OrderAddressRelatedByInvoiceOrderAddressId', $joinBehavior);
|
||||
|
||||
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)
|
||||
* @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->joinWith('OrderAddressRelatedByAddressDelivery', $joinBehavior);
|
||||
$query->joinWith('OrderAddressRelatedByDeliveryOrderAddressId', $joinBehavior);
|
||||
|
||||
return $this->getOrders($query, $con);
|
||||
}
|
||||
@@ -1865,6 +1864,81 @@ abstract class Currency implements ActiveRecordInterface
|
||||
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
|
||||
*
|
||||
|
||||
@@ -596,7 +596,7 @@ abstract class CurrencyQuery extends ModelCriteria
|
||||
*
|
||||
* @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();
|
||||
$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
|
||||
*/
|
||||
public function useOrderQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
||||
public function useOrderQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
return $this
|
||||
->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)
|
||||
* @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->joinWith('OrderAddressRelatedByAddressInvoice', $joinBehavior);
|
||||
$query->joinWith('OrderAddressRelatedByInvoiceOrderAddressId', $joinBehavior);
|
||||
|
||||
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)
|
||||
* @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->joinWith('OrderAddressRelatedByAddressDelivery', $joinBehavior);
|
||||
$query->joinWith('OrderAddressRelatedByDeliveryOrderAddressId', $joinBehavior);
|
||||
|
||||
return $this->getOrders($query, $con);
|
||||
}
|
||||
@@ -2610,6 +2610,81 @@ abstract class Customer implements ActiveRecordInterface
|
||||
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
|
||||
*
|
||||
|
||||
@@ -10,6 +10,7 @@ use Propel\Runtime\ActiveQuery\Criteria;
|
||||
use Propel\Runtime\ActiveQuery\ModelCriteria;
|
||||
use Propel\Runtime\ActiveRecord\ActiveRecordInterface;
|
||||
use Propel\Runtime\Collection\Collection;
|
||||
use Propel\Runtime\Collection\ObjectCollection;
|
||||
use Propel\Runtime\Connection\ConnectionInterface;
|
||||
use Propel\Runtime\Exception\BadMethodCallException;
|
||||
use Propel\Runtime\Exception\PropelException;
|
||||
@@ -18,6 +19,8 @@ use Propel\Runtime\Parser\AbstractParser;
|
||||
use Propel\Runtime\Util\PropelDateTime;
|
||||
use Thelia\Model\Lang as ChildLang;
|
||||
use Thelia\Model\LangQuery as ChildLangQuery;
|
||||
use Thelia\Model\Order as ChildOrder;
|
||||
use Thelia\Model\OrderQuery as ChildOrderQuery;
|
||||
use Thelia\Model\Map\LangTableMap;
|
||||
|
||||
abstract class Lang implements ActiveRecordInterface
|
||||
@@ -144,6 +147,12 @@ abstract class Lang implements ActiveRecordInterface
|
||||
*/
|
||||
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
|
||||
* by another object which falls in this transaction.
|
||||
@@ -152,6 +161,12 @@ abstract class Lang implements ActiveRecordInterface
|
||||
*/
|
||||
protected $alreadyInSave = false;
|
||||
|
||||
/**
|
||||
* An array of objects scheduled for deletion.
|
||||
* @var ObjectCollection
|
||||
*/
|
||||
protected $ordersScheduledForDeletion = null;
|
||||
|
||||
/**
|
||||
* 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?
|
||||
|
||||
$this->collOrders = null;
|
||||
|
||||
} // if (deep)
|
||||
}
|
||||
|
||||
@@ -1193,6 +1210,23 @@ abstract class Lang implements ActiveRecordInterface
|
||||
$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;
|
||||
|
||||
}
|
||||
@@ -1444,10 +1478,11 @@ abstract class Lang implements ActiveRecordInterface
|
||||
* Defaults to TableMap::TYPE_PHPNAME.
|
||||
* @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 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
|
||||
*/
|
||||
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()])) {
|
||||
return '*RECURSION*';
|
||||
@@ -1477,6 +1512,11 @@ abstract class Lang implements ActiveRecordInterface
|
||||
$result[$key] = $virtualColumn;
|
||||
}
|
||||
|
||||
if ($includeForeignObjects) {
|
||||
if (null !== $this->collOrders) {
|
||||
$result['Orders'] = $this->collOrders->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
@@ -1697,6 +1737,20 @@ abstract class Lang implements ActiveRecordInterface
|
||||
$copyObj->setPosition($this->getPosition());
|
||||
$copyObj->setCreatedAt($this->getCreatedAt());
|
||||
$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) {
|
||||
$copyObj->setNew(true);
|
||||
$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;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
@@ -1764,8 +2227,17 @@ abstract class Lang implements ActiveRecordInterface
|
||||
public function clearAllReferences($deep = false)
|
||||
{
|
||||
if ($deep) {
|
||||
if ($this->collOrders) {
|
||||
foreach ($this->collOrders as $o) {
|
||||
$o->clearAllReferences($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\ActiveQuery\Criteria;
|
||||
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\Exception\PropelException;
|
||||
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 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 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);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
*
|
||||
|
||||
@@ -23,6 +23,8 @@ use Thelia\Model\Module as ChildModule;
|
||||
use Thelia\Model\ModuleI18n as ChildModuleI18n;
|
||||
use Thelia\Model\ModuleI18nQuery as ChildModuleI18nQuery;
|
||||
use Thelia\Model\ModuleQuery as ChildModuleQuery;
|
||||
use Thelia\Model\Order as ChildOrder;
|
||||
use Thelia\Model\OrderQuery as ChildOrderQuery;
|
||||
use Thelia\Model\Map\ModuleTableMap;
|
||||
|
||||
abstract class Module implements ActiveRecordInterface
|
||||
@@ -107,6 +109,18 @@ abstract class Module implements ActiveRecordInterface
|
||||
*/
|
||||
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.
|
||||
*/
|
||||
@@ -141,6 +155,18 @@ abstract class Module implements ActiveRecordInterface
|
||||
*/
|
||||
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.
|
||||
* @var ObjectCollection
|
||||
@@ -816,6 +842,10 @@ abstract class Module implements ActiveRecordInterface
|
||||
|
||||
if ($deep) { // also de-associate any related objects?
|
||||
|
||||
$this->collOrdersRelatedByPaymentModuleId = null;
|
||||
|
||||
$this->collOrdersRelatedByDeliveryModuleId = null;
|
||||
|
||||
$this->collGroupModules = null;
|
||||
|
||||
$this->collModuleI18ns = null;
|
||||
@@ -953,6 +983,40 @@ abstract class Module implements ActiveRecordInterface
|
||||
$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->isEmpty()) {
|
||||
\Thelia\Model\GroupModuleQuery::create()
|
||||
@@ -1203,6 +1267,12 @@ abstract class Module implements ActiveRecordInterface
|
||||
}
|
||||
|
||||
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) {
|
||||
$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.
|
||||
$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) {
|
||||
if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
|
||||
$copyObj->addGroupModule($relObj->copy($deepCopy));
|
||||
@@ -1447,6 +1529,12 @@ abstract class Module implements ActiveRecordInterface
|
||||
*/
|
||||
public function initRelation($relationName)
|
||||
{
|
||||
if ('OrderRelatedByPaymentModuleId' == $relationName) {
|
||||
return $this->initOrdersRelatedByPaymentModuleId();
|
||||
}
|
||||
if ('OrderRelatedByDeliveryModuleId' == $relationName) {
|
||||
return $this->initOrdersRelatedByDeliveryModuleId();
|
||||
}
|
||||
if ('GroupModule' == $relationName) {
|
||||
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
|
||||
*
|
||||
@@ -1955,6 +2779,16 @@ abstract class Module implements ActiveRecordInterface
|
||||
public function clearAllReferences($deep = false)
|
||||
{
|
||||
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) {
|
||||
foreach ($this->collGroupModules as $o) {
|
||||
$o->clearAllReferences($deep);
|
||||
@@ -1971,6 +2805,14 @@ abstract class Module implements ActiveRecordInterface
|
||||
$this->currentLocale = 'en_US';
|
||||
$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) {
|
||||
$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 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 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
|
||||
@@ -557,6 +565,152 @@ abstract class ModuleQuery extends ModelCriteria
|
||||
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
|
||||
*
|
||||
|
||||
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.
|
||||
*/
|
||||
protected $collOrdersRelatedByAddressInvoice;
|
||||
protected $collOrdersRelatedByAddressInvoicePartial;
|
||||
protected $collOrdersRelatedByInvoiceOrderAddressId;
|
||||
protected $collOrdersRelatedByInvoiceOrderAddressIdPartial;
|
||||
|
||||
/**
|
||||
* @var ObjectCollection|ChildOrder[] Collection to store aggregation of ChildOrder objects.
|
||||
*/
|
||||
protected $collOrdersRelatedByAddressDelivery;
|
||||
protected $collOrdersRelatedByAddressDeliveryPartial;
|
||||
protected $collOrdersRelatedByDeliveryOrderAddressId;
|
||||
protected $collOrdersRelatedByDeliveryOrderAddressIdPartial;
|
||||
|
||||
/**
|
||||
* 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.
|
||||
* @var ObjectCollection
|
||||
*/
|
||||
protected $ordersRelatedByAddressInvoiceScheduledForDeletion = null;
|
||||
protected $ordersRelatedByInvoiceOrderAddressIdScheduledForDeletion = null;
|
||||
|
||||
/**
|
||||
* An array of objects scheduled for deletion.
|
||||
* @var ObjectCollection
|
||||
*/
|
||||
protected $ordersRelatedByAddressDeliveryScheduledForDeletion = null;
|
||||
protected $ordersRelatedByDeliveryOrderAddressIdScheduledForDeletion = null;
|
||||
|
||||
/**
|
||||
* 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?
|
||||
|
||||
$this->collOrdersRelatedByAddressInvoice = null;
|
||||
$this->collOrdersRelatedByInvoiceOrderAddressId = null;
|
||||
|
||||
$this->collOrdersRelatedByAddressDelivery = null;
|
||||
$this->collOrdersRelatedByDeliveryOrderAddressId = null;
|
||||
|
||||
} // if (deep)
|
||||
}
|
||||
@@ -1183,36 +1183,34 @@ abstract class OrderAddress implements ActiveRecordInterface
|
||||
$this->resetModified();
|
||||
}
|
||||
|
||||
if ($this->ordersRelatedByAddressInvoiceScheduledForDeletion !== null) {
|
||||
if (!$this->ordersRelatedByAddressInvoiceScheduledForDeletion->isEmpty()) {
|
||||
foreach ($this->ordersRelatedByAddressInvoiceScheduledForDeletion as $orderRelatedByAddressInvoice) {
|
||||
// need to save related object because we set the relation to null
|
||||
$orderRelatedByAddressInvoice->save($con);
|
||||
}
|
||||
$this->ordersRelatedByAddressInvoiceScheduledForDeletion = null;
|
||||
if ($this->ordersRelatedByInvoiceOrderAddressIdScheduledForDeletion !== null) {
|
||||
if (!$this->ordersRelatedByInvoiceOrderAddressIdScheduledForDeletion->isEmpty()) {
|
||||
\Thelia\Model\OrderQuery::create()
|
||||
->filterByPrimaryKeys($this->ordersRelatedByInvoiceOrderAddressIdScheduledForDeletion->getPrimaryKeys(false))
|
||||
->delete($con);
|
||||
$this->ordersRelatedByInvoiceOrderAddressIdScheduledForDeletion = null;
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->collOrdersRelatedByAddressInvoice !== null) {
|
||||
foreach ($this->collOrdersRelatedByAddressInvoice as $referrerFK) {
|
||||
if ($this->collOrdersRelatedByInvoiceOrderAddressId !== null) {
|
||||
foreach ($this->collOrdersRelatedByInvoiceOrderAddressId as $referrerFK) {
|
||||
if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) {
|
||||
$affectedRows += $referrerFK->save($con);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->ordersRelatedByAddressDeliveryScheduledForDeletion !== null) {
|
||||
if (!$this->ordersRelatedByAddressDeliveryScheduledForDeletion->isEmpty()) {
|
||||
foreach ($this->ordersRelatedByAddressDeliveryScheduledForDeletion as $orderRelatedByAddressDelivery) {
|
||||
// need to save related object because we set the relation to null
|
||||
$orderRelatedByAddressDelivery->save($con);
|
||||
}
|
||||
$this->ordersRelatedByAddressDeliveryScheduledForDeletion = null;
|
||||
if ($this->ordersRelatedByDeliveryOrderAddressIdScheduledForDeletion !== null) {
|
||||
if (!$this->ordersRelatedByDeliveryOrderAddressIdScheduledForDeletion->isEmpty()) {
|
||||
\Thelia\Model\OrderQuery::create()
|
||||
->filterByPrimaryKeys($this->ordersRelatedByDeliveryOrderAddressIdScheduledForDeletion->getPrimaryKeys(false))
|
||||
->delete($con);
|
||||
$this->ordersRelatedByDeliveryOrderAddressIdScheduledForDeletion = null;
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->collOrdersRelatedByAddressDelivery !== null) {
|
||||
foreach ($this->collOrdersRelatedByAddressDelivery as $referrerFK) {
|
||||
if ($this->collOrdersRelatedByDeliveryOrderAddressId !== null) {
|
||||
foreach ($this->collOrdersRelatedByDeliveryOrderAddressId as $referrerFK) {
|
||||
if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) {
|
||||
$affectedRows += $referrerFK->save($con);
|
||||
}
|
||||
@@ -1495,11 +1493,11 @@ abstract class OrderAddress implements ActiveRecordInterface
|
||||
}
|
||||
|
||||
if ($includeForeignObjects) {
|
||||
if (null !== $this->collOrdersRelatedByAddressInvoice) {
|
||||
$result['OrdersRelatedByAddressInvoice'] = $this->collOrdersRelatedByAddressInvoice->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
|
||||
if (null !== $this->collOrdersRelatedByInvoiceOrderAddressId) {
|
||||
$result['OrdersRelatedByInvoiceOrderAddressId'] = $this->collOrdersRelatedByInvoiceOrderAddressId->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
|
||||
}
|
||||
if (null !== $this->collOrdersRelatedByAddressDelivery) {
|
||||
$result['OrdersRelatedByAddressDelivery'] = $this->collOrdersRelatedByAddressDelivery->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
|
||||
if (null !== $this->collOrdersRelatedByDeliveryOrderAddressId) {
|
||||
$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.
|
||||
$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
|
||||
$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
|
||||
$copyObj->addOrderRelatedByAddressDelivery($relObj->copy($deepCopy));
|
||||
$copyObj->addOrderRelatedByDeliveryOrderAddressId($relObj->copy($deepCopy));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1775,40 +1773,40 @@ abstract class OrderAddress implements ActiveRecordInterface
|
||||
*/
|
||||
public function initRelation($relationName)
|
||||
{
|
||||
if ('OrderRelatedByAddressInvoice' == $relationName) {
|
||||
return $this->initOrdersRelatedByAddressInvoice();
|
||||
if ('OrderRelatedByInvoiceOrderAddressId' == $relationName) {
|
||||
return $this->initOrdersRelatedByInvoiceOrderAddressId();
|
||||
}
|
||||
if ('OrderRelatedByAddressDelivery' == $relationName) {
|
||||
return $this->initOrdersRelatedByAddressDelivery();
|
||||
if ('OrderRelatedByDeliveryOrderAddressId' == $relationName) {
|
||||
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
|
||||
* them to be refetched by subsequent calls to accessor method.
|
||||
*
|
||||
* @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
|
||||
* 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
|
||||
*/
|
||||
public function initOrdersRelatedByAddressInvoice($overrideExisting = true)
|
||||
public function initOrdersRelatedByInvoiceOrderAddressId($overrideExisting = true)
|
||||
{
|
||||
if (null !== $this->collOrdersRelatedByAddressInvoice && !$overrideExisting) {
|
||||
if (null !== $this->collOrdersRelatedByInvoiceOrderAddressId && !$overrideExisting) {
|
||||
return;
|
||||
}
|
||||
$this->collOrdersRelatedByAddressInvoice = new ObjectCollection();
|
||||
$this->collOrdersRelatedByAddressInvoice->setModel('\Thelia\Model\Order');
|
||||
$this->collOrdersRelatedByInvoiceOrderAddressId = new ObjectCollection();
|
||||
$this->collOrdersRelatedByInvoiceOrderAddressId->setModel('\Thelia\Model\Order');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1840,80 +1838,80 @@ abstract class OrderAddress implements ActiveRecordInterface
|
||||
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function getOrdersRelatedByAddressInvoice($criteria = null, ConnectionInterface $con = null)
|
||||
public function getOrdersRelatedByInvoiceOrderAddressId($criteria = null, ConnectionInterface $con = null)
|
||||
{
|
||||
$partial = $this->collOrdersRelatedByAddressInvoicePartial && !$this->isNew();
|
||||
if (null === $this->collOrdersRelatedByAddressInvoice || null !== $criteria || $partial) {
|
||||
if ($this->isNew() && null === $this->collOrdersRelatedByAddressInvoice) {
|
||||
$partial = $this->collOrdersRelatedByInvoiceOrderAddressIdPartial && !$this->isNew();
|
||||
if (null === $this->collOrdersRelatedByInvoiceOrderAddressId || null !== $criteria || $partial) {
|
||||
if ($this->isNew() && null === $this->collOrdersRelatedByInvoiceOrderAddressId) {
|
||||
// return empty collection
|
||||
$this->initOrdersRelatedByAddressInvoice();
|
||||
$this->initOrdersRelatedByInvoiceOrderAddressId();
|
||||
} else {
|
||||
$collOrdersRelatedByAddressInvoice = ChildOrderQuery::create(null, $criteria)
|
||||
->filterByOrderAddressRelatedByAddressInvoice($this)
|
||||
$collOrdersRelatedByInvoiceOrderAddressId = ChildOrderQuery::create(null, $criteria)
|
||||
->filterByOrderAddressRelatedByInvoiceOrderAddressId($this)
|
||||
->find($con);
|
||||
|
||||
if (null !== $criteria) {
|
||||
if (false !== $this->collOrdersRelatedByAddressInvoicePartial && count($collOrdersRelatedByAddressInvoice)) {
|
||||
$this->initOrdersRelatedByAddressInvoice(false);
|
||||
if (false !== $this->collOrdersRelatedByInvoiceOrderAddressIdPartial && count($collOrdersRelatedByInvoiceOrderAddressId)) {
|
||||
$this->initOrdersRelatedByInvoiceOrderAddressId(false);
|
||||
|
||||
foreach ($collOrdersRelatedByAddressInvoice as $obj) {
|
||||
if (false == $this->collOrdersRelatedByAddressInvoice->contains($obj)) {
|
||||
$this->collOrdersRelatedByAddressInvoice->append($obj);
|
||||
foreach ($collOrdersRelatedByInvoiceOrderAddressId as $obj) {
|
||||
if (false == $this->collOrdersRelatedByInvoiceOrderAddressId->contains($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) {
|
||||
foreach ($this->collOrdersRelatedByAddressInvoice as $obj) {
|
||||
if ($partial && $this->collOrdersRelatedByInvoiceOrderAddressId) {
|
||||
foreach ($this->collOrdersRelatedByInvoiceOrderAddressId as $obj) {
|
||||
if ($obj->isNew()) {
|
||||
$collOrdersRelatedByAddressInvoice[] = $obj;
|
||||
$collOrdersRelatedByInvoiceOrderAddressId[] = $obj;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->collOrdersRelatedByAddressInvoice = $collOrdersRelatedByAddressInvoice;
|
||||
$this->collOrdersRelatedByAddressInvoicePartial = false;
|
||||
$this->collOrdersRelatedByInvoiceOrderAddressId = $collOrdersRelatedByInvoiceOrderAddressId;
|
||||
$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.
|
||||
* 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 $ordersRelatedByAddressInvoice A Propel collection.
|
||||
* @param Collection $ordersRelatedByInvoiceOrderAddressId A Propel collection.
|
||||
* @param ConnectionInterface $con Optional connection object
|
||||
* @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) {
|
||||
$orderRelatedByAddressInvoiceRemoved->setOrderAddressRelatedByAddressInvoice(null);
|
||||
foreach ($ordersRelatedByInvoiceOrderAddressIdToDelete as $orderRelatedByInvoiceOrderAddressIdRemoved) {
|
||||
$orderRelatedByInvoiceOrderAddressIdRemoved->setOrderAddressRelatedByInvoiceOrderAddressId(null);
|
||||
}
|
||||
|
||||
$this->collOrdersRelatedByAddressInvoice = null;
|
||||
foreach ($ordersRelatedByAddressInvoice as $orderRelatedByAddressInvoice) {
|
||||
$this->addOrderRelatedByAddressInvoice($orderRelatedByAddressInvoice);
|
||||
$this->collOrdersRelatedByInvoiceOrderAddressId = null;
|
||||
foreach ($ordersRelatedByInvoiceOrderAddressId as $orderRelatedByInvoiceOrderAddressId) {
|
||||
$this->addOrderRelatedByInvoiceOrderAddressId($orderRelatedByInvoiceOrderAddressId);
|
||||
}
|
||||
|
||||
$this->collOrdersRelatedByAddressInvoice = $ordersRelatedByAddressInvoice;
|
||||
$this->collOrdersRelatedByAddressInvoicePartial = false;
|
||||
$this->collOrdersRelatedByInvoiceOrderAddressId = $ordersRelatedByInvoiceOrderAddressId;
|
||||
$this->collOrdersRelatedByInvoiceOrderAddressIdPartial = false;
|
||||
|
||||
return $this;
|
||||
}
|
||||
@@ -1927,16 +1925,16 @@ abstract class OrderAddress implements ActiveRecordInterface
|
||||
* @return int Count of related Order objects.
|
||||
* @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();
|
||||
if (null === $this->collOrdersRelatedByAddressInvoice || null !== $criteria || $partial) {
|
||||
if ($this->isNew() && null === $this->collOrdersRelatedByAddressInvoice) {
|
||||
$partial = $this->collOrdersRelatedByInvoiceOrderAddressIdPartial && !$this->isNew();
|
||||
if (null === $this->collOrdersRelatedByInvoiceOrderAddressId || null !== $criteria || $partial) {
|
||||
if ($this->isNew() && null === $this->collOrdersRelatedByInvoiceOrderAddressId) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ($partial && !$criteria) {
|
||||
return count($this->getOrdersRelatedByAddressInvoice());
|
||||
return count($this->getOrdersRelatedByInvoiceOrderAddressId());
|
||||
}
|
||||
|
||||
$query = ChildOrderQuery::create(null, $criteria);
|
||||
@@ -1945,11 +1943,11 @@ abstract class OrderAddress implements ActiveRecordInterface
|
||||
}
|
||||
|
||||
return $query
|
||||
->filterByOrderAddressRelatedByAddressInvoice($this)
|
||||
->filterByOrderAddressRelatedByInvoiceOrderAddressId($this)
|
||||
->count($con);
|
||||
}
|
||||
|
||||
return count($this->collOrdersRelatedByAddressInvoice);
|
||||
return count($this->collOrdersRelatedByInvoiceOrderAddressId);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1959,43 +1957,43 @@ abstract class OrderAddress implements ActiveRecordInterface
|
||||
* @param ChildOrder $l ChildOrder
|
||||
* @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) {
|
||||
$this->initOrdersRelatedByAddressInvoice();
|
||||
$this->collOrdersRelatedByAddressInvoicePartial = true;
|
||||
if ($this->collOrdersRelatedByInvoiceOrderAddressId === null) {
|
||||
$this->initOrdersRelatedByInvoiceOrderAddressId();
|
||||
$this->collOrdersRelatedByInvoiceOrderAddressIdPartial = true;
|
||||
}
|
||||
|
||||
if (!in_array($l, $this->collOrdersRelatedByAddressInvoice->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
|
||||
$this->doAddOrderRelatedByAddressInvoice($l);
|
||||
if (!in_array($l, $this->collOrdersRelatedByInvoiceOrderAddressId->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
|
||||
$this->doAddOrderRelatedByInvoiceOrderAddressId($l);
|
||||
}
|
||||
|
||||
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;
|
||||
$orderRelatedByAddressInvoice->setOrderAddressRelatedByAddressInvoice($this);
|
||||
$this->collOrdersRelatedByInvoiceOrderAddressId[]= $orderRelatedByInvoiceOrderAddressId;
|
||||
$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)
|
||||
*/
|
||||
public function removeOrderRelatedByAddressInvoice($orderRelatedByAddressInvoice)
|
||||
public function removeOrderRelatedByInvoiceOrderAddressId($orderRelatedByInvoiceOrderAddressId)
|
||||
{
|
||||
if ($this->getOrdersRelatedByAddressInvoice()->contains($orderRelatedByAddressInvoice)) {
|
||||
$this->collOrdersRelatedByAddressInvoice->remove($this->collOrdersRelatedByAddressInvoice->search($orderRelatedByAddressInvoice));
|
||||
if (null === $this->ordersRelatedByAddressInvoiceScheduledForDeletion) {
|
||||
$this->ordersRelatedByAddressInvoiceScheduledForDeletion = clone $this->collOrdersRelatedByAddressInvoice;
|
||||
$this->ordersRelatedByAddressInvoiceScheduledForDeletion->clear();
|
||||
if ($this->getOrdersRelatedByInvoiceOrderAddressId()->contains($orderRelatedByInvoiceOrderAddressId)) {
|
||||
$this->collOrdersRelatedByInvoiceOrderAddressId->remove($this->collOrdersRelatedByInvoiceOrderAddressId->search($orderRelatedByInvoiceOrderAddressId));
|
||||
if (null === $this->ordersRelatedByInvoiceOrderAddressIdScheduledForDeletion) {
|
||||
$this->ordersRelatedByInvoiceOrderAddressIdScheduledForDeletion = clone $this->collOrdersRelatedByInvoiceOrderAddressId;
|
||||
$this->ordersRelatedByInvoiceOrderAddressIdScheduledForDeletion->clear();
|
||||
}
|
||||
$this->ordersRelatedByAddressInvoiceScheduledForDeletion[]= $orderRelatedByAddressInvoice;
|
||||
$orderRelatedByAddressInvoice->setOrderAddressRelatedByAddressInvoice(null);
|
||||
$this->ordersRelatedByInvoiceOrderAddressIdScheduledForDeletion[]= clone $orderRelatedByInvoiceOrderAddressId;
|
||||
$orderRelatedByInvoiceOrderAddressId->setOrderAddressRelatedByInvoiceOrderAddressId(null);
|
||||
}
|
||||
|
||||
return $this;
|
||||
@@ -2007,7 +2005,7 @@ abstract class OrderAddress implements ActiveRecordInterface
|
||||
* 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 OrdersRelatedByAddressInvoice from storage.
|
||||
* 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
|
||||
@@ -2018,12 +2016,12 @@ abstract class OrderAddress implements ActiveRecordInterface
|
||||
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||
* @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->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.
|
||||
* Otherwise if this OrderAddress is new, it will return
|
||||
* 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
|
||||
* 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)
|
||||
* @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->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.
|
||||
* Otherwise if this OrderAddress is new, it will return
|
||||
* 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
|
||||
* 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)
|
||||
* @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->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
|
||||
* them to be refetched by subsequent calls to accessor method.
|
||||
*
|
||||
* @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
|
||||
* 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
|
||||
*/
|
||||
public function initOrdersRelatedByAddressDelivery($overrideExisting = true)
|
||||
public function initOrdersRelatedByDeliveryOrderAddressId($overrideExisting = true)
|
||||
{
|
||||
if (null !== $this->collOrdersRelatedByAddressDelivery && !$overrideExisting) {
|
||||
if (null !== $this->collOrdersRelatedByDeliveryOrderAddressId && !$overrideExisting) {
|
||||
return;
|
||||
}
|
||||
$this->collOrdersRelatedByAddressDelivery = new ObjectCollection();
|
||||
$this->collOrdersRelatedByAddressDelivery->setModel('\Thelia\Model\Order');
|
||||
$this->collOrdersRelatedByDeliveryOrderAddressId = new ObjectCollection();
|
||||
$this->collOrdersRelatedByDeliveryOrderAddressId->setModel('\Thelia\Model\Order');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2133,80 +2206,80 @@ abstract class OrderAddress implements ActiveRecordInterface
|
||||
* @return Collection|ChildOrder[] List of ChildOrder objects
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function getOrdersRelatedByAddressDelivery($criteria = null, ConnectionInterface $con = null)
|
||||
public function getOrdersRelatedByDeliveryOrderAddressId($criteria = null, ConnectionInterface $con = null)
|
||||
{
|
||||
$partial = $this->collOrdersRelatedByAddressDeliveryPartial && !$this->isNew();
|
||||
if (null === $this->collOrdersRelatedByAddressDelivery || null !== $criteria || $partial) {
|
||||
if ($this->isNew() && null === $this->collOrdersRelatedByAddressDelivery) {
|
||||
$partial = $this->collOrdersRelatedByDeliveryOrderAddressIdPartial && !$this->isNew();
|
||||
if (null === $this->collOrdersRelatedByDeliveryOrderAddressId || null !== $criteria || $partial) {
|
||||
if ($this->isNew() && null === $this->collOrdersRelatedByDeliveryOrderAddressId) {
|
||||
// return empty collection
|
||||
$this->initOrdersRelatedByAddressDelivery();
|
||||
$this->initOrdersRelatedByDeliveryOrderAddressId();
|
||||
} else {
|
||||
$collOrdersRelatedByAddressDelivery = ChildOrderQuery::create(null, $criteria)
|
||||
->filterByOrderAddressRelatedByAddressDelivery($this)
|
||||
$collOrdersRelatedByDeliveryOrderAddressId = ChildOrderQuery::create(null, $criteria)
|
||||
->filterByOrderAddressRelatedByDeliveryOrderAddressId($this)
|
||||
->find($con);
|
||||
|
||||
if (null !== $criteria) {
|
||||
if (false !== $this->collOrdersRelatedByAddressDeliveryPartial && count($collOrdersRelatedByAddressDelivery)) {
|
||||
$this->initOrdersRelatedByAddressDelivery(false);
|
||||
if (false !== $this->collOrdersRelatedByDeliveryOrderAddressIdPartial && count($collOrdersRelatedByDeliveryOrderAddressId)) {
|
||||
$this->initOrdersRelatedByDeliveryOrderAddressId(false);
|
||||
|
||||
foreach ($collOrdersRelatedByAddressDelivery as $obj) {
|
||||
if (false == $this->collOrdersRelatedByAddressDelivery->contains($obj)) {
|
||||
$this->collOrdersRelatedByAddressDelivery->append($obj);
|
||||
foreach ($collOrdersRelatedByDeliveryOrderAddressId as $obj) {
|
||||
if (false == $this->collOrdersRelatedByDeliveryOrderAddressId->contains($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) {
|
||||
foreach ($this->collOrdersRelatedByAddressDelivery as $obj) {
|
||||
if ($partial && $this->collOrdersRelatedByDeliveryOrderAddressId) {
|
||||
foreach ($this->collOrdersRelatedByDeliveryOrderAddressId as $obj) {
|
||||
if ($obj->isNew()) {
|
||||
$collOrdersRelatedByAddressDelivery[] = $obj;
|
||||
$collOrdersRelatedByDeliveryOrderAddressId[] = $obj;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->collOrdersRelatedByAddressDelivery = $collOrdersRelatedByAddressDelivery;
|
||||
$this->collOrdersRelatedByAddressDeliveryPartial = false;
|
||||
$this->collOrdersRelatedByDeliveryOrderAddressId = $collOrdersRelatedByDeliveryOrderAddressId;
|
||||
$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.
|
||||
* 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 $ordersRelatedByAddressDelivery A Propel collection.
|
||||
* @param Collection $ordersRelatedByDeliveryOrderAddressId A Propel collection.
|
||||
* @param ConnectionInterface $con Optional connection object
|
||||
* @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) {
|
||||
$orderRelatedByAddressDeliveryRemoved->setOrderAddressRelatedByAddressDelivery(null);
|
||||
foreach ($ordersRelatedByDeliveryOrderAddressIdToDelete as $orderRelatedByDeliveryOrderAddressIdRemoved) {
|
||||
$orderRelatedByDeliveryOrderAddressIdRemoved->setOrderAddressRelatedByDeliveryOrderAddressId(null);
|
||||
}
|
||||
|
||||
$this->collOrdersRelatedByAddressDelivery = null;
|
||||
foreach ($ordersRelatedByAddressDelivery as $orderRelatedByAddressDelivery) {
|
||||
$this->addOrderRelatedByAddressDelivery($orderRelatedByAddressDelivery);
|
||||
$this->collOrdersRelatedByDeliveryOrderAddressId = null;
|
||||
foreach ($ordersRelatedByDeliveryOrderAddressId as $orderRelatedByDeliveryOrderAddressId) {
|
||||
$this->addOrderRelatedByDeliveryOrderAddressId($orderRelatedByDeliveryOrderAddressId);
|
||||
}
|
||||
|
||||
$this->collOrdersRelatedByAddressDelivery = $ordersRelatedByAddressDelivery;
|
||||
$this->collOrdersRelatedByAddressDeliveryPartial = false;
|
||||
$this->collOrdersRelatedByDeliveryOrderAddressId = $ordersRelatedByDeliveryOrderAddressId;
|
||||
$this->collOrdersRelatedByDeliveryOrderAddressIdPartial = false;
|
||||
|
||||
return $this;
|
||||
}
|
||||
@@ -2220,16 +2293,16 @@ abstract class OrderAddress implements ActiveRecordInterface
|
||||
* @return int Count of related Order objects.
|
||||
* @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();
|
||||
if (null === $this->collOrdersRelatedByAddressDelivery || null !== $criteria || $partial) {
|
||||
if ($this->isNew() && null === $this->collOrdersRelatedByAddressDelivery) {
|
||||
$partial = $this->collOrdersRelatedByDeliveryOrderAddressIdPartial && !$this->isNew();
|
||||
if (null === $this->collOrdersRelatedByDeliveryOrderAddressId || null !== $criteria || $partial) {
|
||||
if ($this->isNew() && null === $this->collOrdersRelatedByDeliveryOrderAddressId) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ($partial && !$criteria) {
|
||||
return count($this->getOrdersRelatedByAddressDelivery());
|
||||
return count($this->getOrdersRelatedByDeliveryOrderAddressId());
|
||||
}
|
||||
|
||||
$query = ChildOrderQuery::create(null, $criteria);
|
||||
@@ -2238,11 +2311,11 @@ abstract class OrderAddress implements ActiveRecordInterface
|
||||
}
|
||||
|
||||
return $query
|
||||
->filterByOrderAddressRelatedByAddressDelivery($this)
|
||||
->filterByOrderAddressRelatedByDeliveryOrderAddressId($this)
|
||||
->count($con);
|
||||
}
|
||||
|
||||
return count($this->collOrdersRelatedByAddressDelivery);
|
||||
return count($this->collOrdersRelatedByDeliveryOrderAddressId);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2252,43 +2325,43 @@ abstract class OrderAddress implements ActiveRecordInterface
|
||||
* @param ChildOrder $l ChildOrder
|
||||
* @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) {
|
||||
$this->initOrdersRelatedByAddressDelivery();
|
||||
$this->collOrdersRelatedByAddressDeliveryPartial = true;
|
||||
if ($this->collOrdersRelatedByDeliveryOrderAddressId === null) {
|
||||
$this->initOrdersRelatedByDeliveryOrderAddressId();
|
||||
$this->collOrdersRelatedByDeliveryOrderAddressIdPartial = true;
|
||||
}
|
||||
|
||||
if (!in_array($l, $this->collOrdersRelatedByAddressDelivery->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
|
||||
$this->doAddOrderRelatedByAddressDelivery($l);
|
||||
if (!in_array($l, $this->collOrdersRelatedByDeliveryOrderAddressId->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
|
||||
$this->doAddOrderRelatedByDeliveryOrderAddressId($l);
|
||||
}
|
||||
|
||||
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;
|
||||
$orderRelatedByAddressDelivery->setOrderAddressRelatedByAddressDelivery($this);
|
||||
$this->collOrdersRelatedByDeliveryOrderAddressId[]= $orderRelatedByDeliveryOrderAddressId;
|
||||
$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)
|
||||
*/
|
||||
public function removeOrderRelatedByAddressDelivery($orderRelatedByAddressDelivery)
|
||||
public function removeOrderRelatedByDeliveryOrderAddressId($orderRelatedByDeliveryOrderAddressId)
|
||||
{
|
||||
if ($this->getOrdersRelatedByAddressDelivery()->contains($orderRelatedByAddressDelivery)) {
|
||||
$this->collOrdersRelatedByAddressDelivery->remove($this->collOrdersRelatedByAddressDelivery->search($orderRelatedByAddressDelivery));
|
||||
if (null === $this->ordersRelatedByAddressDeliveryScheduledForDeletion) {
|
||||
$this->ordersRelatedByAddressDeliveryScheduledForDeletion = clone $this->collOrdersRelatedByAddressDelivery;
|
||||
$this->ordersRelatedByAddressDeliveryScheduledForDeletion->clear();
|
||||
if ($this->getOrdersRelatedByDeliveryOrderAddressId()->contains($orderRelatedByDeliveryOrderAddressId)) {
|
||||
$this->collOrdersRelatedByDeliveryOrderAddressId->remove($this->collOrdersRelatedByDeliveryOrderAddressId->search($orderRelatedByDeliveryOrderAddressId));
|
||||
if (null === $this->ordersRelatedByDeliveryOrderAddressIdScheduledForDeletion) {
|
||||
$this->ordersRelatedByDeliveryOrderAddressIdScheduledForDeletion = clone $this->collOrdersRelatedByDeliveryOrderAddressId;
|
||||
$this->ordersRelatedByDeliveryOrderAddressIdScheduledForDeletion->clear();
|
||||
}
|
||||
$this->ordersRelatedByAddressDeliveryScheduledForDeletion[]= $orderRelatedByAddressDelivery;
|
||||
$orderRelatedByAddressDelivery->setOrderAddressRelatedByAddressDelivery(null);
|
||||
$this->ordersRelatedByDeliveryOrderAddressIdScheduledForDeletion[]= clone $orderRelatedByDeliveryOrderAddressId;
|
||||
$orderRelatedByDeliveryOrderAddressId->setOrderAddressRelatedByDeliveryOrderAddressId(null);
|
||||
}
|
||||
|
||||
return $this;
|
||||
@@ -2300,7 +2373,7 @@ abstract class OrderAddress implements ActiveRecordInterface
|
||||
* 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 OrdersRelatedByAddressDelivery from storage.
|
||||
* 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
|
||||
@@ -2311,12 +2384,12 @@ abstract class OrderAddress implements ActiveRecordInterface
|
||||
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||
* @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->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.
|
||||
* Otherwise if this OrderAddress is new, it will return
|
||||
* 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
|
||||
* 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)
|
||||
* @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->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.
|
||||
* Otherwise if this OrderAddress is new, it will return
|
||||
* 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
|
||||
* 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)
|
||||
* @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->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)
|
||||
{
|
||||
if ($deep) {
|
||||
if ($this->collOrdersRelatedByAddressInvoice) {
|
||||
foreach ($this->collOrdersRelatedByAddressInvoice as $o) {
|
||||
if ($this->collOrdersRelatedByInvoiceOrderAddressId) {
|
||||
foreach ($this->collOrdersRelatedByInvoiceOrderAddressId as $o) {
|
||||
$o->clearAllReferences($deep);
|
||||
}
|
||||
}
|
||||
if ($this->collOrdersRelatedByAddressDelivery) {
|
||||
foreach ($this->collOrdersRelatedByAddressDelivery as $o) {
|
||||
if ($this->collOrdersRelatedByDeliveryOrderAddressId) {
|
||||
foreach ($this->collOrdersRelatedByDeliveryOrderAddressId as $o) {
|
||||
$o->clearAllReferences($deep);
|
||||
}
|
||||
}
|
||||
} // if ($deep)
|
||||
|
||||
if ($this->collOrdersRelatedByAddressInvoice instanceof Collection) {
|
||||
$this->collOrdersRelatedByAddressInvoice->clearIterator();
|
||||
if ($this->collOrdersRelatedByInvoiceOrderAddressId instanceof Collection) {
|
||||
$this->collOrdersRelatedByInvoiceOrderAddressId->clearIterator();
|
||||
}
|
||||
$this->collOrdersRelatedByAddressInvoice = null;
|
||||
if ($this->collOrdersRelatedByAddressDelivery instanceof Collection) {
|
||||
$this->collOrdersRelatedByAddressDelivery->clearIterator();
|
||||
$this->collOrdersRelatedByInvoiceOrderAddressId = null;
|
||||
if ($this->collOrdersRelatedByDeliveryOrderAddressId instanceof Collection) {
|
||||
$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 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 rightJoinOrderRelatedByAddressInvoice($relationAlias = null) Adds a RIGHT JOIN clause to the query using the OrderRelatedByAddressInvoice relation
|
||||
* @method ChildOrderAddressQuery innerJoinOrderRelatedByAddressInvoice($relationAlias = null) Adds a INNER 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 rightJoinOrderRelatedByInvoiceOrderAddressId($relationAlias = null) Adds a RIGHT JOIN clause to the query using the OrderRelatedByInvoiceOrderAddressId 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 rightJoinOrderRelatedByAddressDelivery($relationAlias = null) Adds a RIGHT JOIN clause to the query using the OrderRelatedByAddressDelivery relation
|
||||
* @method ChildOrderAddressQuery innerJoinOrderRelatedByAddressDelivery($relationAlias = null) Adds a INNER 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 rightJoinOrderRelatedByDeliveryOrderAddressId($relationAlias = null) Adds a RIGHT JOIN clause to the query using the OrderRelatedByDeliveryOrderAddressId 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 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
|
||||
*/
|
||||
public function filterByOrderRelatedByAddressInvoice($order, $comparison = null)
|
||||
public function filterByOrderRelatedByInvoiceOrderAddressId($order, $comparison = null)
|
||||
{
|
||||
if ($order instanceof \Thelia\Model\Order) {
|
||||
return $this
|
||||
->addUsingAlias(OrderAddressTableMap::ID, $order->getAddressInvoice(), $comparison);
|
||||
->addUsingAlias(OrderAddressTableMap::ID, $order->getInvoiceOrderAddressId(), $comparison);
|
||||
} elseif ($order instanceof ObjectCollection) {
|
||||
return $this
|
||||
->useOrderRelatedByAddressInvoiceQuery()
|
||||
->useOrderRelatedByInvoiceOrderAddressIdQuery()
|
||||
->filterByPrimaryKeys($order->getPrimaryKeys())
|
||||
->endUse();
|
||||
} 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 $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @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();
|
||||
$relationMap = $tableMap->getRelation('OrderRelatedByAddressInvoice');
|
||||
$relationMap = $tableMap->getRelation('OrderRelatedByInvoiceOrderAddressId');
|
||||
|
||||
// create a ModelJoin object for this join
|
||||
$join = new ModelJoin();
|
||||
@@ -791,14 +791,14 @@ abstract class OrderAddressQuery extends ModelCriteria
|
||||
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||
$this->addJoinObject($join, $relationAlias);
|
||||
} else {
|
||||
$this->addJoinObject($join, 'OrderRelatedByAddressInvoice');
|
||||
$this->addJoinObject($join, 'OrderRelatedByInvoiceOrderAddressId');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the OrderRelatedByAddressInvoice relation Order object
|
||||
* Use the OrderRelatedByInvoiceOrderAddressId relation Order object
|
||||
*
|
||||
* @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
|
||||
*/
|
||||
public function useOrderRelatedByAddressInvoiceQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
||||
public function useOrderRelatedByInvoiceOrderAddressIdQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinOrderRelatedByAddressInvoice($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'OrderRelatedByAddressInvoice', '\Thelia\Model\OrderQuery');
|
||||
->joinOrderRelatedByInvoiceOrderAddressId($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'OrderRelatedByInvoiceOrderAddressId', '\Thelia\Model\OrderQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -823,33 +823,33 @@ abstract class OrderAddressQuery extends ModelCriteria
|
||||
*
|
||||
* @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) {
|
||||
return $this
|
||||
->addUsingAlias(OrderAddressTableMap::ID, $order->getAddressDelivery(), $comparison);
|
||||
->addUsingAlias(OrderAddressTableMap::ID, $order->getDeliveryOrderAddressId(), $comparison);
|
||||
} elseif ($order instanceof ObjectCollection) {
|
||||
return $this
|
||||
->useOrderRelatedByAddressDeliveryQuery()
|
||||
->useOrderRelatedByDeliveryOrderAddressIdQuery()
|
||||
->filterByPrimaryKeys($order->getPrimaryKeys())
|
||||
->endUse();
|
||||
} 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 $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @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();
|
||||
$relationMap = $tableMap->getRelation('OrderRelatedByAddressDelivery');
|
||||
$relationMap = $tableMap->getRelation('OrderRelatedByDeliveryOrderAddressId');
|
||||
|
||||
// create a ModelJoin object for this join
|
||||
$join = new ModelJoin();
|
||||
@@ -864,14 +864,14 @@ abstract class OrderAddressQuery extends ModelCriteria
|
||||
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||
$this->addJoinObject($join, $relationAlias);
|
||||
} else {
|
||||
$this->addJoinObject($join, 'OrderRelatedByAddressDelivery');
|
||||
$this->addJoinObject($join, 'OrderRelatedByDeliveryOrderAddressId');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the OrderRelatedByAddressDelivery relation Order object
|
||||
* Use the OrderRelatedByDeliveryOrderAddressId relation Order object
|
||||
*
|
||||
* @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
|
||||
*/
|
||||
public function useOrderRelatedByAddressDeliveryQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
||||
public function useOrderRelatedByDeliveryOrderAddressIdQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinOrderRelatedByAddressDelivery($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'OrderRelatedByAddressDelivery', '\Thelia\Model\OrderQuery');
|
||||
->joinOrderRelatedByDeliveryOrderAddressId($relationAlias, $joinType)
|
||||
->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 orderByRef($order = Criteria::ASC) Order by the ref 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 orderByAddressDelivery($order = Criteria::ASC) Order by the address_delivery column
|
||||
* @method ChildOrderQuery orderByInvoiceOrderAddressId($order = Criteria::ASC) Order by the invoice_order_address_id 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 orderByCurrencyId($order = Criteria::ASC) Order by the currency_id 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 orderByDeliveryNum($order = Criteria::ASC) Order by the delivery_num column
|
||||
* @method ChildOrderQuery orderByInvoice($order = Criteria::ASC) Order by the invoice column
|
||||
* @method ChildOrderQuery orderByTransactionRef($order = Criteria::ASC) Order by the transaction_ref column
|
||||
* @method ChildOrderQuery orderByDeliveryRef($order = Criteria::ASC) Order by the delivery_ref 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 orderByPayment($order = Criteria::ASC) Order by the payment column
|
||||
* @method ChildOrderQuery orderByCarrier($order = Criteria::ASC) Order by the carrier column
|
||||
* @method ChildOrderQuery orderByPaymentModuleId($order = Criteria::ASC) Order by the payment_module_id 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 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 orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
|
||||
*
|
||||
* @method ChildOrderQuery groupById() Group by the id column
|
||||
* @method ChildOrderQuery groupByRef() Group by the ref column
|
||||
* @method ChildOrderQuery groupByCustomerId() Group by the customer_id column
|
||||
* @method ChildOrderQuery groupByAddressInvoice() Group by the address_invoice column
|
||||
* @method ChildOrderQuery groupByAddressDelivery() Group by the address_delivery column
|
||||
* @method ChildOrderQuery groupByInvoiceOrderAddressId() Group by the invoice_order_address_id column
|
||||
* @method ChildOrderQuery groupByDeliveryOrderAddressId() Group by the delivery_order_address_id column
|
||||
* @method ChildOrderQuery groupByInvoiceDate() Group by the invoice_date column
|
||||
* @method ChildOrderQuery groupByCurrencyId() Group by the currency_id column
|
||||
* @method ChildOrderQuery groupByCurrencyRate() Group by the currency_rate column
|
||||
* @method ChildOrderQuery groupByTransaction() Group by the transaction column
|
||||
* @method ChildOrderQuery groupByDeliveryNum() Group by the delivery_num column
|
||||
* @method ChildOrderQuery groupByInvoice() Group by the invoice column
|
||||
* @method ChildOrderQuery groupByTransactionRef() Group by the transaction_ref column
|
||||
* @method ChildOrderQuery groupByDeliveryRef() Group by the delivery_ref column
|
||||
* @method ChildOrderQuery groupByInvoiceRef() Group by the invoice_ref column
|
||||
* @method ChildOrderQuery groupByPostage() Group by the postage column
|
||||
* @method ChildOrderQuery groupByPayment() Group by the payment column
|
||||
* @method ChildOrderQuery groupByCarrier() Group by the carrier column
|
||||
* @method ChildOrderQuery groupByPaymentModuleId() Group by the payment_module_id column
|
||||
* @method ChildOrderQuery groupByDeliveryModuleId() Group by the delivery_module_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 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 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 rightJoinOrderAddressRelatedByAddressInvoice($relationAlias = null) Adds a RIGHT JOIN clause to the query using the OrderAddressRelatedByAddressInvoice relation
|
||||
* @method ChildOrderQuery innerJoinOrderAddressRelatedByAddressInvoice($relationAlias = null) Adds a INNER 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 rightJoinOrderAddressRelatedByInvoiceOrderAddressId($relationAlias = null) Adds a RIGHT JOIN clause to the query using the OrderAddressRelatedByInvoiceOrderAddressId 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 rightJoinOrderAddressRelatedByAddressDelivery($relationAlias = null) Adds a RIGHT JOIN clause to the query using the OrderAddressRelatedByAddressDelivery relation
|
||||
* @method ChildOrderQuery innerJoinOrderAddressRelatedByAddressDelivery($relationAlias = null) Adds a INNER 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 rightJoinOrderAddressRelatedByDeliveryOrderAddressId($relationAlias = null) Adds a RIGHT JOIN clause to the query using the OrderAddressRelatedByDeliveryOrderAddressId 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 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 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 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
|
||||
@@ -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 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 findOneByAddressInvoice(int $address_invoice) Return the first ChildOrder filtered by the address_invoice column
|
||||
* @method ChildOrder findOneByAddressDelivery(int $address_delivery) Return the first ChildOrder filtered by the address_delivery column
|
||||
* @method ChildOrder findOneByInvoiceOrderAddressId(int $invoice_order_address_id) Return the first ChildOrder filtered by the invoice_order_address_id 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 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 findOneByTransaction(string $transaction) Return the first ChildOrder filtered by the transaction column
|
||||
* @method ChildOrder findOneByDeliveryNum(string $delivery_num) Return the first ChildOrder filtered by the delivery_num column
|
||||
* @method ChildOrder findOneByInvoice(string $invoice) Return the first ChildOrder filtered by the invoice column
|
||||
* @method ChildOrder findOneByTransactionRef(string $transaction_ref) Return the first ChildOrder filtered by the transaction_ref column
|
||||
* @method ChildOrder findOneByDeliveryRef(string $delivery_ref) Return the first ChildOrder filtered by the delivery_ref 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 findOneByPayment(string $payment) Return the first ChildOrder filtered by the payment column
|
||||
* @method ChildOrder findOneByCarrier(string $carrier) Return the first ChildOrder filtered by the carrier column
|
||||
* @method ChildOrder findOneByPaymentModuleId(int $payment_module_id) Return the first ChildOrder filtered by the payment_module_id 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 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 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 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 findByAddressInvoice(int $address_invoice) Return ChildOrder objects filtered by the address_invoice column
|
||||
* @method array findByAddressDelivery(int $address_delivery) Return ChildOrder objects filtered by the address_delivery column
|
||||
* @method array findByInvoiceOrderAddressId(int $invoice_order_address_id) Return ChildOrder objects filtered by the invoice_order_address_id 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 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 findByTransaction(string $transaction) Return ChildOrder objects filtered by the transaction column
|
||||
* @method array findByDeliveryNum(string $delivery_num) Return ChildOrder objects filtered by the delivery_num column
|
||||
* @method array findByInvoice(string $invoice) Return ChildOrder objects filtered by the invoice column
|
||||
* @method array findByTransactionRef(string $transaction_ref) Return ChildOrder objects filtered by the transaction_ref column
|
||||
* @method array findByDeliveryRef(string $delivery_ref) Return ChildOrder objects filtered by the delivery_ref 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 findByPayment(string $payment) Return ChildOrder objects filtered by the payment column
|
||||
* @method array findByCarrier(string $carrier) Return ChildOrder objects filtered by the carrier column
|
||||
* @method array findByPaymentModuleId(int $payment_module_id) Return ChildOrder objects filtered by the payment_module_id 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 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 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)
|
||||
{
|
||||
$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 {
|
||||
$stmt = $con->prepare($sql);
|
||||
$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:
|
||||
* <code>
|
||||
* $query->filterByAddressInvoice(1234); // WHERE address_invoice = 1234
|
||||
* $query->filterByAddressInvoice(array(12, 34)); // WHERE address_invoice IN (12, 34)
|
||||
* $query->filterByAddressInvoice(array('min' => 12)); // WHERE address_invoice > 12
|
||||
* $query->filterByInvoiceOrderAddressId(1234); // WHERE invoice_order_address_id = 1234
|
||||
* $query->filterByInvoiceOrderAddressId(array(12, 34)); // WHERE invoice_order_address_id IN (12, 34)
|
||||
* $query->filterByInvoiceOrderAddressId(array('min' => 12)); // WHERE invoice_order_address_id > 12
|
||||
* </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 array values for in_array() equivalent.
|
||||
* 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
|
||||
*/
|
||||
public function filterByAddressInvoice($addressInvoice = null, $comparison = null)
|
||||
public function filterByInvoiceOrderAddressId($invoiceOrderAddressId = null, $comparison = null)
|
||||
{
|
||||
if (is_array($addressInvoice)) {
|
||||
if (is_array($invoiceOrderAddressId)) {
|
||||
$useMinMax = false;
|
||||
if (isset($addressInvoice['min'])) {
|
||||
$this->addUsingAlias(OrderTableMap::ADDRESS_INVOICE, $addressInvoice['min'], Criteria::GREATER_EQUAL);
|
||||
if (isset($invoiceOrderAddressId['min'])) {
|
||||
$this->addUsingAlias(OrderTableMap::INVOICE_ORDER_ADDRESS_ID, $invoiceOrderAddressId['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($addressInvoice['max'])) {
|
||||
$this->addUsingAlias(OrderTableMap::ADDRESS_INVOICE, $addressInvoice['max'], Criteria::LESS_EQUAL);
|
||||
if (isset($invoiceOrderAddressId['max'])) {
|
||||
$this->addUsingAlias(OrderTableMap::INVOICE_ORDER_ADDRESS_ID, $invoiceOrderAddressId['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
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:
|
||||
* <code>
|
||||
* $query->filterByAddressDelivery(1234); // WHERE address_delivery = 1234
|
||||
* $query->filterByAddressDelivery(array(12, 34)); // WHERE address_delivery IN (12, 34)
|
||||
* $query->filterByAddressDelivery(array('min' => 12)); // WHERE address_delivery > 12
|
||||
* $query->filterByDeliveryOrderAddressId(1234); // WHERE delivery_order_address_id = 1234
|
||||
* $query->filterByDeliveryOrderAddressId(array(12, 34)); // WHERE delivery_order_address_id IN (12, 34)
|
||||
* $query->filterByDeliveryOrderAddressId(array('min' => 12)); // WHERE delivery_order_address_id > 12
|
||||
* </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 array values for in_array() equivalent.
|
||||
* 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
|
||||
*/
|
||||
public function filterByAddressDelivery($addressDelivery = null, $comparison = null)
|
||||
public function filterByDeliveryOrderAddressId($deliveryOrderAddressId = null, $comparison = null)
|
||||
{
|
||||
if (is_array($addressDelivery)) {
|
||||
if (is_array($deliveryOrderAddressId)) {
|
||||
$useMinMax = false;
|
||||
if (isset($addressDelivery['min'])) {
|
||||
$this->addUsingAlias(OrderTableMap::ADDRESS_DELIVERY, $addressDelivery['min'], Criteria::GREATER_EQUAL);
|
||||
if (isset($deliveryOrderAddressId['min'])) {
|
||||
$this->addUsingAlias(OrderTableMap::DELIVERY_ORDER_ADDRESS_ID, $deliveryOrderAddressId['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($addressDelivery['max'])) {
|
||||
$this->addUsingAlias(OrderTableMap::ADDRESS_DELIVERY, $addressDelivery['max'], Criteria::LESS_EQUAL);
|
||||
if (isset($deliveryOrderAddressId['max'])) {
|
||||
$this->addUsingAlias(OrderTableMap::DELIVERY_ORDER_ADDRESS_ID, $deliveryOrderAddressId['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
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:
|
||||
* <code>
|
||||
* $query->filterByTransaction('fooValue'); // WHERE transaction = 'fooValue'
|
||||
* $query->filterByTransaction('%fooValue%'); // WHERE transaction LIKE '%fooValue%'
|
||||
* $query->filterByTransactionRef('fooValue'); // WHERE transaction_ref = 'fooValue'
|
||||
* $query->filterByTransactionRef('%fooValue%'); // WHERE transaction_ref LIKE '%fooValue%'
|
||||
* </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)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @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 (is_array($transaction)) {
|
||||
if (is_array($transactionRef)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $transaction)) {
|
||||
$transaction = str_replace('*', '%', $transaction);
|
||||
} elseif (preg_match('/[\%\*]/', $transactionRef)) {
|
||||
$transactionRef = str_replace('*', '%', $transactionRef);
|
||||
$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:
|
||||
* <code>
|
||||
* $query->filterByDeliveryNum('fooValue'); // WHERE delivery_num = 'fooValue'
|
||||
* $query->filterByDeliveryNum('%fooValue%'); // WHERE delivery_num LIKE '%fooValue%'
|
||||
* $query->filterByDeliveryRef('fooValue'); // WHERE delivery_ref = 'fooValue'
|
||||
* $query->filterByDeliveryRef('%fooValue%'); // WHERE delivery_ref LIKE '%fooValue%'
|
||||
* </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)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @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 (is_array($deliveryNum)) {
|
||||
if (is_array($deliveryRef)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $deliveryNum)) {
|
||||
$deliveryNum = str_replace('*', '%', $deliveryNum);
|
||||
} elseif (preg_match('/[\%\*]/', $deliveryRef)) {
|
||||
$deliveryRef = str_replace('*', '%', $deliveryRef);
|
||||
$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:
|
||||
* <code>
|
||||
* $query->filterByInvoice('fooValue'); // WHERE invoice = 'fooValue'
|
||||
* $query->filterByInvoice('%fooValue%'); // WHERE invoice LIKE '%fooValue%'
|
||||
* $query->filterByInvoiceRef('fooValue'); // WHERE invoice_ref = 'fooValue'
|
||||
* $query->filterByInvoiceRef('%fooValue%'); // WHERE invoice_ref LIKE '%fooValue%'
|
||||
* </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)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @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 (is_array($invoice)) {
|
||||
if (is_array($invoiceRef)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $invoice)) {
|
||||
$invoice = str_replace('*', '%', $invoice);
|
||||
} elseif (preg_match('/[\%\*]/', $invoiceRef)) {
|
||||
$invoiceRef = str_replace('*', '%', $invoiceRef);
|
||||
$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:
|
||||
* <code>
|
||||
* $query->filterByPayment('fooValue'); // WHERE payment = 'fooValue'
|
||||
* $query->filterByPayment('%fooValue%'); // WHERE payment LIKE '%fooValue%'
|
||||
* $query->filterByPaymentModuleId(1234); // WHERE payment_module_id = 1234
|
||||
* $query->filterByPaymentModuleId(array(12, 34)); // WHERE payment_module_id IN (12, 34)
|
||||
* $query->filterByPaymentModuleId(array('min' => 12)); // WHERE payment_module_id > 12
|
||||
* </code>
|
||||
*
|
||||
* @param string $payment The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @see filterByModuleRelatedByPaymentModuleId()
|
||||
*
|
||||
* @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
|
||||
*
|
||||
* @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($payment)) {
|
||||
if (is_array($paymentModuleId)) {
|
||||
$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;
|
||||
} 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:
|
||||
* <code>
|
||||
* $query->filterByCarrier('fooValue'); // WHERE carrier = 'fooValue'
|
||||
* $query->filterByCarrier('%fooValue%'); // WHERE carrier LIKE '%fooValue%'
|
||||
* $query->filterByDeliveryModuleId(1234); // WHERE delivery_module_id = 1234
|
||||
* $query->filterByDeliveryModuleId(array(12, 34)); // WHERE delivery_module_id IN (12, 34)
|
||||
* $query->filterByDeliveryModuleId(array('min' => 12)); // WHERE delivery_module_id > 12
|
||||
* </code>
|
||||
*
|
||||
* @param string $carrier The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @see filterByModuleRelatedByDeliveryModuleId()
|
||||
*
|
||||
* @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
|
||||
*
|
||||
* @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($carrier)) {
|
||||
if (is_array($deliveryModuleId)) {
|
||||
$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;
|
||||
} 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:
|
||||
* <code>
|
||||
* $query->filterByLang('fooValue'); // WHERE lang = 'fooValue'
|
||||
* $query->filterByLang('%fooValue%'); // WHERE lang LIKE '%fooValue%'
|
||||
* $query->filterByLangId(1234); // WHERE lang_id = 1234
|
||||
* $query->filterByLangId(array(12, 34)); // WHERE lang_id IN (12, 34)
|
||||
* $query->filterByLangId(array('min' => 12)); // WHERE lang_id > 12
|
||||
* </code>
|
||||
*
|
||||
* @param string $lang The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @see filterByLang()
|
||||
*
|
||||
* @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
|
||||
*
|
||||
* @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($lang)) {
|
||||
if (is_array($langId)) {
|
||||
$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;
|
||||
} 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
|
||||
*/
|
||||
public function joinCurrency($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
||||
public function joinCurrency($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
$tableMap = $this->getTableMap();
|
||||
$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
|
||||
*/
|
||||
public function useCurrencyQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
||||
public function useCurrencyQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinCurrency($relationAlias, $joinType)
|
||||
@@ -1136,35 +1190,35 @@ abstract class OrderQuery extends ModelCriteria
|
||||
*
|
||||
* @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) {
|
||||
return $this
|
||||
->addUsingAlias(OrderTableMap::ADDRESS_INVOICE, $orderAddress->getId(), $comparison);
|
||||
->addUsingAlias(OrderTableMap::INVOICE_ORDER_ADDRESS_ID, $orderAddress->getId(), $comparison);
|
||||
} elseif ($orderAddress instanceof ObjectCollection) {
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
|
||||
return $this
|
||||
->addUsingAlias(OrderTableMap::ADDRESS_INVOICE, $orderAddress->toKeyValue('PrimaryKey', 'Id'), $comparison);
|
||||
->addUsingAlias(OrderTableMap::INVOICE_ORDER_ADDRESS_ID, $orderAddress->toKeyValue('PrimaryKey', 'Id'), $comparison);
|
||||
} 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 $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @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();
|
||||
$relationMap = $tableMap->getRelation('OrderAddressRelatedByAddressInvoice');
|
||||
$relationMap = $tableMap->getRelation('OrderAddressRelatedByInvoiceOrderAddressId');
|
||||
|
||||
// create a ModelJoin object for this join
|
||||
$join = new ModelJoin();
|
||||
@@ -1179,14 +1233,14 @@ abstract class OrderQuery extends ModelCriteria
|
||||
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||
$this->addJoinObject($join, $relationAlias);
|
||||
} else {
|
||||
$this->addJoinObject($join, 'OrderAddressRelatedByAddressInvoice');
|
||||
$this->addJoinObject($join, 'OrderAddressRelatedByInvoiceOrderAddressId');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the OrderAddressRelatedByAddressInvoice relation OrderAddress object
|
||||
* Use the OrderAddressRelatedByInvoiceOrderAddressId relation OrderAddress object
|
||||
*
|
||||
* @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
|
||||
*/
|
||||
public function useOrderAddressRelatedByAddressInvoiceQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
||||
public function useOrderAddressRelatedByInvoiceOrderAddressIdQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinOrderAddressRelatedByAddressInvoice($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'OrderAddressRelatedByAddressInvoice', '\Thelia\Model\OrderAddressQuery');
|
||||
->joinOrderAddressRelatedByInvoiceOrderAddressId($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'OrderAddressRelatedByInvoiceOrderAddressId', '\Thelia\Model\OrderAddressQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1211,35 +1265,35 @@ abstract class OrderQuery extends ModelCriteria
|
||||
*
|
||||
* @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) {
|
||||
return $this
|
||||
->addUsingAlias(OrderTableMap::ADDRESS_DELIVERY, $orderAddress->getId(), $comparison);
|
||||
->addUsingAlias(OrderTableMap::DELIVERY_ORDER_ADDRESS_ID, $orderAddress->getId(), $comparison);
|
||||
} elseif ($orderAddress instanceof ObjectCollection) {
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
|
||||
return $this
|
||||
->addUsingAlias(OrderTableMap::ADDRESS_DELIVERY, $orderAddress->toKeyValue('PrimaryKey', 'Id'), $comparison);
|
||||
->addUsingAlias(OrderTableMap::DELIVERY_ORDER_ADDRESS_ID, $orderAddress->toKeyValue('PrimaryKey', 'Id'), $comparison);
|
||||
} 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 $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @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();
|
||||
$relationMap = $tableMap->getRelation('OrderAddressRelatedByAddressDelivery');
|
||||
$relationMap = $tableMap->getRelation('OrderAddressRelatedByDeliveryOrderAddressId');
|
||||
|
||||
// create a ModelJoin object for this join
|
||||
$join = new ModelJoin();
|
||||
@@ -1254,14 +1308,14 @@ abstract class OrderQuery extends ModelCriteria
|
||||
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||
$this->addJoinObject($join, $relationAlias);
|
||||
} else {
|
||||
$this->addJoinObject($join, 'OrderAddressRelatedByAddressDelivery');
|
||||
$this->addJoinObject($join, 'OrderAddressRelatedByDeliveryOrderAddressId');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the OrderAddressRelatedByAddressDelivery relation OrderAddress object
|
||||
* Use the OrderAddressRelatedByDeliveryOrderAddressId relation OrderAddress object
|
||||
*
|
||||
* @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
|
||||
*/
|
||||
public function useOrderAddressRelatedByAddressDeliveryQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
||||
public function useOrderAddressRelatedByDeliveryOrderAddressIdQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinOrderAddressRelatedByAddressDelivery($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'OrderAddressRelatedByAddressDelivery', '\Thelia\Model\OrderAddressQuery');
|
||||
->joinOrderAddressRelatedByDeliveryOrderAddressId($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'OrderAddressRelatedByDeliveryOrderAddressId', '\Thelia\Model\OrderAddressQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1311,7 +1365,7 @@ abstract class OrderQuery extends ModelCriteria
|
||||
*
|
||||
* @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();
|
||||
$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
|
||||
*/
|
||||
public function useOrderStatusQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
||||
public function useOrderStatusQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinOrderStatus($relationAlias, $joinType)
|
||||
->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
|
||||
*
|
||||
|
||||
@@ -791,10 +791,9 @@ abstract class OrderStatus implements ActiveRecordInterface
|
||||
|
||||
if ($this->ordersScheduledForDeletion !== null) {
|
||||
if (!$this->ordersScheduledForDeletion->isEmpty()) {
|
||||
foreach ($this->ordersScheduledForDeletion as $order) {
|
||||
// need to save related object because we set the relation to null
|
||||
$order->save($con);
|
||||
}
|
||||
\Thelia\Model\OrderQuery::create()
|
||||
->filterByPrimaryKeys($this->ordersScheduledForDeletion->getPrimaryKeys(false))
|
||||
->delete($con);
|
||||
$this->ordersScheduledForDeletion = null;
|
||||
}
|
||||
}
|
||||
@@ -1439,7 +1438,7 @@ abstract class OrderStatus implements ActiveRecordInterface
|
||||
$this->ordersScheduledForDeletion = clone $this->collOrders;
|
||||
$this->ordersScheduledForDeletion->clear();
|
||||
}
|
||||
$this->ordersScheduledForDeletion[]= $order;
|
||||
$this->ordersScheduledForDeletion[]= clone $order;
|
||||
$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)
|
||||
* @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->joinWith('OrderAddressRelatedByAddressInvoice', $joinBehavior);
|
||||
$query->joinWith('OrderAddressRelatedByInvoiceOrderAddressId', $joinBehavior);
|
||||
|
||||
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)
|
||||
* @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->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);
|
||||
}
|
||||
|
||||
@@ -420,7 +420,7 @@ abstract class OrderStatusQuery extends ModelCriteria
|
||||
*
|
||||
* @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();
|
||||
$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
|
||||
*/
|
||||
public function useOrderQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
||||
public function useOrderQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinOrder($relationAlias, $joinType)
|
||||
|
||||
Reference in New Issue
Block a user