order tax tables
This commit is contained in:
@@ -25,7 +25,6 @@ namespace Thelia\Action;
|
||||
|
||||
use Propel\Runtime\ActiveQuery\ModelCriteria;
|
||||
use Propel\Runtime\ActiveRecord\ActiveRecordInterface;
|
||||
use Propel\Runtime\Exception\PropelException;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
use Thelia\Core\Event\OrderEvent;
|
||||
@@ -35,9 +34,8 @@ use Thelia\Model\AttributeAvI18n;
|
||||
use Thelia\Model\AttributeAvI18nQuery;
|
||||
use Thelia\Model\AttributeI18n;
|
||||
use Thelia\Model\AttributeI18nQuery;
|
||||
use Thelia\Model\AttributeQuery;
|
||||
use Thelia\Model\AddressQuery;
|
||||
use Thelia\Model\OrderAttributeCombination;
|
||||
use Thelia\Model\OrderProductAttributeCombination;
|
||||
use Thelia\Model\ProductI18nQuery;
|
||||
use Thelia\Model\Lang;
|
||||
use Thelia\Model\ModuleQuery;
|
||||
@@ -226,7 +224,7 @@ class Order extends BaseAction implements EventSubscriberInterface
|
||||
$attribute = $this->getI18n(AttributeI18nQuery::create(), new AttributeI18n(), $attributeCombination->getAttributeId());
|
||||
$attributeAv = $this->getI18n(AttributeAvI18nQuery::create(), new AttributeAvI18n(), $attributeCombination->getAttributeAvId());
|
||||
|
||||
$orderAttributeCombination = new OrderAttributeCombination();
|
||||
$orderAttributeCombination = new OrderProductAttributeCombination();
|
||||
$orderAttributeCombination
|
||||
->setOrderProductId($orderProduct->getId())
|
||||
->setAttributeTitle($attribute->getTitle())
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,897 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Thelia\Model\Base;
|
||||
|
||||
use \Exception;
|
||||
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\OrderAttributeCombination as ChildOrderAttributeCombination;
|
||||
use Thelia\Model\OrderAttributeCombinationQuery as ChildOrderAttributeCombinationQuery;
|
||||
use Thelia\Model\Map\OrderAttributeCombinationTableMap;
|
||||
|
||||
/**
|
||||
* Base class that represents a query for the 'order_attribute_combination' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* @method ChildOrderAttributeCombinationQuery orderById($order = Criteria::ASC) Order by the id column
|
||||
* @method ChildOrderAttributeCombinationQuery orderByOrderProductId($order = Criteria::ASC) Order by the order_product_id column
|
||||
* @method ChildOrderAttributeCombinationQuery orderByAttributeTitle($order = Criteria::ASC) Order by the attribute_title column
|
||||
* @method ChildOrderAttributeCombinationQuery orderByAttributeChapo($order = Criteria::ASC) Order by the attribute_chapo column
|
||||
* @method ChildOrderAttributeCombinationQuery orderByAttributeDescription($order = Criteria::ASC) Order by the attribute_description column
|
||||
* @method ChildOrderAttributeCombinationQuery orderByAttributePostscriptumn($order = Criteria::ASC) Order by the attribute_postscriptumn column
|
||||
* @method ChildOrderAttributeCombinationQuery orderByAttributeAvTitle($order = Criteria::ASC) Order by the attribute_av_title column
|
||||
* @method ChildOrderAttributeCombinationQuery orderByAttributeAvChapo($order = Criteria::ASC) Order by the attribute_av_chapo column
|
||||
* @method ChildOrderAttributeCombinationQuery orderByAttributeAvDescription($order = Criteria::ASC) Order by the attribute_av_description column
|
||||
* @method ChildOrderAttributeCombinationQuery orderByAttributeAvPostscriptum($order = Criteria::ASC) Order by the attribute_av_postscriptum column
|
||||
* @method ChildOrderAttributeCombinationQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
|
||||
* @method ChildOrderAttributeCombinationQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
|
||||
*
|
||||
* @method ChildOrderAttributeCombinationQuery groupById() Group by the id column
|
||||
* @method ChildOrderAttributeCombinationQuery groupByOrderProductId() Group by the order_product_id column
|
||||
* @method ChildOrderAttributeCombinationQuery groupByAttributeTitle() Group by the attribute_title column
|
||||
* @method ChildOrderAttributeCombinationQuery groupByAttributeChapo() Group by the attribute_chapo column
|
||||
* @method ChildOrderAttributeCombinationQuery groupByAttributeDescription() Group by the attribute_description column
|
||||
* @method ChildOrderAttributeCombinationQuery groupByAttributePostscriptumn() Group by the attribute_postscriptumn column
|
||||
* @method ChildOrderAttributeCombinationQuery groupByAttributeAvTitle() Group by the attribute_av_title column
|
||||
* @method ChildOrderAttributeCombinationQuery groupByAttributeAvChapo() Group by the attribute_av_chapo column
|
||||
* @method ChildOrderAttributeCombinationQuery groupByAttributeAvDescription() Group by the attribute_av_description column
|
||||
* @method ChildOrderAttributeCombinationQuery groupByAttributeAvPostscriptum() Group by the attribute_av_postscriptum column
|
||||
* @method ChildOrderAttributeCombinationQuery groupByCreatedAt() Group by the created_at column
|
||||
* @method ChildOrderAttributeCombinationQuery groupByUpdatedAt() Group by the updated_at column
|
||||
*
|
||||
* @method ChildOrderAttributeCombinationQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
|
||||
* @method ChildOrderAttributeCombinationQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
||||
* @method ChildOrderAttributeCombinationQuery innerJoin($relation) Adds a INNER JOIN clause to the query
|
||||
*
|
||||
* @method ChildOrderAttributeCombinationQuery leftJoinOrderProduct($relationAlias = null) Adds a LEFT JOIN clause to the query using the OrderProduct relation
|
||||
* @method ChildOrderAttributeCombinationQuery rightJoinOrderProduct($relationAlias = null) Adds a RIGHT JOIN clause to the query using the OrderProduct relation
|
||||
* @method ChildOrderAttributeCombinationQuery innerJoinOrderProduct($relationAlias = null) Adds a INNER JOIN clause to the query using the OrderProduct relation
|
||||
*
|
||||
* @method ChildOrderAttributeCombination findOne(ConnectionInterface $con = null) Return the first ChildOrderAttributeCombination matching the query
|
||||
* @method ChildOrderAttributeCombination findOneOrCreate(ConnectionInterface $con = null) Return the first ChildOrderAttributeCombination matching the query, or a new ChildOrderAttributeCombination object populated from the query conditions when no match is found
|
||||
*
|
||||
* @method ChildOrderAttributeCombination findOneById(int $id) Return the first ChildOrderAttributeCombination filtered by the id column
|
||||
* @method ChildOrderAttributeCombination findOneByOrderProductId(int $order_product_id) Return the first ChildOrderAttributeCombination filtered by the order_product_id column
|
||||
* @method ChildOrderAttributeCombination findOneByAttributeTitle(string $attribute_title) Return the first ChildOrderAttributeCombination filtered by the attribute_title column
|
||||
* @method ChildOrderAttributeCombination findOneByAttributeChapo(string $attribute_chapo) Return the first ChildOrderAttributeCombination filtered by the attribute_chapo column
|
||||
* @method ChildOrderAttributeCombination findOneByAttributeDescription(string $attribute_description) Return the first ChildOrderAttributeCombination filtered by the attribute_description column
|
||||
* @method ChildOrderAttributeCombination findOneByAttributePostscriptumn(string $attribute_postscriptumn) Return the first ChildOrderAttributeCombination filtered by the attribute_postscriptumn column
|
||||
* @method ChildOrderAttributeCombination findOneByAttributeAvTitle(string $attribute_av_title) Return the first ChildOrderAttributeCombination filtered by the attribute_av_title column
|
||||
* @method ChildOrderAttributeCombination findOneByAttributeAvChapo(string $attribute_av_chapo) Return the first ChildOrderAttributeCombination filtered by the attribute_av_chapo column
|
||||
* @method ChildOrderAttributeCombination findOneByAttributeAvDescription(string $attribute_av_description) Return the first ChildOrderAttributeCombination filtered by the attribute_av_description column
|
||||
* @method ChildOrderAttributeCombination findOneByAttributeAvPostscriptum(string $attribute_av_postscriptum) Return the first ChildOrderAttributeCombination filtered by the attribute_av_postscriptum column
|
||||
* @method ChildOrderAttributeCombination findOneByCreatedAt(string $created_at) Return the first ChildOrderAttributeCombination filtered by the created_at column
|
||||
* @method ChildOrderAttributeCombination findOneByUpdatedAt(string $updated_at) Return the first ChildOrderAttributeCombination filtered by the updated_at column
|
||||
*
|
||||
* @method array findById(int $id) Return ChildOrderAttributeCombination objects filtered by the id column
|
||||
* @method array findByOrderProductId(int $order_product_id) Return ChildOrderAttributeCombination objects filtered by the order_product_id column
|
||||
* @method array findByAttributeTitle(string $attribute_title) Return ChildOrderAttributeCombination objects filtered by the attribute_title column
|
||||
* @method array findByAttributeChapo(string $attribute_chapo) Return ChildOrderAttributeCombination objects filtered by the attribute_chapo column
|
||||
* @method array findByAttributeDescription(string $attribute_description) Return ChildOrderAttributeCombination objects filtered by the attribute_description column
|
||||
* @method array findByAttributePostscriptumn(string $attribute_postscriptumn) Return ChildOrderAttributeCombination objects filtered by the attribute_postscriptumn column
|
||||
* @method array findByAttributeAvTitle(string $attribute_av_title) Return ChildOrderAttributeCombination objects filtered by the attribute_av_title column
|
||||
* @method array findByAttributeAvChapo(string $attribute_av_chapo) Return ChildOrderAttributeCombination objects filtered by the attribute_av_chapo column
|
||||
* @method array findByAttributeAvDescription(string $attribute_av_description) Return ChildOrderAttributeCombination objects filtered by the attribute_av_description column
|
||||
* @method array findByAttributeAvPostscriptum(string $attribute_av_postscriptum) Return ChildOrderAttributeCombination objects filtered by the attribute_av_postscriptum column
|
||||
* @method array findByCreatedAt(string $created_at) Return ChildOrderAttributeCombination objects filtered by the created_at column
|
||||
* @method array findByUpdatedAt(string $updated_at) Return ChildOrderAttributeCombination objects filtered by the updated_at column
|
||||
*
|
||||
*/
|
||||
abstract class OrderAttributeCombinationQuery extends ModelCriteria
|
||||
{
|
||||
|
||||
/**
|
||||
* Initializes internal state of \Thelia\Model\Base\OrderAttributeCombinationQuery object.
|
||||
*
|
||||
* @param string $dbName The database name
|
||||
* @param string $modelName The phpName of a model, e.g. 'Book'
|
||||
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
|
||||
*/
|
||||
public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\OrderAttributeCombination', $modelAlias = null)
|
||||
{
|
||||
parent::__construct($dbName, $modelName, $modelAlias);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a new ChildOrderAttributeCombinationQuery object.
|
||||
*
|
||||
* @param string $modelAlias The alias of a model in the query
|
||||
* @param Criteria $criteria Optional Criteria to build the query from
|
||||
*
|
||||
* @return ChildOrderAttributeCombinationQuery
|
||||
*/
|
||||
public static function create($modelAlias = null, $criteria = null)
|
||||
{
|
||||
if ($criteria instanceof \Thelia\Model\OrderAttributeCombinationQuery) {
|
||||
return $criteria;
|
||||
}
|
||||
$query = new \Thelia\Model\OrderAttributeCombinationQuery();
|
||||
if (null !== $modelAlias) {
|
||||
$query->setModelAlias($modelAlias);
|
||||
}
|
||||
if ($criteria instanceof Criteria) {
|
||||
$query->mergeWith($criteria);
|
||||
}
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find object by primary key.
|
||||
* Propel uses the instance pool to skip the database if the object exists.
|
||||
* Go fast if the query is untouched.
|
||||
*
|
||||
* <code>
|
||||
* $obj = $c->findPk(12, $con);
|
||||
* </code>
|
||||
*
|
||||
* @param mixed $key Primary key to use for the query
|
||||
* @param ConnectionInterface $con an optional connection object
|
||||
*
|
||||
* @return ChildOrderAttributeCombination|array|mixed the result, formatted by the current formatter
|
||||
*/
|
||||
public function findPk($key, $con = null)
|
||||
{
|
||||
if ($key === null) {
|
||||
return null;
|
||||
}
|
||||
if ((null !== ($obj = OrderAttributeCombinationTableMap::getInstanceFromPool((string) $key))) && !$this->formatter) {
|
||||
// the object is already in the instance pool
|
||||
return $obj;
|
||||
}
|
||||
if ($con === null) {
|
||||
$con = Propel::getServiceContainer()->getReadConnection(OrderAttributeCombinationTableMap::DATABASE_NAME);
|
||||
}
|
||||
$this->basePreSelect($con);
|
||||
if ($this->formatter || $this->modelAlias || $this->with || $this->select
|
||||
|| $this->selectColumns || $this->asColumns || $this->selectModifiers
|
||||
|| $this->map || $this->having || $this->joins) {
|
||||
return $this->findPkComplex($key, $con);
|
||||
} else {
|
||||
return $this->findPkSimple($key, $con);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Find object by primary key using raw SQL to go fast.
|
||||
* Bypass doSelect() and the object formatter by using generated code.
|
||||
*
|
||||
* @param mixed $key Primary key to use for the query
|
||||
* @param ConnectionInterface $con A connection object
|
||||
*
|
||||
* @return ChildOrderAttributeCombination A model object, or null if the key is not found
|
||||
*/
|
||||
protected function findPkSimple($key, $con)
|
||||
{
|
||||
$sql = 'SELECT ID, ORDER_PRODUCT_ID, ATTRIBUTE_TITLE, ATTRIBUTE_CHAPO, ATTRIBUTE_DESCRIPTION, ATTRIBUTE_POSTSCRIPTUMN, ATTRIBUTE_AV_TITLE, ATTRIBUTE_AV_CHAPO, ATTRIBUTE_AV_DESCRIPTION, ATTRIBUTE_AV_POSTSCRIPTUM, CREATED_AT, UPDATED_AT FROM order_attribute_combination WHERE ID = :p0';
|
||||
try {
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
|
||||
$stmt->execute();
|
||||
} catch (Exception $e) {
|
||||
Propel::log($e->getMessage(), Propel::LOG_ERR);
|
||||
throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), 0, $e);
|
||||
}
|
||||
$obj = null;
|
||||
if ($row = $stmt->fetch(\PDO::FETCH_NUM)) {
|
||||
$obj = new ChildOrderAttributeCombination();
|
||||
$obj->hydrate($row);
|
||||
OrderAttributeCombinationTableMap::addInstanceToPool($obj, (string) $key);
|
||||
}
|
||||
$stmt->closeCursor();
|
||||
|
||||
return $obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find object by primary key.
|
||||
*
|
||||
* @param mixed $key Primary key to use for the query
|
||||
* @param ConnectionInterface $con A connection object
|
||||
*
|
||||
* @return ChildOrderAttributeCombination|array|mixed the result, formatted by the current formatter
|
||||
*/
|
||||
protected function findPkComplex($key, $con)
|
||||
{
|
||||
// As the query uses a PK condition, no limit(1) is necessary.
|
||||
$criteria = $this->isKeepQuery() ? clone $this : $this;
|
||||
$dataFetcher = $criteria
|
||||
->filterByPrimaryKey($key)
|
||||
->doSelect($con);
|
||||
|
||||
return $criteria->getFormatter()->init($criteria)->formatOne($dataFetcher);
|
||||
}
|
||||
|
||||
/**
|
||||
* Find objects by primary key
|
||||
* <code>
|
||||
* $objs = $c->findPks(array(12, 56, 832), $con);
|
||||
* </code>
|
||||
* @param array $keys Primary keys to use for the query
|
||||
* @param ConnectionInterface $con an optional connection object
|
||||
*
|
||||
* @return ObjectCollection|array|mixed the list of results, formatted by the current formatter
|
||||
*/
|
||||
public function findPks($keys, $con = null)
|
||||
{
|
||||
if (null === $con) {
|
||||
$con = Propel::getServiceContainer()->getReadConnection($this->getDbName());
|
||||
}
|
||||
$this->basePreSelect($con);
|
||||
$criteria = $this->isKeepQuery() ? clone $this : $this;
|
||||
$dataFetcher = $criteria
|
||||
->filterByPrimaryKeys($keys)
|
||||
->doSelect($con);
|
||||
|
||||
return $criteria->getFormatter()->init($criteria)->format($dataFetcher);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by primary key
|
||||
*
|
||||
* @param mixed $key Primary key to use for the query
|
||||
*
|
||||
* @return ChildOrderAttributeCombinationQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByPrimaryKey($key)
|
||||
{
|
||||
|
||||
return $this->addUsingAlias(OrderAttributeCombinationTableMap::ID, $key, Criteria::EQUAL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a list of primary keys
|
||||
*
|
||||
* @param array $keys The list of primary key to use for the query
|
||||
*
|
||||
* @return ChildOrderAttributeCombinationQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByPrimaryKeys($keys)
|
||||
{
|
||||
|
||||
return $this->addUsingAlias(OrderAttributeCombinationTableMap::ID, $keys, Criteria::IN);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the id column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterById(1234); // WHERE id = 1234
|
||||
* $query->filterById(array(12, 34)); // WHERE id IN (12, 34)
|
||||
* $query->filterById(array('min' => 12)); // WHERE id > 12
|
||||
* </code>
|
||||
*
|
||||
* @param mixed $id 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 ChildOrderAttributeCombinationQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterById($id = null, $comparison = null)
|
||||
{
|
||||
if (is_array($id)) {
|
||||
$useMinMax = false;
|
||||
if (isset($id['min'])) {
|
||||
$this->addUsingAlias(OrderAttributeCombinationTableMap::ID, $id['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($id['max'])) {
|
||||
$this->addUsingAlias(OrderAttributeCombinationTableMap::ID, $id['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(OrderAttributeCombinationTableMap::ID, $id, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the order_product_id column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByOrderProductId(1234); // WHERE order_product_id = 1234
|
||||
* $query->filterByOrderProductId(array(12, 34)); // WHERE order_product_id IN (12, 34)
|
||||
* $query->filterByOrderProductId(array('min' => 12)); // WHERE order_product_id > 12
|
||||
* </code>
|
||||
*
|
||||
* @see filterByOrderProduct()
|
||||
*
|
||||
* @param mixed $orderProductId 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 ChildOrderAttributeCombinationQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByOrderProductId($orderProductId = null, $comparison = null)
|
||||
{
|
||||
if (is_array($orderProductId)) {
|
||||
$useMinMax = false;
|
||||
if (isset($orderProductId['min'])) {
|
||||
$this->addUsingAlias(OrderAttributeCombinationTableMap::ORDER_PRODUCT_ID, $orderProductId['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($orderProductId['max'])) {
|
||||
$this->addUsingAlias(OrderAttributeCombinationTableMap::ORDER_PRODUCT_ID, $orderProductId['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(OrderAttributeCombinationTableMap::ORDER_PRODUCT_ID, $orderProductId, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the attribute_title column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByAttributeTitle('fooValue'); // WHERE attribute_title = 'fooValue'
|
||||
* $query->filterByAttributeTitle('%fooValue%'); // WHERE attribute_title LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $attributeTitle 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 ChildOrderAttributeCombinationQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByAttributeTitle($attributeTitle = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($attributeTitle)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $attributeTitle)) {
|
||||
$attributeTitle = str_replace('*', '%', $attributeTitle);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(OrderAttributeCombinationTableMap::ATTRIBUTE_TITLE, $attributeTitle, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the attribute_chapo column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByAttributeChapo('fooValue'); // WHERE attribute_chapo = 'fooValue'
|
||||
* $query->filterByAttributeChapo('%fooValue%'); // WHERE attribute_chapo LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $attributeChapo 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 ChildOrderAttributeCombinationQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByAttributeChapo($attributeChapo = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($attributeChapo)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $attributeChapo)) {
|
||||
$attributeChapo = str_replace('*', '%', $attributeChapo);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(OrderAttributeCombinationTableMap::ATTRIBUTE_CHAPO, $attributeChapo, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the attribute_description column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByAttributeDescription('fooValue'); // WHERE attribute_description = 'fooValue'
|
||||
* $query->filterByAttributeDescription('%fooValue%'); // WHERE attribute_description LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $attributeDescription 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 ChildOrderAttributeCombinationQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByAttributeDescription($attributeDescription = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($attributeDescription)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $attributeDescription)) {
|
||||
$attributeDescription = str_replace('*', '%', $attributeDescription);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(OrderAttributeCombinationTableMap::ATTRIBUTE_DESCRIPTION, $attributeDescription, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the attribute_postscriptumn column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByAttributePostscriptumn('fooValue'); // WHERE attribute_postscriptumn = 'fooValue'
|
||||
* $query->filterByAttributePostscriptumn('%fooValue%'); // WHERE attribute_postscriptumn LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $attributePostscriptumn 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 ChildOrderAttributeCombinationQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByAttributePostscriptumn($attributePostscriptumn = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($attributePostscriptumn)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $attributePostscriptumn)) {
|
||||
$attributePostscriptumn = str_replace('*', '%', $attributePostscriptumn);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(OrderAttributeCombinationTableMap::ATTRIBUTE_POSTSCRIPTUMN, $attributePostscriptumn, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the attribute_av_title column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByAttributeAvTitle('fooValue'); // WHERE attribute_av_title = 'fooValue'
|
||||
* $query->filterByAttributeAvTitle('%fooValue%'); // WHERE attribute_av_title LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $attributeAvTitle 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 ChildOrderAttributeCombinationQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByAttributeAvTitle($attributeAvTitle = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($attributeAvTitle)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $attributeAvTitle)) {
|
||||
$attributeAvTitle = str_replace('*', '%', $attributeAvTitle);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(OrderAttributeCombinationTableMap::ATTRIBUTE_AV_TITLE, $attributeAvTitle, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the attribute_av_chapo column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByAttributeAvChapo('fooValue'); // WHERE attribute_av_chapo = 'fooValue'
|
||||
* $query->filterByAttributeAvChapo('%fooValue%'); // WHERE attribute_av_chapo LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $attributeAvChapo 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 ChildOrderAttributeCombinationQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByAttributeAvChapo($attributeAvChapo = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($attributeAvChapo)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $attributeAvChapo)) {
|
||||
$attributeAvChapo = str_replace('*', '%', $attributeAvChapo);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(OrderAttributeCombinationTableMap::ATTRIBUTE_AV_CHAPO, $attributeAvChapo, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the attribute_av_description column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByAttributeAvDescription('fooValue'); // WHERE attribute_av_description = 'fooValue'
|
||||
* $query->filterByAttributeAvDescription('%fooValue%'); // WHERE attribute_av_description LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $attributeAvDescription 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 ChildOrderAttributeCombinationQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByAttributeAvDescription($attributeAvDescription = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($attributeAvDescription)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $attributeAvDescription)) {
|
||||
$attributeAvDescription = str_replace('*', '%', $attributeAvDescription);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(OrderAttributeCombinationTableMap::ATTRIBUTE_AV_DESCRIPTION, $attributeAvDescription, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the attribute_av_postscriptum column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByAttributeAvPostscriptum('fooValue'); // WHERE attribute_av_postscriptum = 'fooValue'
|
||||
* $query->filterByAttributeAvPostscriptum('%fooValue%'); // WHERE attribute_av_postscriptum LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $attributeAvPostscriptum 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 ChildOrderAttributeCombinationQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByAttributeAvPostscriptum($attributeAvPostscriptum = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($attributeAvPostscriptum)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $attributeAvPostscriptum)) {
|
||||
$attributeAvPostscriptum = str_replace('*', '%', $attributeAvPostscriptum);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(OrderAttributeCombinationTableMap::ATTRIBUTE_AV_POSTSCRIPTUM, $attributeAvPostscriptum, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the created_at column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByCreatedAt('2011-03-14'); // WHERE created_at = '2011-03-14'
|
||||
* $query->filterByCreatedAt('now'); // WHERE created_at = '2011-03-14'
|
||||
* $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13'
|
||||
* </code>
|
||||
*
|
||||
* @param mixed $createdAt The value to use as filter.
|
||||
* Values can be integers (unix timestamps), DateTime objects, or strings.
|
||||
* Empty strings are treated as NULL.
|
||||
* 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 ChildOrderAttributeCombinationQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByCreatedAt($createdAt = null, $comparison = null)
|
||||
{
|
||||
if (is_array($createdAt)) {
|
||||
$useMinMax = false;
|
||||
if (isset($createdAt['min'])) {
|
||||
$this->addUsingAlias(OrderAttributeCombinationTableMap::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($createdAt['max'])) {
|
||||
$this->addUsingAlias(OrderAttributeCombinationTableMap::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(OrderAttributeCombinationTableMap::CREATED_AT, $createdAt, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the updated_at column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByUpdatedAt('2011-03-14'); // WHERE updated_at = '2011-03-14'
|
||||
* $query->filterByUpdatedAt('now'); // WHERE updated_at = '2011-03-14'
|
||||
* $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13'
|
||||
* </code>
|
||||
*
|
||||
* @param mixed $updatedAt The value to use as filter.
|
||||
* Values can be integers (unix timestamps), DateTime objects, or strings.
|
||||
* Empty strings are treated as NULL.
|
||||
* 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 ChildOrderAttributeCombinationQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByUpdatedAt($updatedAt = null, $comparison = null)
|
||||
{
|
||||
if (is_array($updatedAt)) {
|
||||
$useMinMax = false;
|
||||
if (isset($updatedAt['min'])) {
|
||||
$this->addUsingAlias(OrderAttributeCombinationTableMap::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($updatedAt['max'])) {
|
||||
$this->addUsingAlias(OrderAttributeCombinationTableMap::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(OrderAttributeCombinationTableMap::UPDATED_AT, $updatedAt, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related \Thelia\Model\OrderProduct object
|
||||
*
|
||||
* @param \Thelia\Model\OrderProduct|ObjectCollection $orderProduct The related object(s) to use as filter
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildOrderAttributeCombinationQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByOrderProduct($orderProduct, $comparison = null)
|
||||
{
|
||||
if ($orderProduct instanceof \Thelia\Model\OrderProduct) {
|
||||
return $this
|
||||
->addUsingAlias(OrderAttributeCombinationTableMap::ORDER_PRODUCT_ID, $orderProduct->getId(), $comparison);
|
||||
} elseif ($orderProduct instanceof ObjectCollection) {
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
|
||||
return $this
|
||||
->addUsingAlias(OrderAttributeCombinationTableMap::ORDER_PRODUCT_ID, $orderProduct->toKeyValue('PrimaryKey', 'Id'), $comparison);
|
||||
} else {
|
||||
throw new PropelException('filterByOrderProduct() only accepts arguments of type \Thelia\Model\OrderProduct or Collection');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the OrderProduct relation
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return ChildOrderAttributeCombinationQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinOrderProduct($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
$tableMap = $this->getTableMap();
|
||||
$relationMap = $tableMap->getRelation('OrderProduct');
|
||||
|
||||
// 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, 'OrderProduct');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the OrderProduct relation OrderProduct 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\OrderProductQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useOrderProductQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinOrderProduct($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'OrderProduct', '\Thelia\Model\OrderProductQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Exclude object from result
|
||||
*
|
||||
* @param ChildOrderAttributeCombination $orderAttributeCombination Object to remove from the list of results
|
||||
*
|
||||
* @return ChildOrderAttributeCombinationQuery The current query, for fluid interface
|
||||
*/
|
||||
public function prune($orderAttributeCombination = null)
|
||||
{
|
||||
if ($orderAttributeCombination) {
|
||||
$this->addUsingAlias(OrderAttributeCombinationTableMap::ID, $orderAttributeCombination->getId(), Criteria::NOT_EQUAL);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes all rows from the order_attribute_combination table.
|
||||
*
|
||||
* @param ConnectionInterface $con the connection to use
|
||||
* @return int The number of affected rows (if supported by underlying database driver).
|
||||
*/
|
||||
public function doDeleteAll(ConnectionInterface $con = null)
|
||||
{
|
||||
if (null === $con) {
|
||||
$con = Propel::getServiceContainer()->getWriteConnection(OrderAttributeCombinationTableMap::DATABASE_NAME);
|
||||
}
|
||||
$affectedRows = 0; // initialize var to track total num of affected rows
|
||||
try {
|
||||
// use transaction because $criteria could contain info
|
||||
// for more than one table or we could emulating ON DELETE CASCADE, etc.
|
||||
$con->beginTransaction();
|
||||
$affectedRows += parent::doDeleteAll($con);
|
||||
// Because this db requires some delete cascade/set null emulation, we have to
|
||||
// clear the cached instance *after* the emulation has happened (since
|
||||
// instances get re-added by the select statement contained therein).
|
||||
OrderAttributeCombinationTableMap::clearInstancePool();
|
||||
OrderAttributeCombinationTableMap::clearRelatedInstancePool();
|
||||
|
||||
$con->commit();
|
||||
} catch (PropelException $e) {
|
||||
$con->rollBack();
|
||||
throw $e;
|
||||
}
|
||||
|
||||
return $affectedRows;
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs a DELETE on the database, given a ChildOrderAttributeCombination or Criteria object OR a primary key value.
|
||||
*
|
||||
* @param mixed $values Criteria or ChildOrderAttributeCombination object or primary key or array of primary keys
|
||||
* which is used to create the DELETE statement
|
||||
* @param ConnectionInterface $con the connection to use
|
||||
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
|
||||
* if supported by native driver or if emulated using Propel.
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public function delete(ConnectionInterface $con = null)
|
||||
{
|
||||
if (null === $con) {
|
||||
$con = Propel::getServiceContainer()->getWriteConnection(OrderAttributeCombinationTableMap::DATABASE_NAME);
|
||||
}
|
||||
|
||||
$criteria = $this;
|
||||
|
||||
// Set the correct dbName
|
||||
$criteria->setDbName(OrderAttributeCombinationTableMap::DATABASE_NAME);
|
||||
|
||||
$affectedRows = 0; // initialize var to track total num of affected rows
|
||||
|
||||
try {
|
||||
// use transaction because $criteria could contain info
|
||||
// for more than one table or we could emulating ON DELETE CASCADE, etc.
|
||||
$con->beginTransaction();
|
||||
|
||||
|
||||
OrderAttributeCombinationTableMap::removeInstanceFromPool($criteria);
|
||||
|
||||
$affectedRows += ModelCriteria::delete($con);
|
||||
OrderAttributeCombinationTableMap::clearRelatedInstancePool();
|
||||
$con->commit();
|
||||
|
||||
return $affectedRows;
|
||||
} catch (PropelException $e) {
|
||||
$con->rollBack();
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
// timestampable behavior
|
||||
|
||||
/**
|
||||
* Filter by the latest updated
|
||||
*
|
||||
* @param int $nbDays Maximum age of the latest update in days
|
||||
*
|
||||
* @return ChildOrderAttributeCombinationQuery The current query, for fluid interface
|
||||
*/
|
||||
public function recentlyUpdated($nbDays = 7)
|
||||
{
|
||||
return $this->addUsingAlias(OrderAttributeCombinationTableMap::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter by the latest created
|
||||
*
|
||||
* @param int $nbDays Maximum age of in days
|
||||
*
|
||||
* @return ChildOrderAttributeCombinationQuery The current query, for fluid interface
|
||||
*/
|
||||
public function recentlyCreated($nbDays = 7)
|
||||
{
|
||||
return $this->addUsingAlias(OrderAttributeCombinationTableMap::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Order by update date desc
|
||||
*
|
||||
* @return ChildOrderAttributeCombinationQuery The current query, for fluid interface
|
||||
*/
|
||||
public function lastUpdatedFirst()
|
||||
{
|
||||
return $this->addDescendingOrderByColumn(OrderAttributeCombinationTableMap::UPDATED_AT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Order by update date asc
|
||||
*
|
||||
* @return ChildOrderAttributeCombinationQuery The current query, for fluid interface
|
||||
*/
|
||||
public function firstUpdatedFirst()
|
||||
{
|
||||
return $this->addAscendingOrderByColumn(OrderAttributeCombinationTableMap::UPDATED_AT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Order by create date desc
|
||||
*
|
||||
* @return ChildOrderAttributeCombinationQuery The current query, for fluid interface
|
||||
*/
|
||||
public function lastCreatedFirst()
|
||||
{
|
||||
return $this->addDescendingOrderByColumn(OrderAttributeCombinationTableMap::CREATED_AT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Order by create date asc
|
||||
*
|
||||
* @return ChildOrderAttributeCombinationQuery The current query, for fluid interface
|
||||
*/
|
||||
public function firstCreatedFirst()
|
||||
{
|
||||
return $this->addAscendingOrderByColumn(OrderAttributeCombinationTableMap::CREATED_AT);
|
||||
}
|
||||
|
||||
} // OrderAttributeCombinationQuery
|
||||
@@ -18,10 +18,12 @@ use Propel\Runtime\Map\TableMap;
|
||||
use Propel\Runtime\Parser\AbstractParser;
|
||||
use Propel\Runtime\Util\PropelDateTime;
|
||||
use Thelia\Model\Order as ChildOrder;
|
||||
use Thelia\Model\OrderAttributeCombination as ChildOrderAttributeCombination;
|
||||
use Thelia\Model\OrderAttributeCombinationQuery as ChildOrderAttributeCombinationQuery;
|
||||
use Thelia\Model\OrderProduct as ChildOrderProduct;
|
||||
use Thelia\Model\OrderProductAttributeCombination as ChildOrderProductAttributeCombination;
|
||||
use Thelia\Model\OrderProductAttributeCombinationQuery as ChildOrderProductAttributeCombinationQuery;
|
||||
use Thelia\Model\OrderProductQuery as ChildOrderProductQuery;
|
||||
use Thelia\Model\OrderProductTax as ChildOrderProductTax;
|
||||
use Thelia\Model\OrderProductTaxQuery as ChildOrderProductTaxQuery;
|
||||
use Thelia\Model\OrderQuery as ChildOrderQuery;
|
||||
use Thelia\Model\Map\OrderProductTableMap;
|
||||
|
||||
@@ -144,10 +146,16 @@ abstract class OrderProduct implements ActiveRecordInterface
|
||||
protected $weight;
|
||||
|
||||
/**
|
||||
* The value for the tax field.
|
||||
* @var double
|
||||
* The value for the tax_rule_title field.
|
||||
* @var string
|
||||
*/
|
||||
protected $tax;
|
||||
protected $tax_rule_title;
|
||||
|
||||
/**
|
||||
* The value for the tax_rule_description field.
|
||||
* @var string
|
||||
*/
|
||||
protected $tax_rule_description;
|
||||
|
||||
/**
|
||||
* The value for the parent field.
|
||||
@@ -173,10 +181,16 @@ abstract class OrderProduct implements ActiveRecordInterface
|
||||
protected $aOrder;
|
||||
|
||||
/**
|
||||
* @var ObjectCollection|ChildOrderAttributeCombination[] Collection to store aggregation of ChildOrderAttributeCombination objects.
|
||||
* @var ObjectCollection|ChildOrderProductAttributeCombination[] Collection to store aggregation of ChildOrderProductAttributeCombination objects.
|
||||
*/
|
||||
protected $collOrderAttributeCombinations;
|
||||
protected $collOrderAttributeCombinationsPartial;
|
||||
protected $collOrderProductAttributeCombinations;
|
||||
protected $collOrderProductAttributeCombinationsPartial;
|
||||
|
||||
/**
|
||||
* @var ObjectCollection|ChildOrderProductTax[] Collection to store aggregation of ChildOrderProductTax objects.
|
||||
*/
|
||||
protected $collOrderProductTaxes;
|
||||
protected $collOrderProductTaxesPartial;
|
||||
|
||||
/**
|
||||
* Flag to prevent endless save loop, if this object is referenced
|
||||
@@ -190,7 +204,13 @@ abstract class OrderProduct implements ActiveRecordInterface
|
||||
* An array of objects scheduled for deletion.
|
||||
* @var ObjectCollection
|
||||
*/
|
||||
protected $orderAttributeCombinationsScheduledForDeletion = null;
|
||||
protected $orderProductAttributeCombinationsScheduledForDeletion = null;
|
||||
|
||||
/**
|
||||
* An array of objects scheduled for deletion.
|
||||
* @var ObjectCollection
|
||||
*/
|
||||
protected $orderProductTaxesScheduledForDeletion = null;
|
||||
|
||||
/**
|
||||
* Initializes internal state of Thelia\Model\Base\OrderProduct object.
|
||||
@@ -601,14 +621,25 @@ abstract class OrderProduct implements ActiveRecordInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [tax] column value.
|
||||
* Get the [tax_rule_title] column value.
|
||||
*
|
||||
* @return double
|
||||
* @return string
|
||||
*/
|
||||
public function getTax()
|
||||
public function getTaxRuleTitle()
|
||||
{
|
||||
|
||||
return $this->tax;
|
||||
return $this->tax_rule_title;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [tax_rule_description] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getTaxRuleDescription()
|
||||
{
|
||||
|
||||
return $this->tax_rule_description;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -961,25 +992,46 @@ abstract class OrderProduct implements ActiveRecordInterface
|
||||
} // setWeight()
|
||||
|
||||
/**
|
||||
* Set the value of [tax] column.
|
||||
* Set the value of [tax_rule_title] column.
|
||||
*
|
||||
* @param double $v new value
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\OrderProduct The current object (for fluent API support)
|
||||
*/
|
||||
public function setTax($v)
|
||||
public function setTaxRuleTitle($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (double) $v;
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->tax !== $v) {
|
||||
$this->tax = $v;
|
||||
$this->modifiedColumns[] = OrderProductTableMap::TAX;
|
||||
if ($this->tax_rule_title !== $v) {
|
||||
$this->tax_rule_title = $v;
|
||||
$this->modifiedColumns[] = OrderProductTableMap::TAX_RULE_TITLE;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setTax()
|
||||
} // setTaxRuleTitle()
|
||||
|
||||
/**
|
||||
* Set the value of [tax_rule_description] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\OrderProduct The current object (for fluent API support)
|
||||
*/
|
||||
public function setTaxRuleDescription($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->tax_rule_description !== $v) {
|
||||
$this->tax_rule_description = $v;
|
||||
$this->modifiedColumns[] = OrderProductTableMap::TAX_RULE_DESCRIPTION;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setTaxRuleDescription()
|
||||
|
||||
/**
|
||||
* Set the value of [parent] column.
|
||||
@@ -1123,19 +1175,22 @@ abstract class OrderProduct implements ActiveRecordInterface
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 13 + $startcol : OrderProductTableMap::translateFieldName('Weight', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->weight = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 14 + $startcol : OrderProductTableMap::translateFieldName('Tax', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->tax = (null !== $col) ? (double) $col : null;
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 14 + $startcol : OrderProductTableMap::translateFieldName('TaxRuleTitle', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->tax_rule_title = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 15 + $startcol : OrderProductTableMap::translateFieldName('Parent', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 15 + $startcol : OrderProductTableMap::translateFieldName('TaxRuleDescription', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->tax_rule_description = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 16 + $startcol : OrderProductTableMap::translateFieldName('Parent', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->parent = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 16 + $startcol : OrderProductTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 17 + $startcol : OrderProductTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
if ($col === '0000-00-00 00:00:00') {
|
||||
$col = null;
|
||||
}
|
||||
$this->created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 17 + $startcol : OrderProductTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 18 + $startcol : OrderProductTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
if ($col === '0000-00-00 00:00:00') {
|
||||
$col = null;
|
||||
}
|
||||
@@ -1148,7 +1203,7 @@ abstract class OrderProduct implements ActiveRecordInterface
|
||||
$this->ensureConsistency();
|
||||
}
|
||||
|
||||
return $startcol + 18; // 18 = OrderProductTableMap::NUM_HYDRATE_COLUMNS.
|
||||
return $startcol + 19; // 19 = OrderProductTableMap::NUM_HYDRATE_COLUMNS.
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating \Thelia\Model\OrderProduct object", 0, $e);
|
||||
@@ -1213,7 +1268,9 @@ abstract class OrderProduct implements ActiveRecordInterface
|
||||
if ($deep) { // also de-associate any related objects?
|
||||
|
||||
$this->aOrder = null;
|
||||
$this->collOrderAttributeCombinations = null;
|
||||
$this->collOrderProductAttributeCombinations = null;
|
||||
|
||||
$this->collOrderProductTaxes = null;
|
||||
|
||||
} // if (deep)
|
||||
}
|
||||
@@ -1360,17 +1417,34 @@ abstract class OrderProduct implements ActiveRecordInterface
|
||||
$this->resetModified();
|
||||
}
|
||||
|
||||
if ($this->orderAttributeCombinationsScheduledForDeletion !== null) {
|
||||
if (!$this->orderAttributeCombinationsScheduledForDeletion->isEmpty()) {
|
||||
\Thelia\Model\OrderAttributeCombinationQuery::create()
|
||||
->filterByPrimaryKeys($this->orderAttributeCombinationsScheduledForDeletion->getPrimaryKeys(false))
|
||||
if ($this->orderProductAttributeCombinationsScheduledForDeletion !== null) {
|
||||
if (!$this->orderProductAttributeCombinationsScheduledForDeletion->isEmpty()) {
|
||||
\Thelia\Model\OrderProductAttributeCombinationQuery::create()
|
||||
->filterByPrimaryKeys($this->orderProductAttributeCombinationsScheduledForDeletion->getPrimaryKeys(false))
|
||||
->delete($con);
|
||||
$this->orderAttributeCombinationsScheduledForDeletion = null;
|
||||
$this->orderProductAttributeCombinationsScheduledForDeletion = null;
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->collOrderAttributeCombinations !== null) {
|
||||
foreach ($this->collOrderAttributeCombinations as $referrerFK) {
|
||||
if ($this->collOrderProductAttributeCombinations !== null) {
|
||||
foreach ($this->collOrderProductAttributeCombinations as $referrerFK) {
|
||||
if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) {
|
||||
$affectedRows += $referrerFK->save($con);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->orderProductTaxesScheduledForDeletion !== null) {
|
||||
if (!$this->orderProductTaxesScheduledForDeletion->isEmpty()) {
|
||||
\Thelia\Model\OrderProductTaxQuery::create()
|
||||
->filterByPrimaryKeys($this->orderProductTaxesScheduledForDeletion->getPrimaryKeys(false))
|
||||
->delete($con);
|
||||
$this->orderProductTaxesScheduledForDeletion = null;
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->collOrderProductTaxes !== null) {
|
||||
foreach ($this->collOrderProductTaxes as $referrerFK) {
|
||||
if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) {
|
||||
$affectedRows += $referrerFK->save($con);
|
||||
}
|
||||
@@ -1445,8 +1519,11 @@ abstract class OrderProduct implements ActiveRecordInterface
|
||||
if ($this->isColumnModified(OrderProductTableMap::WEIGHT)) {
|
||||
$modifiedColumns[':p' . $index++] = 'WEIGHT';
|
||||
}
|
||||
if ($this->isColumnModified(OrderProductTableMap::TAX)) {
|
||||
$modifiedColumns[':p' . $index++] = 'TAX';
|
||||
if ($this->isColumnModified(OrderProductTableMap::TAX_RULE_TITLE)) {
|
||||
$modifiedColumns[':p' . $index++] = 'TAX_RULE_TITLE';
|
||||
}
|
||||
if ($this->isColumnModified(OrderProductTableMap::TAX_RULE_DESCRIPTION)) {
|
||||
$modifiedColumns[':p' . $index++] = 'TAX_RULE_DESCRIPTION';
|
||||
}
|
||||
if ($this->isColumnModified(OrderProductTableMap::PARENT)) {
|
||||
$modifiedColumns[':p' . $index++] = 'PARENT';
|
||||
@@ -1510,8 +1587,11 @@ abstract class OrderProduct implements ActiveRecordInterface
|
||||
case 'WEIGHT':
|
||||
$stmt->bindValue($identifier, $this->weight, PDO::PARAM_STR);
|
||||
break;
|
||||
case 'TAX':
|
||||
$stmt->bindValue($identifier, $this->tax, PDO::PARAM_STR);
|
||||
case 'TAX_RULE_TITLE':
|
||||
$stmt->bindValue($identifier, $this->tax_rule_title, PDO::PARAM_STR);
|
||||
break;
|
||||
case 'TAX_RULE_DESCRIPTION':
|
||||
$stmt->bindValue($identifier, $this->tax_rule_description, PDO::PARAM_STR);
|
||||
break;
|
||||
case 'PARENT':
|
||||
$stmt->bindValue($identifier, $this->parent, PDO::PARAM_INT);
|
||||
@@ -1627,15 +1707,18 @@ abstract class OrderProduct implements ActiveRecordInterface
|
||||
return $this->getWeight();
|
||||
break;
|
||||
case 14:
|
||||
return $this->getTax();
|
||||
return $this->getTaxRuleTitle();
|
||||
break;
|
||||
case 15:
|
||||
return $this->getParent();
|
||||
return $this->getTaxRuleDescription();
|
||||
break;
|
||||
case 16:
|
||||
return $this->getCreatedAt();
|
||||
return $this->getParent();
|
||||
break;
|
||||
case 17:
|
||||
return $this->getCreatedAt();
|
||||
break;
|
||||
case 18:
|
||||
return $this->getUpdatedAt();
|
||||
break;
|
||||
default:
|
||||
@@ -1681,10 +1764,11 @@ abstract class OrderProduct implements ActiveRecordInterface
|
||||
$keys[11] => $this->getWasNew(),
|
||||
$keys[12] => $this->getWasInPromo(),
|
||||
$keys[13] => $this->getWeight(),
|
||||
$keys[14] => $this->getTax(),
|
||||
$keys[15] => $this->getParent(),
|
||||
$keys[16] => $this->getCreatedAt(),
|
||||
$keys[17] => $this->getUpdatedAt(),
|
||||
$keys[14] => $this->getTaxRuleTitle(),
|
||||
$keys[15] => $this->getTaxRuleDescription(),
|
||||
$keys[16] => $this->getParent(),
|
||||
$keys[17] => $this->getCreatedAt(),
|
||||
$keys[18] => $this->getUpdatedAt(),
|
||||
);
|
||||
$virtualColumns = $this->virtualColumns;
|
||||
foreach($virtualColumns as $key => $virtualColumn)
|
||||
@@ -1696,8 +1780,11 @@ abstract class OrderProduct implements ActiveRecordInterface
|
||||
if (null !== $this->aOrder) {
|
||||
$result['Order'] = $this->aOrder->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
|
||||
}
|
||||
if (null !== $this->collOrderAttributeCombinations) {
|
||||
$result['OrderAttributeCombinations'] = $this->collOrderAttributeCombinations->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
|
||||
if (null !== $this->collOrderProductAttributeCombinations) {
|
||||
$result['OrderProductAttributeCombinations'] = $this->collOrderProductAttributeCombinations->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
|
||||
}
|
||||
if (null !== $this->collOrderProductTaxes) {
|
||||
$result['OrderProductTaxes'] = $this->collOrderProductTaxes->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1776,15 +1863,18 @@ abstract class OrderProduct implements ActiveRecordInterface
|
||||
$this->setWeight($value);
|
||||
break;
|
||||
case 14:
|
||||
$this->setTax($value);
|
||||
$this->setTaxRuleTitle($value);
|
||||
break;
|
||||
case 15:
|
||||
$this->setParent($value);
|
||||
$this->setTaxRuleDescription($value);
|
||||
break;
|
||||
case 16:
|
||||
$this->setCreatedAt($value);
|
||||
$this->setParent($value);
|
||||
break;
|
||||
case 17:
|
||||
$this->setCreatedAt($value);
|
||||
break;
|
||||
case 18:
|
||||
$this->setUpdatedAt($value);
|
||||
break;
|
||||
} // switch()
|
||||
@@ -1825,10 +1915,11 @@ abstract class OrderProduct implements ActiveRecordInterface
|
||||
if (array_key_exists($keys[11], $arr)) $this->setWasNew($arr[$keys[11]]);
|
||||
if (array_key_exists($keys[12], $arr)) $this->setWasInPromo($arr[$keys[12]]);
|
||||
if (array_key_exists($keys[13], $arr)) $this->setWeight($arr[$keys[13]]);
|
||||
if (array_key_exists($keys[14], $arr)) $this->setTax($arr[$keys[14]]);
|
||||
if (array_key_exists($keys[15], $arr)) $this->setParent($arr[$keys[15]]);
|
||||
if (array_key_exists($keys[16], $arr)) $this->setCreatedAt($arr[$keys[16]]);
|
||||
if (array_key_exists($keys[17], $arr)) $this->setUpdatedAt($arr[$keys[17]]);
|
||||
if (array_key_exists($keys[14], $arr)) $this->setTaxRuleTitle($arr[$keys[14]]);
|
||||
if (array_key_exists($keys[15], $arr)) $this->setTaxRuleDescription($arr[$keys[15]]);
|
||||
if (array_key_exists($keys[16], $arr)) $this->setParent($arr[$keys[16]]);
|
||||
if (array_key_exists($keys[17], $arr)) $this->setCreatedAt($arr[$keys[17]]);
|
||||
if (array_key_exists($keys[18], $arr)) $this->setUpdatedAt($arr[$keys[18]]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1854,7 +1945,8 @@ abstract class OrderProduct implements ActiveRecordInterface
|
||||
if ($this->isColumnModified(OrderProductTableMap::WAS_NEW)) $criteria->add(OrderProductTableMap::WAS_NEW, $this->was_new);
|
||||
if ($this->isColumnModified(OrderProductTableMap::WAS_IN_PROMO)) $criteria->add(OrderProductTableMap::WAS_IN_PROMO, $this->was_in_promo);
|
||||
if ($this->isColumnModified(OrderProductTableMap::WEIGHT)) $criteria->add(OrderProductTableMap::WEIGHT, $this->weight);
|
||||
if ($this->isColumnModified(OrderProductTableMap::TAX)) $criteria->add(OrderProductTableMap::TAX, $this->tax);
|
||||
if ($this->isColumnModified(OrderProductTableMap::TAX_RULE_TITLE)) $criteria->add(OrderProductTableMap::TAX_RULE_TITLE, $this->tax_rule_title);
|
||||
if ($this->isColumnModified(OrderProductTableMap::TAX_RULE_DESCRIPTION)) $criteria->add(OrderProductTableMap::TAX_RULE_DESCRIPTION, $this->tax_rule_description);
|
||||
if ($this->isColumnModified(OrderProductTableMap::PARENT)) $criteria->add(OrderProductTableMap::PARENT, $this->parent);
|
||||
if ($this->isColumnModified(OrderProductTableMap::CREATED_AT)) $criteria->add(OrderProductTableMap::CREATED_AT, $this->created_at);
|
||||
if ($this->isColumnModified(OrderProductTableMap::UPDATED_AT)) $criteria->add(OrderProductTableMap::UPDATED_AT, $this->updated_at);
|
||||
@@ -1934,7 +2026,8 @@ abstract class OrderProduct implements ActiveRecordInterface
|
||||
$copyObj->setWasNew($this->getWasNew());
|
||||
$copyObj->setWasInPromo($this->getWasInPromo());
|
||||
$copyObj->setWeight($this->getWeight());
|
||||
$copyObj->setTax($this->getTax());
|
||||
$copyObj->setTaxRuleTitle($this->getTaxRuleTitle());
|
||||
$copyObj->setTaxRuleDescription($this->getTaxRuleDescription());
|
||||
$copyObj->setParent($this->getParent());
|
||||
$copyObj->setCreatedAt($this->getCreatedAt());
|
||||
$copyObj->setUpdatedAt($this->getUpdatedAt());
|
||||
@@ -1944,9 +2037,15 @@ abstract class OrderProduct implements ActiveRecordInterface
|
||||
// the getter/setter methods for fkey referrer objects.
|
||||
$copyObj->setNew(false);
|
||||
|
||||
foreach ($this->getOrderAttributeCombinations() as $relObj) {
|
||||
foreach ($this->getOrderProductAttributeCombinations() as $relObj) {
|
||||
if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
|
||||
$copyObj->addOrderAttributeCombination($relObj->copy($deepCopy));
|
||||
$copyObj->addOrderProductAttributeCombination($relObj->copy($deepCopy));
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($this->getOrderProductTaxes() as $relObj) {
|
||||
if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
|
||||
$copyObj->addOrderProductTax($relObj->copy($deepCopy));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2042,37 +2141,40 @@ abstract class OrderProduct implements ActiveRecordInterface
|
||||
*/
|
||||
public function initRelation($relationName)
|
||||
{
|
||||
if ('OrderAttributeCombination' == $relationName) {
|
||||
return $this->initOrderAttributeCombinations();
|
||||
if ('OrderProductAttributeCombination' == $relationName) {
|
||||
return $this->initOrderProductAttributeCombinations();
|
||||
}
|
||||
if ('OrderProductTax' == $relationName) {
|
||||
return $this->initOrderProductTaxes();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears out the collOrderAttributeCombinations collection
|
||||
* Clears out the collOrderProductAttributeCombinations 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 addOrderAttributeCombinations()
|
||||
* @see addOrderProductAttributeCombinations()
|
||||
*/
|
||||
public function clearOrderAttributeCombinations()
|
||||
public function clearOrderProductAttributeCombinations()
|
||||
{
|
||||
$this->collOrderAttributeCombinations = null; // important to set this to NULL since that means it is uninitialized
|
||||
$this->collOrderProductAttributeCombinations = null; // important to set this to NULL since that means it is uninitialized
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset is the collOrderAttributeCombinations collection loaded partially.
|
||||
* Reset is the collOrderProductAttributeCombinations collection loaded partially.
|
||||
*/
|
||||
public function resetPartialOrderAttributeCombinations($v = true)
|
||||
public function resetPartialOrderProductAttributeCombinations($v = true)
|
||||
{
|
||||
$this->collOrderAttributeCombinationsPartial = $v;
|
||||
$this->collOrderProductAttributeCombinationsPartial = $v;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the collOrderAttributeCombinations collection.
|
||||
* Initializes the collOrderProductAttributeCombinations collection.
|
||||
*
|
||||
* By default this just sets the collOrderAttributeCombinations collection to an empty array (like clearcollOrderAttributeCombinations());
|
||||
* By default this just sets the collOrderProductAttributeCombinations collection to an empty array (like clearcollOrderProductAttributeCombinations());
|
||||
* 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.
|
||||
*
|
||||
@@ -2081,17 +2183,17 @@ abstract class OrderProduct implements ActiveRecordInterface
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function initOrderAttributeCombinations($overrideExisting = true)
|
||||
public function initOrderProductAttributeCombinations($overrideExisting = true)
|
||||
{
|
||||
if (null !== $this->collOrderAttributeCombinations && !$overrideExisting) {
|
||||
if (null !== $this->collOrderProductAttributeCombinations && !$overrideExisting) {
|
||||
return;
|
||||
}
|
||||
$this->collOrderAttributeCombinations = new ObjectCollection();
|
||||
$this->collOrderAttributeCombinations->setModel('\Thelia\Model\OrderAttributeCombination');
|
||||
$this->collOrderProductAttributeCombinations = new ObjectCollection();
|
||||
$this->collOrderProductAttributeCombinations->setModel('\Thelia\Model\OrderProductAttributeCombination');
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets an array of ChildOrderAttributeCombination objects which contain a foreign key that references this object.
|
||||
* Gets an array of ChildOrderProductAttributeCombination 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.
|
||||
@@ -2101,109 +2203,109 @@ abstract class OrderProduct implements ActiveRecordInterface
|
||||
*
|
||||
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||
* @param ConnectionInterface $con optional connection object
|
||||
* @return Collection|ChildOrderAttributeCombination[] List of ChildOrderAttributeCombination objects
|
||||
* @return Collection|ChildOrderProductAttributeCombination[] List of ChildOrderProductAttributeCombination objects
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function getOrderAttributeCombinations($criteria = null, ConnectionInterface $con = null)
|
||||
public function getOrderProductAttributeCombinations($criteria = null, ConnectionInterface $con = null)
|
||||
{
|
||||
$partial = $this->collOrderAttributeCombinationsPartial && !$this->isNew();
|
||||
if (null === $this->collOrderAttributeCombinations || null !== $criteria || $partial) {
|
||||
if ($this->isNew() && null === $this->collOrderAttributeCombinations) {
|
||||
$partial = $this->collOrderProductAttributeCombinationsPartial && !$this->isNew();
|
||||
if (null === $this->collOrderProductAttributeCombinations || null !== $criteria || $partial) {
|
||||
if ($this->isNew() && null === $this->collOrderProductAttributeCombinations) {
|
||||
// return empty collection
|
||||
$this->initOrderAttributeCombinations();
|
||||
$this->initOrderProductAttributeCombinations();
|
||||
} else {
|
||||
$collOrderAttributeCombinations = ChildOrderAttributeCombinationQuery::create(null, $criteria)
|
||||
$collOrderProductAttributeCombinations = ChildOrderProductAttributeCombinationQuery::create(null, $criteria)
|
||||
->filterByOrderProduct($this)
|
||||
->find($con);
|
||||
|
||||
if (null !== $criteria) {
|
||||
if (false !== $this->collOrderAttributeCombinationsPartial && count($collOrderAttributeCombinations)) {
|
||||
$this->initOrderAttributeCombinations(false);
|
||||
if (false !== $this->collOrderProductAttributeCombinationsPartial && count($collOrderProductAttributeCombinations)) {
|
||||
$this->initOrderProductAttributeCombinations(false);
|
||||
|
||||
foreach ($collOrderAttributeCombinations as $obj) {
|
||||
if (false == $this->collOrderAttributeCombinations->contains($obj)) {
|
||||
$this->collOrderAttributeCombinations->append($obj);
|
||||
foreach ($collOrderProductAttributeCombinations as $obj) {
|
||||
if (false == $this->collOrderProductAttributeCombinations->contains($obj)) {
|
||||
$this->collOrderProductAttributeCombinations->append($obj);
|
||||
}
|
||||
}
|
||||
|
||||
$this->collOrderAttributeCombinationsPartial = true;
|
||||
$this->collOrderProductAttributeCombinationsPartial = true;
|
||||
}
|
||||
|
||||
$collOrderAttributeCombinations->getInternalIterator()->rewind();
|
||||
$collOrderProductAttributeCombinations->getInternalIterator()->rewind();
|
||||
|
||||
return $collOrderAttributeCombinations;
|
||||
return $collOrderProductAttributeCombinations;
|
||||
}
|
||||
|
||||
if ($partial && $this->collOrderAttributeCombinations) {
|
||||
foreach ($this->collOrderAttributeCombinations as $obj) {
|
||||
if ($partial && $this->collOrderProductAttributeCombinations) {
|
||||
foreach ($this->collOrderProductAttributeCombinations as $obj) {
|
||||
if ($obj->isNew()) {
|
||||
$collOrderAttributeCombinations[] = $obj;
|
||||
$collOrderProductAttributeCombinations[] = $obj;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->collOrderAttributeCombinations = $collOrderAttributeCombinations;
|
||||
$this->collOrderAttributeCombinationsPartial = false;
|
||||
$this->collOrderProductAttributeCombinations = $collOrderProductAttributeCombinations;
|
||||
$this->collOrderProductAttributeCombinationsPartial = false;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->collOrderAttributeCombinations;
|
||||
return $this->collOrderProductAttributeCombinations;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a collection of OrderAttributeCombination objects related by a one-to-many relationship
|
||||
* Sets a collection of OrderProductAttributeCombination 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 $orderAttributeCombinations A Propel collection.
|
||||
* @param Collection $orderProductAttributeCombinations A Propel collection.
|
||||
* @param ConnectionInterface $con Optional connection object
|
||||
* @return ChildOrderProduct The current object (for fluent API support)
|
||||
*/
|
||||
public function setOrderAttributeCombinations(Collection $orderAttributeCombinations, ConnectionInterface $con = null)
|
||||
public function setOrderProductAttributeCombinations(Collection $orderProductAttributeCombinations, ConnectionInterface $con = null)
|
||||
{
|
||||
$orderAttributeCombinationsToDelete = $this->getOrderAttributeCombinations(new Criteria(), $con)->diff($orderAttributeCombinations);
|
||||
$orderProductAttributeCombinationsToDelete = $this->getOrderProductAttributeCombinations(new Criteria(), $con)->diff($orderProductAttributeCombinations);
|
||||
|
||||
|
||||
$this->orderAttributeCombinationsScheduledForDeletion = $orderAttributeCombinationsToDelete;
|
||||
$this->orderProductAttributeCombinationsScheduledForDeletion = $orderProductAttributeCombinationsToDelete;
|
||||
|
||||
foreach ($orderAttributeCombinationsToDelete as $orderAttributeCombinationRemoved) {
|
||||
$orderAttributeCombinationRemoved->setOrderProduct(null);
|
||||
foreach ($orderProductAttributeCombinationsToDelete as $orderProductAttributeCombinationRemoved) {
|
||||
$orderProductAttributeCombinationRemoved->setOrderProduct(null);
|
||||
}
|
||||
|
||||
$this->collOrderAttributeCombinations = null;
|
||||
foreach ($orderAttributeCombinations as $orderAttributeCombination) {
|
||||
$this->addOrderAttributeCombination($orderAttributeCombination);
|
||||
$this->collOrderProductAttributeCombinations = null;
|
||||
foreach ($orderProductAttributeCombinations as $orderProductAttributeCombination) {
|
||||
$this->addOrderProductAttributeCombination($orderProductAttributeCombination);
|
||||
}
|
||||
|
||||
$this->collOrderAttributeCombinations = $orderAttributeCombinations;
|
||||
$this->collOrderAttributeCombinationsPartial = false;
|
||||
$this->collOrderProductAttributeCombinations = $orderProductAttributeCombinations;
|
||||
$this->collOrderProductAttributeCombinationsPartial = false;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the number of related OrderAttributeCombination objects.
|
||||
* Returns the number of related OrderProductAttributeCombination objects.
|
||||
*
|
||||
* @param Criteria $criteria
|
||||
* @param boolean $distinct
|
||||
* @param ConnectionInterface $con
|
||||
* @return int Count of related OrderAttributeCombination objects.
|
||||
* @return int Count of related OrderProductAttributeCombination objects.
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function countOrderAttributeCombinations(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
|
||||
public function countOrderProductAttributeCombinations(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
|
||||
{
|
||||
$partial = $this->collOrderAttributeCombinationsPartial && !$this->isNew();
|
||||
if (null === $this->collOrderAttributeCombinations || null !== $criteria || $partial) {
|
||||
if ($this->isNew() && null === $this->collOrderAttributeCombinations) {
|
||||
$partial = $this->collOrderProductAttributeCombinationsPartial && !$this->isNew();
|
||||
if (null === $this->collOrderProductAttributeCombinations || null !== $criteria || $partial) {
|
||||
if ($this->isNew() && null === $this->collOrderProductAttributeCombinations) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ($partial && !$criteria) {
|
||||
return count($this->getOrderAttributeCombinations());
|
||||
return count($this->getOrderProductAttributeCombinations());
|
||||
}
|
||||
|
||||
$query = ChildOrderAttributeCombinationQuery::create(null, $criteria);
|
||||
$query = ChildOrderProductAttributeCombinationQuery::create(null, $criteria);
|
||||
if ($distinct) {
|
||||
$query->distinct();
|
||||
}
|
||||
@@ -2213,53 +2315,271 @@ abstract class OrderProduct implements ActiveRecordInterface
|
||||
->count($con);
|
||||
}
|
||||
|
||||
return count($this->collOrderAttributeCombinations);
|
||||
return count($this->collOrderProductAttributeCombinations);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method called to associate a ChildOrderAttributeCombination object to this object
|
||||
* through the ChildOrderAttributeCombination foreign key attribute.
|
||||
* Method called to associate a ChildOrderProductAttributeCombination object to this object
|
||||
* through the ChildOrderProductAttributeCombination foreign key attribute.
|
||||
*
|
||||
* @param ChildOrderAttributeCombination $l ChildOrderAttributeCombination
|
||||
* @param ChildOrderProductAttributeCombination $l ChildOrderProductAttributeCombination
|
||||
* @return \Thelia\Model\OrderProduct The current object (for fluent API support)
|
||||
*/
|
||||
public function addOrderAttributeCombination(ChildOrderAttributeCombination $l)
|
||||
public function addOrderProductAttributeCombination(ChildOrderProductAttributeCombination $l)
|
||||
{
|
||||
if ($this->collOrderAttributeCombinations === null) {
|
||||
$this->initOrderAttributeCombinations();
|
||||
$this->collOrderAttributeCombinationsPartial = true;
|
||||
if ($this->collOrderProductAttributeCombinations === null) {
|
||||
$this->initOrderProductAttributeCombinations();
|
||||
$this->collOrderProductAttributeCombinationsPartial = true;
|
||||
}
|
||||
|
||||
if (!in_array($l, $this->collOrderAttributeCombinations->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
|
||||
$this->doAddOrderAttributeCombination($l);
|
||||
if (!in_array($l, $this->collOrderProductAttributeCombinations->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
|
||||
$this->doAddOrderProductAttributeCombination($l);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param OrderAttributeCombination $orderAttributeCombination The orderAttributeCombination object to add.
|
||||
* @param OrderProductAttributeCombination $orderProductAttributeCombination The orderProductAttributeCombination object to add.
|
||||
*/
|
||||
protected function doAddOrderAttributeCombination($orderAttributeCombination)
|
||||
protected function doAddOrderProductAttributeCombination($orderProductAttributeCombination)
|
||||
{
|
||||
$this->collOrderAttributeCombinations[]= $orderAttributeCombination;
|
||||
$orderAttributeCombination->setOrderProduct($this);
|
||||
$this->collOrderProductAttributeCombinations[]= $orderProductAttributeCombination;
|
||||
$orderProductAttributeCombination->setOrderProduct($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param OrderAttributeCombination $orderAttributeCombination The orderAttributeCombination object to remove.
|
||||
* @param OrderProductAttributeCombination $orderProductAttributeCombination The orderProductAttributeCombination object to remove.
|
||||
* @return ChildOrderProduct The current object (for fluent API support)
|
||||
*/
|
||||
public function removeOrderAttributeCombination($orderAttributeCombination)
|
||||
public function removeOrderProductAttributeCombination($orderProductAttributeCombination)
|
||||
{
|
||||
if ($this->getOrderAttributeCombinations()->contains($orderAttributeCombination)) {
|
||||
$this->collOrderAttributeCombinations->remove($this->collOrderAttributeCombinations->search($orderAttributeCombination));
|
||||
if (null === $this->orderAttributeCombinationsScheduledForDeletion) {
|
||||
$this->orderAttributeCombinationsScheduledForDeletion = clone $this->collOrderAttributeCombinations;
|
||||
$this->orderAttributeCombinationsScheduledForDeletion->clear();
|
||||
if ($this->getOrderProductAttributeCombinations()->contains($orderProductAttributeCombination)) {
|
||||
$this->collOrderProductAttributeCombinations->remove($this->collOrderProductAttributeCombinations->search($orderProductAttributeCombination));
|
||||
if (null === $this->orderProductAttributeCombinationsScheduledForDeletion) {
|
||||
$this->orderProductAttributeCombinationsScheduledForDeletion = clone $this->collOrderProductAttributeCombinations;
|
||||
$this->orderProductAttributeCombinationsScheduledForDeletion->clear();
|
||||
}
|
||||
$this->orderAttributeCombinationsScheduledForDeletion[]= clone $orderAttributeCombination;
|
||||
$orderAttributeCombination->setOrderProduct(null);
|
||||
$this->orderProductAttributeCombinationsScheduledForDeletion[]= clone $orderProductAttributeCombination;
|
||||
$orderProductAttributeCombination->setOrderProduct(null);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears out the collOrderProductTaxes 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 addOrderProductTaxes()
|
||||
*/
|
||||
public function clearOrderProductTaxes()
|
||||
{
|
||||
$this->collOrderProductTaxes = null; // important to set this to NULL since that means it is uninitialized
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset is the collOrderProductTaxes collection loaded partially.
|
||||
*/
|
||||
public function resetPartialOrderProductTaxes($v = true)
|
||||
{
|
||||
$this->collOrderProductTaxesPartial = $v;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the collOrderProductTaxes collection.
|
||||
*
|
||||
* By default this just sets the collOrderProductTaxes collection to an empty array (like clearcollOrderProductTaxes());
|
||||
* 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 initOrderProductTaxes($overrideExisting = true)
|
||||
{
|
||||
if (null !== $this->collOrderProductTaxes && !$overrideExisting) {
|
||||
return;
|
||||
}
|
||||
$this->collOrderProductTaxes = new ObjectCollection();
|
||||
$this->collOrderProductTaxes->setModel('\Thelia\Model\OrderProductTax');
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets an array of ChildOrderProductTax 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 ChildOrderProduct 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|ChildOrderProductTax[] List of ChildOrderProductTax objects
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function getOrderProductTaxes($criteria = null, ConnectionInterface $con = null)
|
||||
{
|
||||
$partial = $this->collOrderProductTaxesPartial && !$this->isNew();
|
||||
if (null === $this->collOrderProductTaxes || null !== $criteria || $partial) {
|
||||
if ($this->isNew() && null === $this->collOrderProductTaxes) {
|
||||
// return empty collection
|
||||
$this->initOrderProductTaxes();
|
||||
} else {
|
||||
$collOrderProductTaxes = ChildOrderProductTaxQuery::create(null, $criteria)
|
||||
->filterByOrderProduct($this)
|
||||
->find($con);
|
||||
|
||||
if (null !== $criteria) {
|
||||
if (false !== $this->collOrderProductTaxesPartial && count($collOrderProductTaxes)) {
|
||||
$this->initOrderProductTaxes(false);
|
||||
|
||||
foreach ($collOrderProductTaxes as $obj) {
|
||||
if (false == $this->collOrderProductTaxes->contains($obj)) {
|
||||
$this->collOrderProductTaxes->append($obj);
|
||||
}
|
||||
}
|
||||
|
||||
$this->collOrderProductTaxesPartial = true;
|
||||
}
|
||||
|
||||
$collOrderProductTaxes->getInternalIterator()->rewind();
|
||||
|
||||
return $collOrderProductTaxes;
|
||||
}
|
||||
|
||||
if ($partial && $this->collOrderProductTaxes) {
|
||||
foreach ($this->collOrderProductTaxes as $obj) {
|
||||
if ($obj->isNew()) {
|
||||
$collOrderProductTaxes[] = $obj;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->collOrderProductTaxes = $collOrderProductTaxes;
|
||||
$this->collOrderProductTaxesPartial = false;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->collOrderProductTaxes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a collection of OrderProductTax 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 $orderProductTaxes A Propel collection.
|
||||
* @param ConnectionInterface $con Optional connection object
|
||||
* @return ChildOrderProduct The current object (for fluent API support)
|
||||
*/
|
||||
public function setOrderProductTaxes(Collection $orderProductTaxes, ConnectionInterface $con = null)
|
||||
{
|
||||
$orderProductTaxesToDelete = $this->getOrderProductTaxes(new Criteria(), $con)->diff($orderProductTaxes);
|
||||
|
||||
|
||||
$this->orderProductTaxesScheduledForDeletion = $orderProductTaxesToDelete;
|
||||
|
||||
foreach ($orderProductTaxesToDelete as $orderProductTaxRemoved) {
|
||||
$orderProductTaxRemoved->setOrderProduct(null);
|
||||
}
|
||||
|
||||
$this->collOrderProductTaxes = null;
|
||||
foreach ($orderProductTaxes as $orderProductTax) {
|
||||
$this->addOrderProductTax($orderProductTax);
|
||||
}
|
||||
|
||||
$this->collOrderProductTaxes = $orderProductTaxes;
|
||||
$this->collOrderProductTaxesPartial = false;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the number of related OrderProductTax objects.
|
||||
*
|
||||
* @param Criteria $criteria
|
||||
* @param boolean $distinct
|
||||
* @param ConnectionInterface $con
|
||||
* @return int Count of related OrderProductTax objects.
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function countOrderProductTaxes(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
|
||||
{
|
||||
$partial = $this->collOrderProductTaxesPartial && !$this->isNew();
|
||||
if (null === $this->collOrderProductTaxes || null !== $criteria || $partial) {
|
||||
if ($this->isNew() && null === $this->collOrderProductTaxes) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ($partial && !$criteria) {
|
||||
return count($this->getOrderProductTaxes());
|
||||
}
|
||||
|
||||
$query = ChildOrderProductTaxQuery::create(null, $criteria);
|
||||
if ($distinct) {
|
||||
$query->distinct();
|
||||
}
|
||||
|
||||
return $query
|
||||
->filterByOrderProduct($this)
|
||||
->count($con);
|
||||
}
|
||||
|
||||
return count($this->collOrderProductTaxes);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method called to associate a ChildOrderProductTax object to this object
|
||||
* through the ChildOrderProductTax foreign key attribute.
|
||||
*
|
||||
* @param ChildOrderProductTax $l ChildOrderProductTax
|
||||
* @return \Thelia\Model\OrderProduct The current object (for fluent API support)
|
||||
*/
|
||||
public function addOrderProductTax(ChildOrderProductTax $l)
|
||||
{
|
||||
if ($this->collOrderProductTaxes === null) {
|
||||
$this->initOrderProductTaxes();
|
||||
$this->collOrderProductTaxesPartial = true;
|
||||
}
|
||||
|
||||
if (!in_array($l, $this->collOrderProductTaxes->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
|
||||
$this->doAddOrderProductTax($l);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param OrderProductTax $orderProductTax The orderProductTax object to add.
|
||||
*/
|
||||
protected function doAddOrderProductTax($orderProductTax)
|
||||
{
|
||||
$this->collOrderProductTaxes[]= $orderProductTax;
|
||||
$orderProductTax->setOrderProduct($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param OrderProductTax $orderProductTax The orderProductTax object to remove.
|
||||
* @return ChildOrderProduct The current object (for fluent API support)
|
||||
*/
|
||||
public function removeOrderProductTax($orderProductTax)
|
||||
{
|
||||
if ($this->getOrderProductTaxes()->contains($orderProductTax)) {
|
||||
$this->collOrderProductTaxes->remove($this->collOrderProductTaxes->search($orderProductTax));
|
||||
if (null === $this->orderProductTaxesScheduledForDeletion) {
|
||||
$this->orderProductTaxesScheduledForDeletion = clone $this->collOrderProductTaxes;
|
||||
$this->orderProductTaxesScheduledForDeletion->clear();
|
||||
}
|
||||
$this->orderProductTaxesScheduledForDeletion[]= clone $orderProductTax;
|
||||
$orderProductTax->setOrderProduct(null);
|
||||
}
|
||||
|
||||
return $this;
|
||||
@@ -2284,7 +2604,8 @@ abstract class OrderProduct implements ActiveRecordInterface
|
||||
$this->was_new = null;
|
||||
$this->was_in_promo = null;
|
||||
$this->weight = null;
|
||||
$this->tax = null;
|
||||
$this->tax_rule_title = null;
|
||||
$this->tax_rule_description = null;
|
||||
$this->parent = null;
|
||||
$this->created_at = null;
|
||||
$this->updated_at = null;
|
||||
@@ -2307,17 +2628,26 @@ abstract class OrderProduct implements ActiveRecordInterface
|
||||
public function clearAllReferences($deep = false)
|
||||
{
|
||||
if ($deep) {
|
||||
if ($this->collOrderAttributeCombinations) {
|
||||
foreach ($this->collOrderAttributeCombinations as $o) {
|
||||
if ($this->collOrderProductAttributeCombinations) {
|
||||
foreach ($this->collOrderProductAttributeCombinations as $o) {
|
||||
$o->clearAllReferences($deep);
|
||||
}
|
||||
}
|
||||
if ($this->collOrderProductTaxes) {
|
||||
foreach ($this->collOrderProductTaxes as $o) {
|
||||
$o->clearAllReferences($deep);
|
||||
}
|
||||
}
|
||||
} // if ($deep)
|
||||
|
||||
if ($this->collOrderAttributeCombinations instanceof Collection) {
|
||||
$this->collOrderAttributeCombinations->clearIterator();
|
||||
if ($this->collOrderProductAttributeCombinations instanceof Collection) {
|
||||
$this->collOrderProductAttributeCombinations->clearIterator();
|
||||
}
|
||||
$this->collOrderAttributeCombinations = null;
|
||||
$this->collOrderProductAttributeCombinations = null;
|
||||
if ($this->collOrderProductTaxes instanceof Collection) {
|
||||
$this->collOrderProductTaxes->clearIterator();
|
||||
}
|
||||
$this->collOrderProductTaxes = null;
|
||||
$this->aOrder = null;
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,8 @@ use Thelia\Model\Map\OrderProductTableMap;
|
||||
* @method ChildOrderProductQuery orderByWasNew($order = Criteria::ASC) Order by the was_new column
|
||||
* @method ChildOrderProductQuery orderByWasInPromo($order = Criteria::ASC) Order by the was_in_promo column
|
||||
* @method ChildOrderProductQuery orderByWeight($order = Criteria::ASC) Order by the weight column
|
||||
* @method ChildOrderProductQuery orderByTax($order = Criteria::ASC) Order by the tax column
|
||||
* @method ChildOrderProductQuery orderByTaxRuleTitle($order = Criteria::ASC) Order by the tax_rule_title column
|
||||
* @method ChildOrderProductQuery orderByTaxRuleDescription($order = Criteria::ASC) Order by the tax_rule_description column
|
||||
* @method ChildOrderProductQuery orderByParent($order = Criteria::ASC) Order by the parent column
|
||||
* @method ChildOrderProductQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
|
||||
* @method ChildOrderProductQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
|
||||
@@ -54,7 +55,8 @@ use Thelia\Model\Map\OrderProductTableMap;
|
||||
* @method ChildOrderProductQuery groupByWasNew() Group by the was_new column
|
||||
* @method ChildOrderProductQuery groupByWasInPromo() Group by the was_in_promo column
|
||||
* @method ChildOrderProductQuery groupByWeight() Group by the weight column
|
||||
* @method ChildOrderProductQuery groupByTax() Group by the tax column
|
||||
* @method ChildOrderProductQuery groupByTaxRuleTitle() Group by the tax_rule_title column
|
||||
* @method ChildOrderProductQuery groupByTaxRuleDescription() Group by the tax_rule_description column
|
||||
* @method ChildOrderProductQuery groupByParent() Group by the parent column
|
||||
* @method ChildOrderProductQuery groupByCreatedAt() Group by the created_at column
|
||||
* @method ChildOrderProductQuery groupByUpdatedAt() Group by the updated_at column
|
||||
@@ -67,9 +69,13 @@ use Thelia\Model\Map\OrderProductTableMap;
|
||||
* @method ChildOrderProductQuery rightJoinOrder($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Order relation
|
||||
* @method ChildOrderProductQuery innerJoinOrder($relationAlias = null) Adds a INNER JOIN clause to the query using the Order relation
|
||||
*
|
||||
* @method ChildOrderProductQuery leftJoinOrderAttributeCombination($relationAlias = null) Adds a LEFT JOIN clause to the query using the OrderAttributeCombination relation
|
||||
* @method ChildOrderProductQuery rightJoinOrderAttributeCombination($relationAlias = null) Adds a RIGHT JOIN clause to the query using the OrderAttributeCombination relation
|
||||
* @method ChildOrderProductQuery innerJoinOrderAttributeCombination($relationAlias = null) Adds a INNER JOIN clause to the query using the OrderAttributeCombination relation
|
||||
* @method ChildOrderProductQuery leftJoinOrderProductAttributeCombination($relationAlias = null) Adds a LEFT JOIN clause to the query using the OrderProductAttributeCombination relation
|
||||
* @method ChildOrderProductQuery rightJoinOrderProductAttributeCombination($relationAlias = null) Adds a RIGHT JOIN clause to the query using the OrderProductAttributeCombination relation
|
||||
* @method ChildOrderProductQuery innerJoinOrderProductAttributeCombination($relationAlias = null) Adds a INNER JOIN clause to the query using the OrderProductAttributeCombination relation
|
||||
*
|
||||
* @method ChildOrderProductQuery leftJoinOrderProductTax($relationAlias = null) Adds a LEFT JOIN clause to the query using the OrderProductTax relation
|
||||
* @method ChildOrderProductQuery rightJoinOrderProductTax($relationAlias = null) Adds a RIGHT JOIN clause to the query using the OrderProductTax relation
|
||||
* @method ChildOrderProductQuery innerJoinOrderProductTax($relationAlias = null) Adds a INNER JOIN clause to the query using the OrderProductTax relation
|
||||
*
|
||||
* @method ChildOrderProduct findOne(ConnectionInterface $con = null) Return the first ChildOrderProduct matching the query
|
||||
* @method ChildOrderProduct findOneOrCreate(ConnectionInterface $con = null) Return the first ChildOrderProduct matching the query, or a new ChildOrderProduct object populated from the query conditions when no match is found
|
||||
@@ -88,7 +94,8 @@ use Thelia\Model\Map\OrderProductTableMap;
|
||||
* @method ChildOrderProduct findOneByWasNew(int $was_new) Return the first ChildOrderProduct filtered by the was_new column
|
||||
* @method ChildOrderProduct findOneByWasInPromo(int $was_in_promo) Return the first ChildOrderProduct filtered by the was_in_promo column
|
||||
* @method ChildOrderProduct findOneByWeight(string $weight) Return the first ChildOrderProduct filtered by the weight column
|
||||
* @method ChildOrderProduct findOneByTax(double $tax) Return the first ChildOrderProduct filtered by the tax column
|
||||
* @method ChildOrderProduct findOneByTaxRuleTitle(string $tax_rule_title) Return the first ChildOrderProduct filtered by the tax_rule_title column
|
||||
* @method ChildOrderProduct findOneByTaxRuleDescription(string $tax_rule_description) Return the first ChildOrderProduct filtered by the tax_rule_description column
|
||||
* @method ChildOrderProduct findOneByParent(int $parent) Return the first ChildOrderProduct filtered by the parent column
|
||||
* @method ChildOrderProduct findOneByCreatedAt(string $created_at) Return the first ChildOrderProduct filtered by the created_at column
|
||||
* @method ChildOrderProduct findOneByUpdatedAt(string $updated_at) Return the first ChildOrderProduct filtered by the updated_at column
|
||||
@@ -107,7 +114,8 @@ use Thelia\Model\Map\OrderProductTableMap;
|
||||
* @method array findByWasNew(int $was_new) Return ChildOrderProduct objects filtered by the was_new column
|
||||
* @method array findByWasInPromo(int $was_in_promo) Return ChildOrderProduct objects filtered by the was_in_promo column
|
||||
* @method array findByWeight(string $weight) Return ChildOrderProduct objects filtered by the weight column
|
||||
* @method array findByTax(double $tax) Return ChildOrderProduct objects filtered by the tax column
|
||||
* @method array findByTaxRuleTitle(string $tax_rule_title) Return ChildOrderProduct objects filtered by the tax_rule_title column
|
||||
* @method array findByTaxRuleDescription(string $tax_rule_description) Return ChildOrderProduct objects filtered by the tax_rule_description column
|
||||
* @method array findByParent(int $parent) Return ChildOrderProduct objects filtered by the parent column
|
||||
* @method array findByCreatedAt(string $created_at) Return ChildOrderProduct objects filtered by the created_at column
|
||||
* @method array findByUpdatedAt(string $updated_at) Return ChildOrderProduct objects filtered by the updated_at column
|
||||
@@ -199,7 +207,7 @@ abstract class OrderProductQuery extends ModelCriteria
|
||||
*/
|
||||
protected function findPkSimple($key, $con)
|
||||
{
|
||||
$sql = 'SELECT ID, ORDER_ID, PRODUCT_REF, PRODUCT_SALE_ELEMENTS_REF, TITLE, CHAPO, DESCRIPTION, POSTSCRIPTUM, QUANTITY, PRICE, PROMO_PRICE, WAS_NEW, WAS_IN_PROMO, WEIGHT, TAX, PARENT, CREATED_AT, UPDATED_AT FROM order_product WHERE ID = :p0';
|
||||
$sql = 'SELECT ID, ORDER_ID, PRODUCT_REF, PRODUCT_SALE_ELEMENTS_REF, TITLE, CHAPO, DESCRIPTION, POSTSCRIPTUM, QUANTITY, PRICE, PROMO_PRICE, WAS_NEW, WAS_IN_PROMO, WEIGHT, TAX_RULE_TITLE, TAX_RULE_DESCRIPTION, PARENT, CREATED_AT, UPDATED_AT FROM order_product WHERE ID = :p0';
|
||||
try {
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
|
||||
@@ -769,44 +777,61 @@ abstract class OrderProductQuery extends ModelCriteria
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the tax column
|
||||
* Filter the query on the tax_rule_title column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByTax(1234); // WHERE tax = 1234
|
||||
* $query->filterByTax(array(12, 34)); // WHERE tax IN (12, 34)
|
||||
* $query->filterByTax(array('min' => 12)); // WHERE tax > 12
|
||||
* $query->filterByTaxRuleTitle('fooValue'); // WHERE tax_rule_title = 'fooValue'
|
||||
* $query->filterByTaxRuleTitle('%fooValue%'); // WHERE tax_rule_title LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param mixed $tax 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 $taxRuleTitle 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 ChildOrderProductQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByTax($tax = null, $comparison = null)
|
||||
public function filterByTaxRuleTitle($taxRuleTitle = null, $comparison = null)
|
||||
{
|
||||
if (is_array($tax)) {
|
||||
$useMinMax = false;
|
||||
if (isset($tax['min'])) {
|
||||
$this->addUsingAlias(OrderProductTableMap::TAX, $tax['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($tax['max'])) {
|
||||
$this->addUsingAlias(OrderProductTableMap::TAX, $tax['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
if (is_array($taxRuleTitle)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $taxRuleTitle)) {
|
||||
$taxRuleTitle = str_replace('*', '%', $taxRuleTitle);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(OrderProductTableMap::TAX, $tax, $comparison);
|
||||
return $this->addUsingAlias(OrderProductTableMap::TAX_RULE_TITLE, $taxRuleTitle, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the tax_rule_description column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByTaxRuleDescription('fooValue'); // WHERE tax_rule_description = 'fooValue'
|
||||
* $query->filterByTaxRuleDescription('%fooValue%'); // WHERE tax_rule_description LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $taxRuleDescription 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 ChildOrderProductQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByTaxRuleDescription($taxRuleDescription = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($taxRuleDescription)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $taxRuleDescription)) {
|
||||
$taxRuleDescription = str_replace('*', '%', $taxRuleDescription);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(OrderProductTableMap::TAX_RULE_DESCRIPTION, $taxRuleDescription, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1012,40 +1037,40 @@ abstract class OrderProductQuery extends ModelCriteria
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related \Thelia\Model\OrderAttributeCombination object
|
||||
* Filter the query by a related \Thelia\Model\OrderProductAttributeCombination object
|
||||
*
|
||||
* @param \Thelia\Model\OrderAttributeCombination|ObjectCollection $orderAttributeCombination the related object to use as filter
|
||||
* @param \Thelia\Model\OrderProductAttributeCombination|ObjectCollection $orderProductAttributeCombination the related object to use as filter
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildOrderProductQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByOrderAttributeCombination($orderAttributeCombination, $comparison = null)
|
||||
public function filterByOrderProductAttributeCombination($orderProductAttributeCombination, $comparison = null)
|
||||
{
|
||||
if ($orderAttributeCombination instanceof \Thelia\Model\OrderAttributeCombination) {
|
||||
if ($orderProductAttributeCombination instanceof \Thelia\Model\OrderProductAttributeCombination) {
|
||||
return $this
|
||||
->addUsingAlias(OrderProductTableMap::ID, $orderAttributeCombination->getOrderProductId(), $comparison);
|
||||
} elseif ($orderAttributeCombination instanceof ObjectCollection) {
|
||||
->addUsingAlias(OrderProductTableMap::ID, $orderProductAttributeCombination->getOrderProductId(), $comparison);
|
||||
} elseif ($orderProductAttributeCombination instanceof ObjectCollection) {
|
||||
return $this
|
||||
->useOrderAttributeCombinationQuery()
|
||||
->filterByPrimaryKeys($orderAttributeCombination->getPrimaryKeys())
|
||||
->useOrderProductAttributeCombinationQuery()
|
||||
->filterByPrimaryKeys($orderProductAttributeCombination->getPrimaryKeys())
|
||||
->endUse();
|
||||
} else {
|
||||
throw new PropelException('filterByOrderAttributeCombination() only accepts arguments of type \Thelia\Model\OrderAttributeCombination or Collection');
|
||||
throw new PropelException('filterByOrderProductAttributeCombination() only accepts arguments of type \Thelia\Model\OrderProductAttributeCombination or Collection');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the OrderAttributeCombination relation
|
||||
* Adds a JOIN clause to the query using the OrderProductAttributeCombination relation
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return ChildOrderProductQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinOrderAttributeCombination($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||
public function joinOrderProductAttributeCombination($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
$tableMap = $this->getTableMap();
|
||||
$relationMap = $tableMap->getRelation('OrderAttributeCombination');
|
||||
$relationMap = $tableMap->getRelation('OrderProductAttributeCombination');
|
||||
|
||||
// create a ModelJoin object for this join
|
||||
$join = new ModelJoin();
|
||||
@@ -1060,14 +1085,14 @@ abstract class OrderProductQuery extends ModelCriteria
|
||||
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||
$this->addJoinObject($join, $relationAlias);
|
||||
} else {
|
||||
$this->addJoinObject($join, 'OrderAttributeCombination');
|
||||
$this->addJoinObject($join, 'OrderProductAttributeCombination');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the OrderAttributeCombination relation OrderAttributeCombination object
|
||||
* Use the OrderProductAttributeCombination relation OrderProductAttributeCombination object
|
||||
*
|
||||
* @see useQuery()
|
||||
*
|
||||
@@ -1075,13 +1100,86 @@ abstract class OrderProductQuery extends ModelCriteria
|
||||
* 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\OrderAttributeCombinationQuery A secondary query class using the current class as primary query
|
||||
* @return \Thelia\Model\OrderProductAttributeCombinationQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useOrderAttributeCombinationQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||
public function useOrderProductAttributeCombinationQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinOrderAttributeCombination($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'OrderAttributeCombination', '\Thelia\Model\OrderAttributeCombinationQuery');
|
||||
->joinOrderProductAttributeCombination($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'OrderProductAttributeCombination', '\Thelia\Model\OrderProductAttributeCombinationQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related \Thelia\Model\OrderProductTax object
|
||||
*
|
||||
* @param \Thelia\Model\OrderProductTax|ObjectCollection $orderProductTax the related object to use as filter
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildOrderProductQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByOrderProductTax($orderProductTax, $comparison = null)
|
||||
{
|
||||
if ($orderProductTax instanceof \Thelia\Model\OrderProductTax) {
|
||||
return $this
|
||||
->addUsingAlias(OrderProductTableMap::ID, $orderProductTax->getOrderProductId(), $comparison);
|
||||
} elseif ($orderProductTax instanceof ObjectCollection) {
|
||||
return $this
|
||||
->useOrderProductTaxQuery()
|
||||
->filterByPrimaryKeys($orderProductTax->getPrimaryKeys())
|
||||
->endUse();
|
||||
} else {
|
||||
throw new PropelException('filterByOrderProductTax() only accepts arguments of type \Thelia\Model\OrderProductTax or Collection');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the OrderProductTax relation
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return ChildOrderProductQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinOrderProductTax($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
$tableMap = $this->getTableMap();
|
||||
$relationMap = $tableMap->getRelation('OrderProductTax');
|
||||
|
||||
// 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, 'OrderProductTax');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the OrderProductTax relation OrderProductTax 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\OrderProductTaxQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useOrderProductTaxQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinOrderProductTax($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'OrderProductTax', '\Thelia\Model\OrderProductTaxQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,503 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Thelia\Model\Map;
|
||||
|
||||
use Propel\Runtime\Propel;
|
||||
use Propel\Runtime\ActiveQuery\Criteria;
|
||||
use Propel\Runtime\ActiveQuery\InstancePoolTrait;
|
||||
use Propel\Runtime\Connection\ConnectionInterface;
|
||||
use Propel\Runtime\Exception\PropelException;
|
||||
use Propel\Runtime\Map\RelationMap;
|
||||
use Propel\Runtime\Map\TableMap;
|
||||
use Propel\Runtime\Map\TableMapTrait;
|
||||
use Thelia\Model\OrderAttributeCombination;
|
||||
use Thelia\Model\OrderAttributeCombinationQuery;
|
||||
|
||||
|
||||
/**
|
||||
* This class defines the structure of the 'order_attribute_combination' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* This map class is used by Propel to do runtime db structure discovery.
|
||||
* For example, the createSelectSql() method checks the type of a given column used in an
|
||||
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
|
||||
* (i.e. if it's a text column type).
|
||||
*
|
||||
*/
|
||||
class OrderAttributeCombinationTableMap extends TableMap
|
||||
{
|
||||
use InstancePoolTrait;
|
||||
use TableMapTrait;
|
||||
/**
|
||||
* The (dot-path) name of this class
|
||||
*/
|
||||
const CLASS_NAME = 'Thelia.Model.Map.OrderAttributeCombinationTableMap';
|
||||
|
||||
/**
|
||||
* The default database name for this class
|
||||
*/
|
||||
const DATABASE_NAME = 'thelia';
|
||||
|
||||
/**
|
||||
* The table name for this class
|
||||
*/
|
||||
const TABLE_NAME = 'order_attribute_combination';
|
||||
|
||||
/**
|
||||
* The related Propel class for this table
|
||||
*/
|
||||
const OM_CLASS = '\\Thelia\\Model\\OrderAttributeCombination';
|
||||
|
||||
/**
|
||||
* A class that can be returned by this tableMap
|
||||
*/
|
||||
const CLASS_DEFAULT = 'Thelia.Model.OrderAttributeCombination';
|
||||
|
||||
/**
|
||||
* The total number of columns
|
||||
*/
|
||||
const NUM_COLUMNS = 12;
|
||||
|
||||
/**
|
||||
* The number of lazy-loaded columns
|
||||
*/
|
||||
const NUM_LAZY_LOAD_COLUMNS = 0;
|
||||
|
||||
/**
|
||||
* The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS)
|
||||
*/
|
||||
const NUM_HYDRATE_COLUMNS = 12;
|
||||
|
||||
/**
|
||||
* the column name for the ID field
|
||||
*/
|
||||
const ID = 'order_attribute_combination.ID';
|
||||
|
||||
/**
|
||||
* the column name for the ORDER_PRODUCT_ID field
|
||||
*/
|
||||
const ORDER_PRODUCT_ID = 'order_attribute_combination.ORDER_PRODUCT_ID';
|
||||
|
||||
/**
|
||||
* the column name for the ATTRIBUTE_TITLE field
|
||||
*/
|
||||
const ATTRIBUTE_TITLE = 'order_attribute_combination.ATTRIBUTE_TITLE';
|
||||
|
||||
/**
|
||||
* the column name for the ATTRIBUTE_CHAPO field
|
||||
*/
|
||||
const ATTRIBUTE_CHAPO = 'order_attribute_combination.ATTRIBUTE_CHAPO';
|
||||
|
||||
/**
|
||||
* the column name for the ATTRIBUTE_DESCRIPTION field
|
||||
*/
|
||||
const ATTRIBUTE_DESCRIPTION = 'order_attribute_combination.ATTRIBUTE_DESCRIPTION';
|
||||
|
||||
/**
|
||||
* the column name for the ATTRIBUTE_POSTSCRIPTUMN field
|
||||
*/
|
||||
const ATTRIBUTE_POSTSCRIPTUMN = 'order_attribute_combination.ATTRIBUTE_POSTSCRIPTUMN';
|
||||
|
||||
/**
|
||||
* the column name for the ATTRIBUTE_AV_TITLE field
|
||||
*/
|
||||
const ATTRIBUTE_AV_TITLE = 'order_attribute_combination.ATTRIBUTE_AV_TITLE';
|
||||
|
||||
/**
|
||||
* the column name for the ATTRIBUTE_AV_CHAPO field
|
||||
*/
|
||||
const ATTRIBUTE_AV_CHAPO = 'order_attribute_combination.ATTRIBUTE_AV_CHAPO';
|
||||
|
||||
/**
|
||||
* the column name for the ATTRIBUTE_AV_DESCRIPTION field
|
||||
*/
|
||||
const ATTRIBUTE_AV_DESCRIPTION = 'order_attribute_combination.ATTRIBUTE_AV_DESCRIPTION';
|
||||
|
||||
/**
|
||||
* the column name for the ATTRIBUTE_AV_POSTSCRIPTUM field
|
||||
*/
|
||||
const ATTRIBUTE_AV_POSTSCRIPTUM = 'order_attribute_combination.ATTRIBUTE_AV_POSTSCRIPTUM';
|
||||
|
||||
/**
|
||||
* the column name for the CREATED_AT field
|
||||
*/
|
||||
const CREATED_AT = 'order_attribute_combination.CREATED_AT';
|
||||
|
||||
/**
|
||||
* the column name for the UPDATED_AT field
|
||||
*/
|
||||
const UPDATED_AT = 'order_attribute_combination.UPDATED_AT';
|
||||
|
||||
/**
|
||||
* The default string format for model objects of the related table
|
||||
*/
|
||||
const DEFAULT_STRING_FORMAT = 'YAML';
|
||||
|
||||
/**
|
||||
* holds an array of fieldnames
|
||||
*
|
||||
* first dimension keys are the type constants
|
||||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||
*/
|
||||
protected static $fieldNames = array (
|
||||
self::TYPE_PHPNAME => array('Id', 'OrderProductId', 'AttributeTitle', 'AttributeChapo', 'AttributeDescription', 'AttributePostscriptumn', 'AttributeAvTitle', 'AttributeAvChapo', 'AttributeAvDescription', 'AttributeAvPostscriptum', 'CreatedAt', 'UpdatedAt', ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id', 'orderProductId', 'attributeTitle', 'attributeChapo', 'attributeDescription', 'attributePostscriptumn', 'attributeAvTitle', 'attributeAvChapo', 'attributeAvDescription', 'attributeAvPostscriptum', 'createdAt', 'updatedAt', ),
|
||||
self::TYPE_COLNAME => array(OrderAttributeCombinationTableMap::ID, OrderAttributeCombinationTableMap::ORDER_PRODUCT_ID, OrderAttributeCombinationTableMap::ATTRIBUTE_TITLE, OrderAttributeCombinationTableMap::ATTRIBUTE_CHAPO, OrderAttributeCombinationTableMap::ATTRIBUTE_DESCRIPTION, OrderAttributeCombinationTableMap::ATTRIBUTE_POSTSCRIPTUMN, OrderAttributeCombinationTableMap::ATTRIBUTE_AV_TITLE, OrderAttributeCombinationTableMap::ATTRIBUTE_AV_CHAPO, OrderAttributeCombinationTableMap::ATTRIBUTE_AV_DESCRIPTION, OrderAttributeCombinationTableMap::ATTRIBUTE_AV_POSTSCRIPTUM, OrderAttributeCombinationTableMap::CREATED_AT, OrderAttributeCombinationTableMap::UPDATED_AT, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID', 'ORDER_PRODUCT_ID', 'ATTRIBUTE_TITLE', 'ATTRIBUTE_CHAPO', 'ATTRIBUTE_DESCRIPTION', 'ATTRIBUTE_POSTSCRIPTUMN', 'ATTRIBUTE_AV_TITLE', 'ATTRIBUTE_AV_CHAPO', 'ATTRIBUTE_AV_DESCRIPTION', 'ATTRIBUTE_AV_POSTSCRIPTUM', 'CREATED_AT', 'UPDATED_AT', ),
|
||||
self::TYPE_FIELDNAME => array('id', 'order_product_id', 'attribute_title', 'attribute_chapo', 'attribute_description', 'attribute_postscriptumn', 'attribute_av_title', 'attribute_av_chapo', 'attribute_av_description', 'attribute_av_postscriptum', 'created_at', 'updated_at', ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, )
|
||||
);
|
||||
|
||||
/**
|
||||
* holds an array of keys for quick access to the fieldnames array
|
||||
*
|
||||
* first dimension keys are the type constants
|
||||
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
|
||||
*/
|
||||
protected static $fieldKeys = array (
|
||||
self::TYPE_PHPNAME => array('Id' => 0, 'OrderProductId' => 1, 'AttributeTitle' => 2, 'AttributeChapo' => 3, 'AttributeDescription' => 4, 'AttributePostscriptumn' => 5, 'AttributeAvTitle' => 6, 'AttributeAvChapo' => 7, 'AttributeAvDescription' => 8, 'AttributeAvPostscriptum' => 9, 'CreatedAt' => 10, 'UpdatedAt' => 11, ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'orderProductId' => 1, 'attributeTitle' => 2, 'attributeChapo' => 3, 'attributeDescription' => 4, 'attributePostscriptumn' => 5, 'attributeAvTitle' => 6, 'attributeAvChapo' => 7, 'attributeAvDescription' => 8, 'attributeAvPostscriptum' => 9, 'createdAt' => 10, 'updatedAt' => 11, ),
|
||||
self::TYPE_COLNAME => array(OrderAttributeCombinationTableMap::ID => 0, OrderAttributeCombinationTableMap::ORDER_PRODUCT_ID => 1, OrderAttributeCombinationTableMap::ATTRIBUTE_TITLE => 2, OrderAttributeCombinationTableMap::ATTRIBUTE_CHAPO => 3, OrderAttributeCombinationTableMap::ATTRIBUTE_DESCRIPTION => 4, OrderAttributeCombinationTableMap::ATTRIBUTE_POSTSCRIPTUMN => 5, OrderAttributeCombinationTableMap::ATTRIBUTE_AV_TITLE => 6, OrderAttributeCombinationTableMap::ATTRIBUTE_AV_CHAPO => 7, OrderAttributeCombinationTableMap::ATTRIBUTE_AV_DESCRIPTION => 8, OrderAttributeCombinationTableMap::ATTRIBUTE_AV_POSTSCRIPTUM => 9, OrderAttributeCombinationTableMap::CREATED_AT => 10, OrderAttributeCombinationTableMap::UPDATED_AT => 11, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID' => 0, 'ORDER_PRODUCT_ID' => 1, 'ATTRIBUTE_TITLE' => 2, 'ATTRIBUTE_CHAPO' => 3, 'ATTRIBUTE_DESCRIPTION' => 4, 'ATTRIBUTE_POSTSCRIPTUMN' => 5, 'ATTRIBUTE_AV_TITLE' => 6, 'ATTRIBUTE_AV_CHAPO' => 7, 'ATTRIBUTE_AV_DESCRIPTION' => 8, 'ATTRIBUTE_AV_POSTSCRIPTUM' => 9, 'CREATED_AT' => 10, 'UPDATED_AT' => 11, ),
|
||||
self::TYPE_FIELDNAME => array('id' => 0, 'order_product_id' => 1, 'attribute_title' => 2, 'attribute_chapo' => 3, 'attribute_description' => 4, 'attribute_postscriptumn' => 5, 'attribute_av_title' => 6, 'attribute_av_chapo' => 7, 'attribute_av_description' => 8, 'attribute_av_postscriptum' => 9, 'created_at' => 10, 'updated_at' => 11, ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, )
|
||||
);
|
||||
|
||||
/**
|
||||
* Initialize the table attributes and columns
|
||||
* Relations are not initialized by this method since they are lazy loaded
|
||||
*
|
||||
* @return void
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function initialize()
|
||||
{
|
||||
// attributes
|
||||
$this->setName('order_attribute_combination');
|
||||
$this->setPhpName('OrderAttributeCombination');
|
||||
$this->setClassName('\\Thelia\\Model\\OrderAttributeCombination');
|
||||
$this->setPackage('Thelia.Model');
|
||||
$this->setUseIdGenerator(true);
|
||||
// columns
|
||||
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
|
||||
$this->addForeignKey('ORDER_PRODUCT_ID', 'OrderProductId', 'INTEGER', 'order_product', 'ID', true, null, null);
|
||||
$this->addColumn('ATTRIBUTE_TITLE', 'AttributeTitle', 'VARCHAR', true, 255, null);
|
||||
$this->addColumn('ATTRIBUTE_CHAPO', 'AttributeChapo', 'LONGVARCHAR', false, null, null);
|
||||
$this->addColumn('ATTRIBUTE_DESCRIPTION', 'AttributeDescription', 'CLOB', false, null, null);
|
||||
$this->addColumn('ATTRIBUTE_POSTSCRIPTUMN', 'AttributePostscriptumn', 'LONGVARCHAR', false, null, null);
|
||||
$this->addColumn('ATTRIBUTE_AV_TITLE', 'AttributeAvTitle', 'VARCHAR', true, 255, null);
|
||||
$this->addColumn('ATTRIBUTE_AV_CHAPO', 'AttributeAvChapo', 'LONGVARCHAR', false, null, null);
|
||||
$this->addColumn('ATTRIBUTE_AV_DESCRIPTION', 'AttributeAvDescription', 'CLOB', false, null, null);
|
||||
$this->addColumn('ATTRIBUTE_AV_POSTSCRIPTUM', 'AttributeAvPostscriptum', 'LONGVARCHAR', false, null, null);
|
||||
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
|
||||
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
|
||||
} // initialize()
|
||||
|
||||
/**
|
||||
* Build the RelationMap objects for this table relationships
|
||||
*/
|
||||
public function buildRelations()
|
||||
{
|
||||
$this->addRelation('OrderProduct', '\\Thelia\\Model\\OrderProduct', RelationMap::MANY_TO_ONE, array('order_product_id' => 'id', ), 'CASCADE', 'RESTRICT');
|
||||
} // buildRelations()
|
||||
|
||||
/**
|
||||
*
|
||||
* Gets the list of behaviors registered for this table
|
||||
*
|
||||
* @return array Associative array (name => parameters) of behaviors
|
||||
*/
|
||||
public function getBehaviors()
|
||||
{
|
||||
return array(
|
||||
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', ),
|
||||
);
|
||||
} // getBehaviors()
|
||||
|
||||
/**
|
||||
* Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table.
|
||||
*
|
||||
* For tables with a single-column primary key, that simple pkey value will be returned. For tables with
|
||||
* a multi-column primary key, a serialize()d version of the primary key will be returned.
|
||||
*
|
||||
* @param array $row resultset row.
|
||||
* @param int $offset The 0-based offset for reading from the resultset row.
|
||||
* @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME
|
||||
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM
|
||||
*/
|
||||
public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
|
||||
{
|
||||
// If the PK cannot be derived from the row, return NULL.
|
||||
if ($row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)] === null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (string) $row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the primary key from the DB resultset row
|
||||
* For tables with a single-column primary key, that simple pkey value will be returned. For tables with
|
||||
* a multi-column primary key, an array of the primary key columns will be returned.
|
||||
*
|
||||
* @param array $row resultset row.
|
||||
* @param int $offset The 0-based offset for reading from the resultset row.
|
||||
* @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME
|
||||
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM
|
||||
*
|
||||
* @return mixed The primary key of the row
|
||||
*/
|
||||
public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
|
||||
{
|
||||
|
||||
return (int) $row[
|
||||
$indexType == TableMap::TYPE_NUM
|
||||
? 0 + $offset
|
||||
: self::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* The class that the tableMap will make instances of.
|
||||
*
|
||||
* If $withPrefix is true, the returned path
|
||||
* uses a dot-path notation which is translated into a path
|
||||
* relative to a location on the PHP include_path.
|
||||
* (e.g. path.to.MyClass -> 'path/to/MyClass.php')
|
||||
*
|
||||
* @param boolean $withPrefix Whether or not to return the path with the class name
|
||||
* @return string path.to.ClassName
|
||||
*/
|
||||
public static function getOMClass($withPrefix = true)
|
||||
{
|
||||
return $withPrefix ? OrderAttributeCombinationTableMap::CLASS_DEFAULT : OrderAttributeCombinationTableMap::OM_CLASS;
|
||||
}
|
||||
|
||||
/**
|
||||
* Populates an object of the default type or an object that inherit from the default.
|
||||
*
|
||||
* @param array $row row returned by DataFetcher->fetch().
|
||||
* @param int $offset The 0-based offset for reading from the resultset row.
|
||||
* @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType().
|
||||
One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME
|
||||
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
|
||||
*
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
* @return array (OrderAttributeCombination object, last column rank)
|
||||
*/
|
||||
public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
|
||||
{
|
||||
$key = OrderAttributeCombinationTableMap::getPrimaryKeyHashFromRow($row, $offset, $indexType);
|
||||
if (null !== ($obj = OrderAttributeCombinationTableMap::getInstanceFromPool($key))) {
|
||||
// We no longer rehydrate the object, since this can cause data loss.
|
||||
// See http://www.propelorm.org/ticket/509
|
||||
// $obj->hydrate($row, $offset, true); // rehydrate
|
||||
$col = $offset + OrderAttributeCombinationTableMap::NUM_HYDRATE_COLUMNS;
|
||||
} else {
|
||||
$cls = OrderAttributeCombinationTableMap::OM_CLASS;
|
||||
$obj = new $cls();
|
||||
$col = $obj->hydrate($row, $offset, false, $indexType);
|
||||
OrderAttributeCombinationTableMap::addInstanceToPool($obj, $key);
|
||||
}
|
||||
|
||||
return array($obj, $col);
|
||||
}
|
||||
|
||||
/**
|
||||
* The returned array will contain objects of the default type or
|
||||
* objects that inherit from the default.
|
||||
*
|
||||
* @param DataFetcherInterface $dataFetcher
|
||||
* @return array
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public static function populateObjects(DataFetcherInterface $dataFetcher)
|
||||
{
|
||||
$results = array();
|
||||
|
||||
// set the class once to avoid overhead in the loop
|
||||
$cls = static::getOMClass(false);
|
||||
// populate the object(s)
|
||||
while ($row = $dataFetcher->fetch()) {
|
||||
$key = OrderAttributeCombinationTableMap::getPrimaryKeyHashFromRow($row, 0, $dataFetcher->getIndexType());
|
||||
if (null !== ($obj = OrderAttributeCombinationTableMap::getInstanceFromPool($key))) {
|
||||
// We no longer rehydrate the object, since this can cause data loss.
|
||||
// See http://www.propelorm.org/ticket/509
|
||||
// $obj->hydrate($row, 0, true); // rehydrate
|
||||
$results[] = $obj;
|
||||
} else {
|
||||
$obj = new $cls();
|
||||
$obj->hydrate($row);
|
||||
$results[] = $obj;
|
||||
OrderAttributeCombinationTableMap::addInstanceToPool($obj, $key);
|
||||
} // if key exists
|
||||
}
|
||||
|
||||
return $results;
|
||||
}
|
||||
/**
|
||||
* Add all the columns needed to create a new object.
|
||||
*
|
||||
* Note: any columns that were marked with lazyLoad="true" in the
|
||||
* XML schema will not be added to the select list and only loaded
|
||||
* on demand.
|
||||
*
|
||||
* @param Criteria $criteria object containing the columns to add.
|
||||
* @param string $alias optional table alias
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public static function addSelectColumns(Criteria $criteria, $alias = null)
|
||||
{
|
||||
if (null === $alias) {
|
||||
$criteria->addSelectColumn(OrderAttributeCombinationTableMap::ID);
|
||||
$criteria->addSelectColumn(OrderAttributeCombinationTableMap::ORDER_PRODUCT_ID);
|
||||
$criteria->addSelectColumn(OrderAttributeCombinationTableMap::ATTRIBUTE_TITLE);
|
||||
$criteria->addSelectColumn(OrderAttributeCombinationTableMap::ATTRIBUTE_CHAPO);
|
||||
$criteria->addSelectColumn(OrderAttributeCombinationTableMap::ATTRIBUTE_DESCRIPTION);
|
||||
$criteria->addSelectColumn(OrderAttributeCombinationTableMap::ATTRIBUTE_POSTSCRIPTUMN);
|
||||
$criteria->addSelectColumn(OrderAttributeCombinationTableMap::ATTRIBUTE_AV_TITLE);
|
||||
$criteria->addSelectColumn(OrderAttributeCombinationTableMap::ATTRIBUTE_AV_CHAPO);
|
||||
$criteria->addSelectColumn(OrderAttributeCombinationTableMap::ATTRIBUTE_AV_DESCRIPTION);
|
||||
$criteria->addSelectColumn(OrderAttributeCombinationTableMap::ATTRIBUTE_AV_POSTSCRIPTUM);
|
||||
$criteria->addSelectColumn(OrderAttributeCombinationTableMap::CREATED_AT);
|
||||
$criteria->addSelectColumn(OrderAttributeCombinationTableMap::UPDATED_AT);
|
||||
} else {
|
||||
$criteria->addSelectColumn($alias . '.ID');
|
||||
$criteria->addSelectColumn($alias . '.ORDER_PRODUCT_ID');
|
||||
$criteria->addSelectColumn($alias . '.ATTRIBUTE_TITLE');
|
||||
$criteria->addSelectColumn($alias . '.ATTRIBUTE_CHAPO');
|
||||
$criteria->addSelectColumn($alias . '.ATTRIBUTE_DESCRIPTION');
|
||||
$criteria->addSelectColumn($alias . '.ATTRIBUTE_POSTSCRIPTUMN');
|
||||
$criteria->addSelectColumn($alias . '.ATTRIBUTE_AV_TITLE');
|
||||
$criteria->addSelectColumn($alias . '.ATTRIBUTE_AV_CHAPO');
|
||||
$criteria->addSelectColumn($alias . '.ATTRIBUTE_AV_DESCRIPTION');
|
||||
$criteria->addSelectColumn($alias . '.ATTRIBUTE_AV_POSTSCRIPTUM');
|
||||
$criteria->addSelectColumn($alias . '.CREATED_AT');
|
||||
$criteria->addSelectColumn($alias . '.UPDATED_AT');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the TableMap related to this object.
|
||||
* This method is not needed for general use but a specific application could have a need.
|
||||
* @return TableMap
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public static function getTableMap()
|
||||
{
|
||||
return Propel::getServiceContainer()->getDatabaseMap(OrderAttributeCombinationTableMap::DATABASE_NAME)->getTable(OrderAttributeCombinationTableMap::TABLE_NAME);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a TableMap instance to the database for this tableMap class.
|
||||
*/
|
||||
public static function buildTableMap()
|
||||
{
|
||||
$dbMap = Propel::getServiceContainer()->getDatabaseMap(OrderAttributeCombinationTableMap::DATABASE_NAME);
|
||||
if (!$dbMap->hasTable(OrderAttributeCombinationTableMap::TABLE_NAME)) {
|
||||
$dbMap->addTableObject(new OrderAttributeCombinationTableMap());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs a DELETE on the database, given a OrderAttributeCombination or Criteria object OR a primary key value.
|
||||
*
|
||||
* @param mixed $values Criteria or OrderAttributeCombination object or primary key or array of primary keys
|
||||
* which is used to create the DELETE statement
|
||||
* @param ConnectionInterface $con the connection to use
|
||||
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
|
||||
* if supported by native driver or if emulated using Propel.
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public static function doDelete($values, ConnectionInterface $con = null)
|
||||
{
|
||||
if (null === $con) {
|
||||
$con = Propel::getServiceContainer()->getWriteConnection(OrderAttributeCombinationTableMap::DATABASE_NAME);
|
||||
}
|
||||
|
||||
if ($values instanceof Criteria) {
|
||||
// rename for clarity
|
||||
$criteria = $values;
|
||||
} elseif ($values instanceof \Thelia\Model\OrderAttributeCombination) { // it's a model object
|
||||
// create criteria based on pk values
|
||||
$criteria = $values->buildPkeyCriteria();
|
||||
} else { // it's a primary key, or an array of pks
|
||||
$criteria = new Criteria(OrderAttributeCombinationTableMap::DATABASE_NAME);
|
||||
$criteria->add(OrderAttributeCombinationTableMap::ID, (array) $values, Criteria::IN);
|
||||
}
|
||||
|
||||
$query = OrderAttributeCombinationQuery::create()->mergeWith($criteria);
|
||||
|
||||
if ($values instanceof Criteria) { OrderAttributeCombinationTableMap::clearInstancePool();
|
||||
} elseif (!is_object($values)) { // it's a primary key, or an array of pks
|
||||
foreach ((array) $values as $singleval) { OrderAttributeCombinationTableMap::removeInstanceFromPool($singleval);
|
||||
}
|
||||
}
|
||||
|
||||
return $query->delete($con);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes all rows from the order_attribute_combination table.
|
||||
*
|
||||
* @param ConnectionInterface $con the connection to use
|
||||
* @return int The number of affected rows (if supported by underlying database driver).
|
||||
*/
|
||||
public static function doDeleteAll(ConnectionInterface $con = null)
|
||||
{
|
||||
return OrderAttributeCombinationQuery::create()->doDeleteAll($con);
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs an INSERT on the database, given a OrderAttributeCombination or Criteria object.
|
||||
*
|
||||
* @param mixed $criteria Criteria or OrderAttributeCombination object containing data that is used to create the INSERT statement.
|
||||
* @param ConnectionInterface $con the ConnectionInterface connection to use
|
||||
* @return mixed The new primary key.
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public static function doInsert($criteria, ConnectionInterface $con = null)
|
||||
{
|
||||
if (null === $con) {
|
||||
$con = Propel::getServiceContainer()->getWriteConnection(OrderAttributeCombinationTableMap::DATABASE_NAME);
|
||||
}
|
||||
|
||||
if ($criteria instanceof Criteria) {
|
||||
$criteria = clone $criteria; // rename for clarity
|
||||
} else {
|
||||
$criteria = $criteria->buildCriteria(); // build Criteria from OrderAttributeCombination object
|
||||
}
|
||||
|
||||
if ($criteria->containsKey(OrderAttributeCombinationTableMap::ID) && $criteria->keyContainsValue(OrderAttributeCombinationTableMap::ID) ) {
|
||||
throw new PropelException('Cannot insert a value for auto-increment primary key ('.OrderAttributeCombinationTableMap::ID.')');
|
||||
}
|
||||
|
||||
|
||||
// Set the correct dbName
|
||||
$query = OrderAttributeCombinationQuery::create()->mergeWith($criteria);
|
||||
|
||||
try {
|
||||
// use transaction because $criteria could contain info
|
||||
// for more than one table (I guess, conceivably)
|
||||
$con->beginTransaction();
|
||||
$pk = $query->doInsert($con);
|
||||
$con->commit();
|
||||
} catch (PropelException $e) {
|
||||
$con->rollBack();
|
||||
throw $e;
|
||||
}
|
||||
|
||||
return $pk;
|
||||
}
|
||||
|
||||
} // OrderAttributeCombinationTableMap
|
||||
// This is the static code needed to register the TableMap for this table with the main Propel class.
|
||||
//
|
||||
OrderAttributeCombinationTableMap::buildTableMap();
|
||||
@@ -57,7 +57,7 @@ class OrderProductTableMap extends TableMap
|
||||
/**
|
||||
* The total number of columns
|
||||
*/
|
||||
const NUM_COLUMNS = 18;
|
||||
const NUM_COLUMNS = 19;
|
||||
|
||||
/**
|
||||
* The number of lazy-loaded columns
|
||||
@@ -67,7 +67,7 @@ class OrderProductTableMap extends TableMap
|
||||
/**
|
||||
* The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS)
|
||||
*/
|
||||
const NUM_HYDRATE_COLUMNS = 18;
|
||||
const NUM_HYDRATE_COLUMNS = 19;
|
||||
|
||||
/**
|
||||
* the column name for the ID field
|
||||
@@ -140,9 +140,14 @@ class OrderProductTableMap extends TableMap
|
||||
const WEIGHT = 'order_product.WEIGHT';
|
||||
|
||||
/**
|
||||
* the column name for the TAX field
|
||||
* the column name for the TAX_RULE_TITLE field
|
||||
*/
|
||||
const TAX = 'order_product.TAX';
|
||||
const TAX_RULE_TITLE = 'order_product.TAX_RULE_TITLE';
|
||||
|
||||
/**
|
||||
* the column name for the TAX_RULE_DESCRIPTION field
|
||||
*/
|
||||
const TAX_RULE_DESCRIPTION = 'order_product.TAX_RULE_DESCRIPTION';
|
||||
|
||||
/**
|
||||
* the column name for the PARENT field
|
||||
@@ -171,12 +176,12 @@ class OrderProductTableMap extends TableMap
|
||||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||
*/
|
||||
protected static $fieldNames = array (
|
||||
self::TYPE_PHPNAME => array('Id', 'OrderId', 'ProductRef', 'ProductSaleElementsRef', 'Title', 'Chapo', 'Description', 'Postscriptum', 'Quantity', 'Price', 'PromoPrice', 'WasNew', 'WasInPromo', 'Weight', 'Tax', 'Parent', 'CreatedAt', 'UpdatedAt', ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id', 'orderId', 'productRef', 'productSaleElementsRef', 'title', 'chapo', 'description', 'postscriptum', 'quantity', 'price', 'promoPrice', 'wasNew', 'wasInPromo', 'weight', 'tax', 'parent', 'createdAt', 'updatedAt', ),
|
||||
self::TYPE_COLNAME => array(OrderProductTableMap::ID, OrderProductTableMap::ORDER_ID, OrderProductTableMap::PRODUCT_REF, OrderProductTableMap::PRODUCT_SALE_ELEMENTS_REF, OrderProductTableMap::TITLE, OrderProductTableMap::CHAPO, OrderProductTableMap::DESCRIPTION, OrderProductTableMap::POSTSCRIPTUM, OrderProductTableMap::QUANTITY, OrderProductTableMap::PRICE, OrderProductTableMap::PROMO_PRICE, OrderProductTableMap::WAS_NEW, OrderProductTableMap::WAS_IN_PROMO, OrderProductTableMap::WEIGHT, OrderProductTableMap::TAX, OrderProductTableMap::PARENT, OrderProductTableMap::CREATED_AT, OrderProductTableMap::UPDATED_AT, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID', 'ORDER_ID', 'PRODUCT_REF', 'PRODUCT_SALE_ELEMENTS_REF', 'TITLE', 'CHAPO', 'DESCRIPTION', 'POSTSCRIPTUM', 'QUANTITY', 'PRICE', 'PROMO_PRICE', 'WAS_NEW', 'WAS_IN_PROMO', 'WEIGHT', 'TAX', 'PARENT', 'CREATED_AT', 'UPDATED_AT', ),
|
||||
self::TYPE_FIELDNAME => array('id', 'order_id', 'product_ref', 'product_sale_elements_ref', 'title', 'chapo', 'description', 'postscriptum', 'quantity', 'price', 'promo_price', 'was_new', 'was_in_promo', 'weight', 'tax', 'parent', 'created_at', 'updated_at', ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, )
|
||||
self::TYPE_PHPNAME => array('Id', 'OrderId', 'ProductRef', 'ProductSaleElementsRef', 'Title', 'Chapo', 'Description', 'Postscriptum', 'Quantity', 'Price', 'PromoPrice', 'WasNew', 'WasInPromo', 'Weight', 'TaxRuleTitle', 'TaxRuleDescription', 'Parent', 'CreatedAt', 'UpdatedAt', ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id', 'orderId', 'productRef', 'productSaleElementsRef', 'title', 'chapo', 'description', 'postscriptum', 'quantity', 'price', 'promoPrice', 'wasNew', 'wasInPromo', 'weight', 'taxRuleTitle', 'taxRuleDescription', 'parent', 'createdAt', 'updatedAt', ),
|
||||
self::TYPE_COLNAME => array(OrderProductTableMap::ID, OrderProductTableMap::ORDER_ID, OrderProductTableMap::PRODUCT_REF, OrderProductTableMap::PRODUCT_SALE_ELEMENTS_REF, OrderProductTableMap::TITLE, OrderProductTableMap::CHAPO, OrderProductTableMap::DESCRIPTION, OrderProductTableMap::POSTSCRIPTUM, OrderProductTableMap::QUANTITY, OrderProductTableMap::PRICE, OrderProductTableMap::PROMO_PRICE, OrderProductTableMap::WAS_NEW, OrderProductTableMap::WAS_IN_PROMO, OrderProductTableMap::WEIGHT, OrderProductTableMap::TAX_RULE_TITLE, OrderProductTableMap::TAX_RULE_DESCRIPTION, OrderProductTableMap::PARENT, OrderProductTableMap::CREATED_AT, OrderProductTableMap::UPDATED_AT, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID', 'ORDER_ID', 'PRODUCT_REF', 'PRODUCT_SALE_ELEMENTS_REF', 'TITLE', 'CHAPO', 'DESCRIPTION', 'POSTSCRIPTUM', 'QUANTITY', 'PRICE', 'PROMO_PRICE', 'WAS_NEW', 'WAS_IN_PROMO', 'WEIGHT', 'TAX_RULE_TITLE', 'TAX_RULE_DESCRIPTION', 'PARENT', 'CREATED_AT', 'UPDATED_AT', ),
|
||||
self::TYPE_FIELDNAME => array('id', 'order_id', 'product_ref', 'product_sale_elements_ref', 'title', 'chapo', 'description', 'postscriptum', 'quantity', 'price', 'promo_price', 'was_new', 'was_in_promo', 'weight', 'tax_rule_title', 'tax_rule_description', 'parent', 'created_at', 'updated_at', ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, )
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -186,12 +191,12 @@ class OrderProductTableMap extends TableMap
|
||||
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
|
||||
*/
|
||||
protected static $fieldKeys = array (
|
||||
self::TYPE_PHPNAME => array('Id' => 0, 'OrderId' => 1, 'ProductRef' => 2, 'ProductSaleElementsRef' => 3, 'Title' => 4, 'Chapo' => 5, 'Description' => 6, 'Postscriptum' => 7, 'Quantity' => 8, 'Price' => 9, 'PromoPrice' => 10, 'WasNew' => 11, 'WasInPromo' => 12, 'Weight' => 13, 'Tax' => 14, 'Parent' => 15, 'CreatedAt' => 16, 'UpdatedAt' => 17, ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'orderId' => 1, 'productRef' => 2, 'productSaleElementsRef' => 3, 'title' => 4, 'chapo' => 5, 'description' => 6, 'postscriptum' => 7, 'quantity' => 8, 'price' => 9, 'promoPrice' => 10, 'wasNew' => 11, 'wasInPromo' => 12, 'weight' => 13, 'tax' => 14, 'parent' => 15, 'createdAt' => 16, 'updatedAt' => 17, ),
|
||||
self::TYPE_COLNAME => array(OrderProductTableMap::ID => 0, OrderProductTableMap::ORDER_ID => 1, OrderProductTableMap::PRODUCT_REF => 2, OrderProductTableMap::PRODUCT_SALE_ELEMENTS_REF => 3, OrderProductTableMap::TITLE => 4, OrderProductTableMap::CHAPO => 5, OrderProductTableMap::DESCRIPTION => 6, OrderProductTableMap::POSTSCRIPTUM => 7, OrderProductTableMap::QUANTITY => 8, OrderProductTableMap::PRICE => 9, OrderProductTableMap::PROMO_PRICE => 10, OrderProductTableMap::WAS_NEW => 11, OrderProductTableMap::WAS_IN_PROMO => 12, OrderProductTableMap::WEIGHT => 13, OrderProductTableMap::TAX => 14, OrderProductTableMap::PARENT => 15, OrderProductTableMap::CREATED_AT => 16, OrderProductTableMap::UPDATED_AT => 17, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID' => 0, 'ORDER_ID' => 1, 'PRODUCT_REF' => 2, 'PRODUCT_SALE_ELEMENTS_REF' => 3, 'TITLE' => 4, 'CHAPO' => 5, 'DESCRIPTION' => 6, 'POSTSCRIPTUM' => 7, 'QUANTITY' => 8, 'PRICE' => 9, 'PROMO_PRICE' => 10, 'WAS_NEW' => 11, 'WAS_IN_PROMO' => 12, 'WEIGHT' => 13, 'TAX' => 14, 'PARENT' => 15, 'CREATED_AT' => 16, 'UPDATED_AT' => 17, ),
|
||||
self::TYPE_FIELDNAME => array('id' => 0, 'order_id' => 1, 'product_ref' => 2, 'product_sale_elements_ref' => 3, 'title' => 4, 'chapo' => 5, 'description' => 6, 'postscriptum' => 7, 'quantity' => 8, 'price' => 9, 'promo_price' => 10, 'was_new' => 11, 'was_in_promo' => 12, 'weight' => 13, 'tax' => 14, 'parent' => 15, 'created_at' => 16, 'updated_at' => 17, ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, )
|
||||
self::TYPE_PHPNAME => array('Id' => 0, 'OrderId' => 1, 'ProductRef' => 2, 'ProductSaleElementsRef' => 3, 'Title' => 4, 'Chapo' => 5, 'Description' => 6, 'Postscriptum' => 7, 'Quantity' => 8, 'Price' => 9, 'PromoPrice' => 10, 'WasNew' => 11, 'WasInPromo' => 12, 'Weight' => 13, 'TaxRuleTitle' => 14, 'TaxRuleDescription' => 15, 'Parent' => 16, 'CreatedAt' => 17, 'UpdatedAt' => 18, ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'orderId' => 1, 'productRef' => 2, 'productSaleElementsRef' => 3, 'title' => 4, 'chapo' => 5, 'description' => 6, 'postscriptum' => 7, 'quantity' => 8, 'price' => 9, 'promoPrice' => 10, 'wasNew' => 11, 'wasInPromo' => 12, 'weight' => 13, 'taxRuleTitle' => 14, 'taxRuleDescription' => 15, 'parent' => 16, 'createdAt' => 17, 'updatedAt' => 18, ),
|
||||
self::TYPE_COLNAME => array(OrderProductTableMap::ID => 0, OrderProductTableMap::ORDER_ID => 1, OrderProductTableMap::PRODUCT_REF => 2, OrderProductTableMap::PRODUCT_SALE_ELEMENTS_REF => 3, OrderProductTableMap::TITLE => 4, OrderProductTableMap::CHAPO => 5, OrderProductTableMap::DESCRIPTION => 6, OrderProductTableMap::POSTSCRIPTUM => 7, OrderProductTableMap::QUANTITY => 8, OrderProductTableMap::PRICE => 9, OrderProductTableMap::PROMO_PRICE => 10, OrderProductTableMap::WAS_NEW => 11, OrderProductTableMap::WAS_IN_PROMO => 12, OrderProductTableMap::WEIGHT => 13, OrderProductTableMap::TAX_RULE_TITLE => 14, OrderProductTableMap::TAX_RULE_DESCRIPTION => 15, OrderProductTableMap::PARENT => 16, OrderProductTableMap::CREATED_AT => 17, OrderProductTableMap::UPDATED_AT => 18, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID' => 0, 'ORDER_ID' => 1, 'PRODUCT_REF' => 2, 'PRODUCT_SALE_ELEMENTS_REF' => 3, 'TITLE' => 4, 'CHAPO' => 5, 'DESCRIPTION' => 6, 'POSTSCRIPTUM' => 7, 'QUANTITY' => 8, 'PRICE' => 9, 'PROMO_PRICE' => 10, 'WAS_NEW' => 11, 'WAS_IN_PROMO' => 12, 'WEIGHT' => 13, 'TAX_RULE_TITLE' => 14, 'TAX_RULE_DESCRIPTION' => 15, 'PARENT' => 16, 'CREATED_AT' => 17, 'UPDATED_AT' => 18, ),
|
||||
self::TYPE_FIELDNAME => array('id' => 0, 'order_id' => 1, 'product_ref' => 2, 'product_sale_elements_ref' => 3, 'title' => 4, 'chapo' => 5, 'description' => 6, 'postscriptum' => 7, 'quantity' => 8, 'price' => 9, 'promo_price' => 10, 'was_new' => 11, 'was_in_promo' => 12, 'weight' => 13, 'tax_rule_title' => 14, 'tax_rule_description' => 15, 'parent' => 16, 'created_at' => 17, 'updated_at' => 18, ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, )
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -224,7 +229,8 @@ class OrderProductTableMap extends TableMap
|
||||
$this->addColumn('WAS_NEW', 'WasNew', 'TINYINT', true, null, null);
|
||||
$this->addColumn('WAS_IN_PROMO', 'WasInPromo', 'TINYINT', true, null, null);
|
||||
$this->addColumn('WEIGHT', 'Weight', 'VARCHAR', false, 45, null);
|
||||
$this->addColumn('TAX', 'Tax', 'FLOAT', false, null, null);
|
||||
$this->addColumn('TAX_RULE_TITLE', 'TaxRuleTitle', 'VARCHAR', false, 255, null);
|
||||
$this->addColumn('TAX_RULE_DESCRIPTION', 'TaxRuleDescription', 'CLOB', false, null, null);
|
||||
$this->addColumn('PARENT', 'Parent', 'INTEGER', false, null, null);
|
||||
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
|
||||
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
|
||||
@@ -236,7 +242,8 @@ class OrderProductTableMap extends TableMap
|
||||
public function buildRelations()
|
||||
{
|
||||
$this->addRelation('Order', '\\Thelia\\Model\\Order', RelationMap::MANY_TO_ONE, array('order_id' => 'id', ), 'CASCADE', 'RESTRICT');
|
||||
$this->addRelation('OrderAttributeCombination', '\\Thelia\\Model\\OrderAttributeCombination', RelationMap::ONE_TO_MANY, array('id' => 'order_product_id', ), 'CASCADE', 'RESTRICT', 'OrderAttributeCombinations');
|
||||
$this->addRelation('OrderProductAttributeCombination', '\\Thelia\\Model\\OrderProductAttributeCombination', RelationMap::ONE_TO_MANY, array('id' => 'order_product_id', ), 'CASCADE', 'RESTRICT', 'OrderProductAttributeCombinations');
|
||||
$this->addRelation('OrderProductTax', '\\Thelia\\Model\\OrderProductTax', RelationMap::ONE_TO_MANY, array('id' => 'order_product_id', ), 'CASCADE', 'RESTRICT', 'OrderProductTaxes');
|
||||
} // buildRelations()
|
||||
|
||||
/**
|
||||
@@ -258,7 +265,8 @@ class OrderProductTableMap extends TableMap
|
||||
{
|
||||
// Invalidate objects in ".$this->getClassNameFromBuilder($joinedTableTableMapBuilder)." instance pool,
|
||||
// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
|
||||
OrderAttributeCombinationTableMap::clearInstancePool();
|
||||
OrderProductAttributeCombinationTableMap::clearInstancePool();
|
||||
OrderProductTaxTableMap::clearInstancePool();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -413,7 +421,8 @@ class OrderProductTableMap extends TableMap
|
||||
$criteria->addSelectColumn(OrderProductTableMap::WAS_NEW);
|
||||
$criteria->addSelectColumn(OrderProductTableMap::WAS_IN_PROMO);
|
||||
$criteria->addSelectColumn(OrderProductTableMap::WEIGHT);
|
||||
$criteria->addSelectColumn(OrderProductTableMap::TAX);
|
||||
$criteria->addSelectColumn(OrderProductTableMap::TAX_RULE_TITLE);
|
||||
$criteria->addSelectColumn(OrderProductTableMap::TAX_RULE_DESCRIPTION);
|
||||
$criteria->addSelectColumn(OrderProductTableMap::PARENT);
|
||||
$criteria->addSelectColumn(OrderProductTableMap::CREATED_AT);
|
||||
$criteria->addSelectColumn(OrderProductTableMap::UPDATED_AT);
|
||||
@@ -432,7 +441,8 @@ class OrderProductTableMap extends TableMap
|
||||
$criteria->addSelectColumn($alias . '.WAS_NEW');
|
||||
$criteria->addSelectColumn($alias . '.WAS_IN_PROMO');
|
||||
$criteria->addSelectColumn($alias . '.WEIGHT');
|
||||
$criteria->addSelectColumn($alias . '.TAX');
|
||||
$criteria->addSelectColumn($alias . '.TAX_RULE_TITLE');
|
||||
$criteria->addSelectColumn($alias . '.TAX_RULE_DESCRIPTION');
|
||||
$criteria->addSelectColumn($alias . '.PARENT');
|
||||
$criteria->addSelectColumn($alias . '.CREATED_AT');
|
||||
$criteria->addSelectColumn($alias . '.UPDATED_AT');
|
||||
|
||||
@@ -143,7 +143,7 @@ class TaxI18nTableMap extends TableMap
|
||||
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'tax', 'ID', true, null, null);
|
||||
$this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_US');
|
||||
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
|
||||
$this->addColumn('DESCRIPTION', 'Description', 'LONGVARCHAR', false, null, null);
|
||||
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
|
||||
} // initialize()
|
||||
|
||||
/**
|
||||
|
||||
@@ -143,7 +143,7 @@ class TaxRuleI18nTableMap extends TableMap
|
||||
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'tax_rule', 'ID', true, null, null);
|
||||
$this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_US');
|
||||
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
|
||||
$this->addColumn('DESCRIPTION', 'Description', 'LONGVARCHAR', false, null, null);
|
||||
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
|
||||
} // initialize()
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Thelia\Model;
|
||||
|
||||
use Thelia\Model\Base\OrderAttributeCombination as BaseOrderAttributeCombination;
|
||||
|
||||
class OrderAttributeCombination extends BaseOrderAttributeCombination
|
||||
{
|
||||
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Thelia\Model;
|
||||
|
||||
use Thelia\Model\Base\OrderAttributeCombinationQuery as BaseOrderAttributeCombinationQuery;
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'order_attribute_combination' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
*/
|
||||
class OrderAttributeCombinationQuery extends BaseOrderAttributeCombinationQuery
|
||||
{
|
||||
|
||||
} // OrderAttributeCombinationQuery
|
||||
@@ -772,7 +772,8 @@ CREATE TABLE `order_product`
|
||||
`was_new` TINYINT NOT NULL,
|
||||
`was_in_promo` TINYINT NOT NULL,
|
||||
`weight` VARCHAR(45),
|
||||
`tax` FLOAT,
|
||||
`tax_rule_title` VARCHAR(255),
|
||||
`tax_rule_description` LONGTEXT,
|
||||
`parent` INTEGER COMMENT 'not managed yet',
|
||||
`created_at` DATETIME,
|
||||
`updated_at` DATETIME,
|
||||
@@ -802,12 +803,12 @@ CREATE TABLE `order_status`
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- order_attribute_combination
|
||||
-- order_product_attribute_combination
|
||||
-- ---------------------------------------------------------------------
|
||||
|
||||
DROP TABLE IF EXISTS `order_attribute_combination`;
|
||||
DROP TABLE IF EXISTS `order_product_attribute_combination`;
|
||||
|
||||
CREATE TABLE `order_attribute_combination`
|
||||
CREATE TABLE `order_product_attribute_combination`
|
||||
(
|
||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||
`order_product_id` INTEGER NOT NULL,
|
||||
@@ -822,8 +823,8 @@ CREATE TABLE `order_attribute_combination`
|
||||
`created_at` DATETIME,
|
||||
`updated_at` DATETIME,
|
||||
PRIMARY KEY (`id`),
|
||||
INDEX `idx_order_feature_order_product_id` (`order_product_id`),
|
||||
CONSTRAINT `fk_order_feature_order_product_id`
|
||||
INDEX `idx_order_product_attribute_combination_order_product_id` (`order_product_id`),
|
||||
CONSTRAINT `fk_order_product_attribute_combination_order_product_id`
|
||||
FOREIGN KEY (`order_product_id`)
|
||||
REFERENCES `order_product` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
@@ -1572,6 +1573,30 @@ CREATE TABLE `module_image`
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- order_product_tax
|
||||
-- ---------------------------------------------------------------------
|
||||
|
||||
DROP TABLE IF EXISTS `order_product_tax`;
|
||||
|
||||
CREATE TABLE `order_product_tax`
|
||||
(
|
||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||
`order_product_id` INTEGER NOT NULL,
|
||||
`title` VARCHAR(255) NOT NULL,
|
||||
`description` LONGTEXT,
|
||||
`amount` FLOAT NOT NULL,
|
||||
`created_at` DATETIME,
|
||||
`updated_at` DATETIME,
|
||||
PRIMARY KEY (`id`),
|
||||
INDEX `idx_ order_product_tax_order_product_id` (`order_product_id`),
|
||||
CONSTRAINT `fk_ order_product_tax_order_product_id0`
|
||||
FOREIGN KEY (`order_product_id`)
|
||||
REFERENCES `order_product` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- category_i18n
|
||||
-- ---------------------------------------------------------------------
|
||||
@@ -1646,7 +1671,7 @@ CREATE TABLE `tax_i18n`
|
||||
`id` INTEGER NOT NULL,
|
||||
`locale` VARCHAR(5) DEFAULT 'en_US' NOT NULL,
|
||||
`title` VARCHAR(255),
|
||||
`description` TEXT,
|
||||
`description` LONGTEXT,
|
||||
PRIMARY KEY (`id`,`locale`),
|
||||
CONSTRAINT `tax_i18n_FK_1`
|
||||
FOREIGN KEY (`id`)
|
||||
@@ -1665,7 +1690,7 @@ CREATE TABLE `tax_rule_i18n`
|
||||
`id` INTEGER NOT NULL,
|
||||
`locale` VARCHAR(5) DEFAULT 'en_US' NOT NULL,
|
||||
`title` VARCHAR(255),
|
||||
`description` TEXT,
|
||||
`description` LONGTEXT,
|
||||
PRIMARY KEY (`id`,`locale`),
|
||||
CONSTRAINT `tax_rule_i18n_FK_1`
|
||||
FOREIGN KEY (`id`)
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
<column name="type" required="true" size="255" type="VARCHAR" />
|
||||
<column name="serialized_requirements" required="true" type="LONGVARCHAR" />
|
||||
<column name="title" size="255" type="VARCHAR" />
|
||||
<column name="description" type="LONGVARCHAR" />
|
||||
<column name="description" type="CLOB" />
|
||||
<behavior name="timestampable" />
|
||||
<behavior name="i18n">
|
||||
<parameter name="i18n_columns" value="title, description" />
|
||||
@@ -110,7 +110,7 @@
|
||||
<table name="tax_rule" namespace="Thelia\Model">
|
||||
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
|
||||
<column name="title" size="255" type="VARCHAR" />
|
||||
<column name="description" type="LONGVARCHAR" />
|
||||
<column name="description" type="CLOB" />
|
||||
<column defaultValue="0" name="is_default" required="true" type="BOOLEAN" />
|
||||
<behavior name="timestampable" />
|
||||
<behavior name="i18n">
|
||||
@@ -607,7 +607,8 @@
|
||||
<column name="was_new" required="true" type="TINYINT" />
|
||||
<column name="was_in_promo" required="true" type="TINYINT" />
|
||||
<column name="weight" size="45" type="VARCHAR" />
|
||||
<column name="tax" type="FLOAT" />
|
||||
<column name="tax_rule_title" size="255" type="VARCHAR" />
|
||||
<column name="tax_rule_description" type="CLOB" />
|
||||
<column description="not managed yet" name="parent" type="INTEGER" />
|
||||
<foreign-key foreignTable="order" name="fk_order_product_order_id" onDelete="CASCADE" onUpdate="RESTRICT">
|
||||
<reference foreign="id" local="order_id" />
|
||||
@@ -632,7 +633,7 @@
|
||||
<parameter name="i18n_columns" value="title, description, chapo, postscriptum" />
|
||||
</behavior>
|
||||
</table>
|
||||
<table name="order_attribute_combination" namespace="Thelia\Model">
|
||||
<table name="order_product_attribute_combination" namespace="Thelia\Model">
|
||||
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
|
||||
<column name="order_product_id" required="true" type="INTEGER" />
|
||||
<column name="attribute_title" required="true" size="255" type="VARCHAR" />
|
||||
@@ -643,10 +644,10 @@
|
||||
<column name="attribute_av_chapo" type="LONGVARCHAR" />
|
||||
<column name="attribute_av_description" type="CLOB" />
|
||||
<column name="attribute_av_postscriptum" type="LONGVARCHAR" />
|
||||
<foreign-key foreignTable="order_product" name="fk_order_feature_order_product_id" onDelete="CASCADE" onUpdate="RESTRICT">
|
||||
<foreign-key foreignTable="order_product" name="fk_order_product_attribute_combination_order_product_id" onDelete="CASCADE" onUpdate="RESTRICT">
|
||||
<reference foreign="id" local="order_product_id" />
|
||||
</foreign-key>
|
||||
<index name="idx_order_feature_order_product_id">
|
||||
<index name="idx_order_product_attribute_combination_order_product_id">
|
||||
<index-column name="order_product_id" />
|
||||
</index>
|
||||
<behavior name="timestampable" />
|
||||
@@ -1236,4 +1237,18 @@
|
||||
<parameter name="i18n_columns" value="title, description, chapo, postscriptum" />
|
||||
</behavior>
|
||||
</table>
|
||||
<table name="order_product_tax" namespace="Thelia\Model">
|
||||
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
|
||||
<column name="order_product_id" required="true" type="INTEGER" />
|
||||
<column name="title" required="true" size="255" type="VARCHAR" />
|
||||
<column name="description" type="CLOB" />
|
||||
<column name="amount" required="true" type="FLOAT" />
|
||||
<foreign-key foreignTable="order_product" name="fk_ order_product_tax_order_product_id0" onDelete="CASCADE" onUpdate="RESTRICT">
|
||||
<reference foreign="id" local="order_product_id" />
|
||||
</foreign-key>
|
||||
<index name="idx_ order_product_tax_order_product_id">
|
||||
<index-column name="order_product_id" />
|
||||
</index>
|
||||
<behavior name="timestampable" />
|
||||
</table>
|
||||
</database>
|
||||
|
||||
Reference in New Issue
Block a user