Add Index on export/import foreign keys
modifié: core/lib/Thelia/Model/Base/Export.php modifié: core/lib/Thelia/Model/Base/ExportQuery.php modifié: core/lib/Thelia/Model/Base/Import.php modifié: core/lib/Thelia/Model/Base/ImportCategory.php modifié: core/lib/Thelia/Model/Base/ImportCategoryQuery.php modifié: core/lib/Thelia/Model/Base/ImportQuery.php modifié: core/lib/Thelia/Model/Map/ExportCategoryTableMap.php modifié: core/lib/Thelia/Model/Map/ExportI18nTableMap.php modifié: core/lib/Thelia/Model/Map/ExportTableMap.php modifié: core/lib/Thelia/Model/Map/ImportCategoryTableMap.php modifié: core/lib/Thelia/Model/Map/ImportI18nTableMap.php modifié: core/lib/Thelia/Model/Map/ImportTableMap.php modifié: local/config/schema.xml modifié: setup/thelia.sql nouveau fichier: setup/update/2.0.3-beta2.sql
This commit is contained in:
@@ -71,18 +71,18 @@ abstract class Export implements ActiveRecordInterface
|
||||
*/
|
||||
protected $ref;
|
||||
|
||||
/**
|
||||
* The value for the export_category_id field.
|
||||
* @var int
|
||||
*/
|
||||
protected $export_category_id;
|
||||
|
||||
/**
|
||||
* The value for the position field.
|
||||
* @var int
|
||||
*/
|
||||
protected $position;
|
||||
|
||||
/**
|
||||
* The value for the export_category_id field.
|
||||
* @var int
|
||||
*/
|
||||
protected $export_category_id;
|
||||
|
||||
/**
|
||||
* The value for the handle_class field.
|
||||
* @var string
|
||||
@@ -420,17 +420,6 @@ abstract class Export implements ActiveRecordInterface
|
||||
return $this->ref;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [export_category_id] column value.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getExportCategoryId()
|
||||
{
|
||||
|
||||
return $this->export_category_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [position] column value.
|
||||
*
|
||||
@@ -442,6 +431,17 @@ abstract class Export implements ActiveRecordInterface
|
||||
return $this->position;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [export_category_id] column value.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getExportCategoryId()
|
||||
{
|
||||
|
||||
return $this->export_category_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [handle_class] column value.
|
||||
*
|
||||
@@ -535,6 +535,27 @@ abstract class Export implements ActiveRecordInterface
|
||||
return $this;
|
||||
} // setRef()
|
||||
|
||||
/**
|
||||
* Set the value of [position] column.
|
||||
*
|
||||
* @param int $v new value
|
||||
* @return \Thelia\Model\Export The current object (for fluent API support)
|
||||
*/
|
||||
public function setPosition($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (int) $v;
|
||||
}
|
||||
|
||||
if ($this->position !== $v) {
|
||||
$this->position = $v;
|
||||
$this->modifiedColumns[ExportTableMap::POSITION] = true;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setPosition()
|
||||
|
||||
/**
|
||||
* Set the value of [export_category_id] column.
|
||||
*
|
||||
@@ -560,27 +581,6 @@ abstract class Export implements ActiveRecordInterface
|
||||
return $this;
|
||||
} // setExportCategoryId()
|
||||
|
||||
/**
|
||||
* Set the value of [position] column.
|
||||
*
|
||||
* @param int $v new value
|
||||
* @return \Thelia\Model\Export The current object (for fluent API support)
|
||||
*/
|
||||
public function setPosition($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (int) $v;
|
||||
}
|
||||
|
||||
if ($this->position !== $v) {
|
||||
$this->position = $v;
|
||||
$this->modifiedColumns[ExportTableMap::POSITION] = true;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setPosition()
|
||||
|
||||
/**
|
||||
* Set the value of [handle_class] column.
|
||||
*
|
||||
@@ -687,12 +687,12 @@ abstract class Export implements ActiveRecordInterface
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : ExportTableMap::translateFieldName('Ref', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->ref = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : ExportTableMap::translateFieldName('ExportCategoryId', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->export_category_id = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : ExportTableMap::translateFieldName('Position', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : ExportTableMap::translateFieldName('Position', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->position = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : ExportTableMap::translateFieldName('ExportCategoryId', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->export_category_id = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : ExportTableMap::translateFieldName('HandleClass', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->handle_class = (null !== $col) ? (string) $col : null;
|
||||
|
||||
@@ -976,12 +976,12 @@ abstract class Export implements ActiveRecordInterface
|
||||
if ($this->isColumnModified(ExportTableMap::REF)) {
|
||||
$modifiedColumns[':p' . $index++] = '`REF`';
|
||||
}
|
||||
if ($this->isColumnModified(ExportTableMap::EXPORT_CATEGORY_ID)) {
|
||||
$modifiedColumns[':p' . $index++] = '`EXPORT_CATEGORY_ID`';
|
||||
}
|
||||
if ($this->isColumnModified(ExportTableMap::POSITION)) {
|
||||
$modifiedColumns[':p' . $index++] = '`POSITION`';
|
||||
}
|
||||
if ($this->isColumnModified(ExportTableMap::EXPORT_CATEGORY_ID)) {
|
||||
$modifiedColumns[':p' . $index++] = '`EXPORT_CATEGORY_ID`';
|
||||
}
|
||||
if ($this->isColumnModified(ExportTableMap::HANDLE_CLASS)) {
|
||||
$modifiedColumns[':p' . $index++] = '`HANDLE_CLASS`';
|
||||
}
|
||||
@@ -1008,12 +1008,12 @@ abstract class Export implements ActiveRecordInterface
|
||||
case '`REF`':
|
||||
$stmt->bindValue($identifier, $this->ref, PDO::PARAM_STR);
|
||||
break;
|
||||
case '`EXPORT_CATEGORY_ID`':
|
||||
$stmt->bindValue($identifier, $this->export_category_id, PDO::PARAM_INT);
|
||||
break;
|
||||
case '`POSITION`':
|
||||
$stmt->bindValue($identifier, $this->position, PDO::PARAM_INT);
|
||||
break;
|
||||
case '`EXPORT_CATEGORY_ID`':
|
||||
$stmt->bindValue($identifier, $this->export_category_id, PDO::PARAM_INT);
|
||||
break;
|
||||
case '`HANDLE_CLASS`':
|
||||
$stmt->bindValue($identifier, $this->handle_class, PDO::PARAM_STR);
|
||||
break;
|
||||
@@ -1092,10 +1092,10 @@ abstract class Export implements ActiveRecordInterface
|
||||
return $this->getRef();
|
||||
break;
|
||||
case 2:
|
||||
return $this->getExportCategoryId();
|
||||
return $this->getPosition();
|
||||
break;
|
||||
case 3:
|
||||
return $this->getPosition();
|
||||
return $this->getExportCategoryId();
|
||||
break;
|
||||
case 4:
|
||||
return $this->getHandleClass();
|
||||
@@ -1137,8 +1137,8 @@ abstract class Export implements ActiveRecordInterface
|
||||
$result = array(
|
||||
$keys[0] => $this->getId(),
|
||||
$keys[1] => $this->getRef(),
|
||||
$keys[2] => $this->getExportCategoryId(),
|
||||
$keys[3] => $this->getPosition(),
|
||||
$keys[2] => $this->getPosition(),
|
||||
$keys[3] => $this->getExportCategoryId(),
|
||||
$keys[4] => $this->getHandleClass(),
|
||||
$keys[5] => $this->getCreatedAt(),
|
||||
$keys[6] => $this->getUpdatedAt(),
|
||||
@@ -1196,10 +1196,10 @@ abstract class Export implements ActiveRecordInterface
|
||||
$this->setRef($value);
|
||||
break;
|
||||
case 2:
|
||||
$this->setExportCategoryId($value);
|
||||
$this->setPosition($value);
|
||||
break;
|
||||
case 3:
|
||||
$this->setPosition($value);
|
||||
$this->setExportCategoryId($value);
|
||||
break;
|
||||
case 4:
|
||||
$this->setHandleClass($value);
|
||||
@@ -1236,8 +1236,8 @@ abstract class Export implements ActiveRecordInterface
|
||||
|
||||
if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
|
||||
if (array_key_exists($keys[1], $arr)) $this->setRef($arr[$keys[1]]);
|
||||
if (array_key_exists($keys[2], $arr)) $this->setExportCategoryId($arr[$keys[2]]);
|
||||
if (array_key_exists($keys[3], $arr)) $this->setPosition($arr[$keys[3]]);
|
||||
if (array_key_exists($keys[2], $arr)) $this->setPosition($arr[$keys[2]]);
|
||||
if (array_key_exists($keys[3], $arr)) $this->setExportCategoryId($arr[$keys[3]]);
|
||||
if (array_key_exists($keys[4], $arr)) $this->setHandleClass($arr[$keys[4]]);
|
||||
if (array_key_exists($keys[5], $arr)) $this->setCreatedAt($arr[$keys[5]]);
|
||||
if (array_key_exists($keys[6], $arr)) $this->setUpdatedAt($arr[$keys[6]]);
|
||||
@@ -1254,8 +1254,8 @@ abstract class Export implements ActiveRecordInterface
|
||||
|
||||
if ($this->isColumnModified(ExportTableMap::ID)) $criteria->add(ExportTableMap::ID, $this->id);
|
||||
if ($this->isColumnModified(ExportTableMap::REF)) $criteria->add(ExportTableMap::REF, $this->ref);
|
||||
if ($this->isColumnModified(ExportTableMap::EXPORT_CATEGORY_ID)) $criteria->add(ExportTableMap::EXPORT_CATEGORY_ID, $this->export_category_id);
|
||||
if ($this->isColumnModified(ExportTableMap::POSITION)) $criteria->add(ExportTableMap::POSITION, $this->position);
|
||||
if ($this->isColumnModified(ExportTableMap::EXPORT_CATEGORY_ID)) $criteria->add(ExportTableMap::EXPORT_CATEGORY_ID, $this->export_category_id);
|
||||
if ($this->isColumnModified(ExportTableMap::HANDLE_CLASS)) $criteria->add(ExportTableMap::HANDLE_CLASS, $this->handle_class);
|
||||
if ($this->isColumnModified(ExportTableMap::CREATED_AT)) $criteria->add(ExportTableMap::CREATED_AT, $this->created_at);
|
||||
if ($this->isColumnModified(ExportTableMap::UPDATED_AT)) $criteria->add(ExportTableMap::UPDATED_AT, $this->updated_at);
|
||||
@@ -1323,8 +1323,8 @@ abstract class Export implements ActiveRecordInterface
|
||||
public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
|
||||
{
|
||||
$copyObj->setRef($this->getRef());
|
||||
$copyObj->setExportCategoryId($this->getExportCategoryId());
|
||||
$copyObj->setPosition($this->getPosition());
|
||||
$copyObj->setExportCategoryId($this->getExportCategoryId());
|
||||
$copyObj->setHandleClass($this->getHandleClass());
|
||||
$copyObj->setCreatedAt($this->getCreatedAt());
|
||||
$copyObj->setUpdatedAt($this->getUpdatedAt());
|
||||
@@ -1669,8 +1669,8 @@ abstract class Export implements ActiveRecordInterface
|
||||
{
|
||||
$this->id = null;
|
||||
$this->ref = null;
|
||||
$this->export_category_id = null;
|
||||
$this->position = null;
|
||||
$this->export_category_id = null;
|
||||
$this->handle_class = null;
|
||||
$this->created_at = null;
|
||||
$this->updated_at = null;
|
||||
@@ -1718,6 +1718,20 @@ abstract class Export implements ActiveRecordInterface
|
||||
return (string) $this->exportTo(ExportTableMap::DEFAULT_STRING_FORMAT);
|
||||
}
|
||||
|
||||
// timestampable behavior
|
||||
|
||||
/**
|
||||
* Mark the current object so that the update date doesn't get updated during next save
|
||||
*
|
||||
* @return ChildExport The current object (for fluent API support)
|
||||
*/
|
||||
public function keepUpdateDateUnchanged()
|
||||
{
|
||||
$this->modifiedColumns[ExportTableMap::UPDATED_AT] = true;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
// i18n behavior
|
||||
|
||||
/**
|
||||
@@ -1865,20 +1879,6 @@ abstract class Export implements ActiveRecordInterface
|
||||
return $this;
|
||||
}
|
||||
|
||||
// timestampable behavior
|
||||
|
||||
/**
|
||||
* Mark the current object so that the update date doesn't get updated during next save
|
||||
*
|
||||
* @return ChildExport The current object (for fluent API support)
|
||||
*/
|
||||
public function keepUpdateDateUnchanged()
|
||||
{
|
||||
$this->modifiedColumns[ExportTableMap::UPDATED_AT] = true;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Code to be run before persisting the object
|
||||
* @param ConnectionInterface $con
|
||||
|
||||
@@ -24,16 +24,16 @@ use Thelia\Model\Map\ExportTableMap;
|
||||
*
|
||||
* @method ChildExportQuery orderById($order = Criteria::ASC) Order by the id column
|
||||
* @method ChildExportQuery orderByRef($order = Criteria::ASC) Order by the ref column
|
||||
* @method ChildExportQuery orderByExportCategoryId($order = Criteria::ASC) Order by the export_category_id column
|
||||
* @method ChildExportQuery orderByPosition($order = Criteria::ASC) Order by the position column
|
||||
* @method ChildExportQuery orderByExportCategoryId($order = Criteria::ASC) Order by the export_category_id column
|
||||
* @method ChildExportQuery orderByHandleClass($order = Criteria::ASC) Order by the handle_class column
|
||||
* @method ChildExportQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
|
||||
* @method ChildExportQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
|
||||
*
|
||||
* @method ChildExportQuery groupById() Group by the id column
|
||||
* @method ChildExportQuery groupByRef() Group by the ref column
|
||||
* @method ChildExportQuery groupByExportCategoryId() Group by the export_category_id column
|
||||
* @method ChildExportQuery groupByPosition() Group by the position column
|
||||
* @method ChildExportQuery groupByExportCategoryId() Group by the export_category_id column
|
||||
* @method ChildExportQuery groupByHandleClass() Group by the handle_class column
|
||||
* @method ChildExportQuery groupByCreatedAt() Group by the created_at column
|
||||
* @method ChildExportQuery groupByUpdatedAt() Group by the updated_at column
|
||||
@@ -55,16 +55,16 @@ use Thelia\Model\Map\ExportTableMap;
|
||||
*
|
||||
* @method ChildExport findOneById(int $id) Return the first ChildExport filtered by the id column
|
||||
* @method ChildExport findOneByRef(string $ref) Return the first ChildExport filtered by the ref column
|
||||
* @method ChildExport findOneByExportCategoryId(int $export_category_id) Return the first ChildExport filtered by the export_category_id column
|
||||
* @method ChildExport findOneByPosition(int $position) Return the first ChildExport filtered by the position column
|
||||
* @method ChildExport findOneByExportCategoryId(int $export_category_id) Return the first ChildExport filtered by the export_category_id column
|
||||
* @method ChildExport findOneByHandleClass(string $handle_class) Return the first ChildExport filtered by the handle_class column
|
||||
* @method ChildExport findOneByCreatedAt(string $created_at) Return the first ChildExport filtered by the created_at column
|
||||
* @method ChildExport findOneByUpdatedAt(string $updated_at) Return the first ChildExport filtered by the updated_at column
|
||||
*
|
||||
* @method array findById(int $id) Return ChildExport objects filtered by the id column
|
||||
* @method array findByRef(string $ref) Return ChildExport objects filtered by the ref column
|
||||
* @method array findByExportCategoryId(int $export_category_id) Return ChildExport objects filtered by the export_category_id column
|
||||
* @method array findByPosition(int $position) Return ChildExport objects filtered by the position column
|
||||
* @method array findByExportCategoryId(int $export_category_id) Return ChildExport objects filtered by the export_category_id column
|
||||
* @method array findByHandleClass(string $handle_class) Return ChildExport objects filtered by the handle_class column
|
||||
* @method array findByCreatedAt(string $created_at) Return ChildExport objects filtered by the created_at column
|
||||
* @method array findByUpdatedAt(string $updated_at) Return ChildExport objects filtered by the updated_at column
|
||||
@@ -156,7 +156,7 @@ abstract class ExportQuery extends ModelCriteria
|
||||
*/
|
||||
protected function findPkSimple($key, $con)
|
||||
{
|
||||
$sql = 'SELECT `ID`, `REF`, `EXPORT_CATEGORY_ID`, `POSITION`, `HANDLE_CLASS`, `CREATED_AT`, `UPDATED_AT` FROM `export` WHERE `ID` = :p0';
|
||||
$sql = 'SELECT `ID`, `REF`, `POSITION`, `EXPORT_CATEGORY_ID`, `HANDLE_CLASS`, `CREATED_AT`, `UPDATED_AT` FROM `export` WHERE `ID` = :p0';
|
||||
try {
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
|
||||
@@ -315,6 +315,47 @@ abstract class ExportQuery extends ModelCriteria
|
||||
return $this->addUsingAlias(ExportTableMap::REF, $ref, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the position column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByPosition(1234); // WHERE position = 1234
|
||||
* $query->filterByPosition(array(12, 34)); // WHERE position IN (12, 34)
|
||||
* $query->filterByPosition(array('min' => 12)); // WHERE position > 12
|
||||
* </code>
|
||||
*
|
||||
* @param mixed $position 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 ChildExportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByPosition($position = null, $comparison = null)
|
||||
{
|
||||
if (is_array($position)) {
|
||||
$useMinMax = false;
|
||||
if (isset($position['min'])) {
|
||||
$this->addUsingAlias(ExportTableMap::POSITION, $position['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($position['max'])) {
|
||||
$this->addUsingAlias(ExportTableMap::POSITION, $position['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ExportTableMap::POSITION, $position, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the export_category_id column
|
||||
*
|
||||
@@ -358,47 +399,6 @@ abstract class ExportQuery extends ModelCriteria
|
||||
return $this->addUsingAlias(ExportTableMap::EXPORT_CATEGORY_ID, $exportCategoryId, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the position column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByPosition(1234); // WHERE position = 1234
|
||||
* $query->filterByPosition(array(12, 34)); // WHERE position IN (12, 34)
|
||||
* $query->filterByPosition(array('min' => 12)); // WHERE position > 12
|
||||
* </code>
|
||||
*
|
||||
* @param mixed $position 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 ChildExportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByPosition($position = null, $comparison = null)
|
||||
{
|
||||
if (is_array($position)) {
|
||||
$useMinMax = false;
|
||||
if (isset($position['min'])) {
|
||||
$this->addUsingAlias(ExportTableMap::POSITION, $position['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($position['max'])) {
|
||||
$this->addUsingAlias(ExportTableMap::POSITION, $position['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ExportTableMap::POSITION, $position, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the handle_class column
|
||||
*
|
||||
@@ -753,63 +753,6 @@ abstract class ExportQuery extends ModelCriteria
|
||||
}
|
||||
}
|
||||
|
||||
// i18n behavior
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the i18n relation
|
||||
*
|
||||
* @param string $locale Locale to use for the join condition, e.g. 'fr_FR'
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join.
|
||||
*
|
||||
* @return ChildExportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$relationName = $relationAlias ? $relationAlias : 'ExportI18n';
|
||||
|
||||
return $this
|
||||
->joinExportI18n($relationAlias, $joinType)
|
||||
->addJoinCondition($relationName, $relationName . '.Locale = ?', $locale);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query and hydrates the related I18n object.
|
||||
* Shortcut for $c->joinI18n($locale)->with()
|
||||
*
|
||||
* @param string $locale Locale to use for the join condition, e.g. 'fr_FR'
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join.
|
||||
*
|
||||
* @return ChildExportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$this
|
||||
->joinI18n($locale, null, $joinType)
|
||||
->with('ExportI18n');
|
||||
$this->with['ExportI18n']->setIsWithOneToMany(false);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the I18n relation query object
|
||||
*
|
||||
* @see useQuery()
|
||||
*
|
||||
* @param string $locale Locale to use for the join condition, e.g. 'fr_FR'
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join.
|
||||
*
|
||||
* @return ChildExportI18nQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinI18n($locale, $relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'ExportI18n', '\Thelia\Model\ExportI18nQuery');
|
||||
}
|
||||
|
||||
// timestampable behavior
|
||||
|
||||
/**
|
||||
@@ -876,4 +819,61 @@ abstract class ExportQuery extends ModelCriteria
|
||||
return $this->addAscendingOrderByColumn(ExportTableMap::CREATED_AT);
|
||||
}
|
||||
|
||||
// i18n behavior
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the i18n relation
|
||||
*
|
||||
* @param string $locale Locale to use for the join condition, e.g. 'fr_FR'
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join.
|
||||
*
|
||||
* @return ChildExportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$relationName = $relationAlias ? $relationAlias : 'ExportI18n';
|
||||
|
||||
return $this
|
||||
->joinExportI18n($relationAlias, $joinType)
|
||||
->addJoinCondition($relationName, $relationName . '.Locale = ?', $locale);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query and hydrates the related I18n object.
|
||||
* Shortcut for $c->joinI18n($locale)->with()
|
||||
*
|
||||
* @param string $locale Locale to use for the join condition, e.g. 'fr_FR'
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join.
|
||||
*
|
||||
* @return ChildExportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$this
|
||||
->joinI18n($locale, null, $joinType)
|
||||
->with('ExportI18n');
|
||||
$this->with['ExportI18n']->setIsWithOneToMany(false);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the I18n relation query object
|
||||
*
|
||||
* @see useQuery()
|
||||
*
|
||||
* @param string $locale Locale to use for the join condition, e.g. 'fr_FR'
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join.
|
||||
*
|
||||
* @return ChildExportI18nQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinI18n($locale, $relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'ExportI18n', '\Thelia\Model\ExportI18nQuery');
|
||||
}
|
||||
|
||||
} // ExportQuery
|
||||
|
||||
@@ -71,18 +71,18 @@ abstract class Import implements ActiveRecordInterface
|
||||
*/
|
||||
protected $ref;
|
||||
|
||||
/**
|
||||
* The value for the import_category_id field.
|
||||
* @var int
|
||||
*/
|
||||
protected $import_category_id;
|
||||
|
||||
/**
|
||||
* The value for the position field.
|
||||
* @var int
|
||||
*/
|
||||
protected $position;
|
||||
|
||||
/**
|
||||
* The value for the import_category_id field.
|
||||
* @var int
|
||||
*/
|
||||
protected $import_category_id;
|
||||
|
||||
/**
|
||||
* The value for the handle_class field.
|
||||
* @var string
|
||||
@@ -420,17 +420,6 @@ abstract class Import implements ActiveRecordInterface
|
||||
return $this->ref;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [import_category_id] column value.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getImportCategoryId()
|
||||
{
|
||||
|
||||
return $this->import_category_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [position] column value.
|
||||
*
|
||||
@@ -442,6 +431,17 @@ abstract class Import implements ActiveRecordInterface
|
||||
return $this->position;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [import_category_id] column value.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getImportCategoryId()
|
||||
{
|
||||
|
||||
return $this->import_category_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [handle_class] column value.
|
||||
*
|
||||
@@ -535,6 +535,27 @@ abstract class Import implements ActiveRecordInterface
|
||||
return $this;
|
||||
} // setRef()
|
||||
|
||||
/**
|
||||
* Set the value of [position] column.
|
||||
*
|
||||
* @param int $v new value
|
||||
* @return \Thelia\Model\Import The current object (for fluent API support)
|
||||
*/
|
||||
public function setPosition($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (int) $v;
|
||||
}
|
||||
|
||||
if ($this->position !== $v) {
|
||||
$this->position = $v;
|
||||
$this->modifiedColumns[ImportTableMap::POSITION] = true;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setPosition()
|
||||
|
||||
/**
|
||||
* Set the value of [import_category_id] column.
|
||||
*
|
||||
@@ -560,27 +581,6 @@ abstract class Import implements ActiveRecordInterface
|
||||
return $this;
|
||||
} // setImportCategoryId()
|
||||
|
||||
/**
|
||||
* Set the value of [position] column.
|
||||
*
|
||||
* @param int $v new value
|
||||
* @return \Thelia\Model\Import The current object (for fluent API support)
|
||||
*/
|
||||
public function setPosition($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (int) $v;
|
||||
}
|
||||
|
||||
if ($this->position !== $v) {
|
||||
$this->position = $v;
|
||||
$this->modifiedColumns[ImportTableMap::POSITION] = true;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setPosition()
|
||||
|
||||
/**
|
||||
* Set the value of [handle_class] column.
|
||||
*
|
||||
@@ -687,12 +687,12 @@ abstract class Import implements ActiveRecordInterface
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : ImportTableMap::translateFieldName('Ref', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->ref = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : ImportTableMap::translateFieldName('ImportCategoryId', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->import_category_id = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : ImportTableMap::translateFieldName('Position', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : ImportTableMap::translateFieldName('Position', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->position = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : ImportTableMap::translateFieldName('ImportCategoryId', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->import_category_id = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : ImportTableMap::translateFieldName('HandleClass', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->handle_class = (null !== $col) ? (string) $col : null;
|
||||
|
||||
@@ -976,12 +976,12 @@ abstract class Import implements ActiveRecordInterface
|
||||
if ($this->isColumnModified(ImportTableMap::REF)) {
|
||||
$modifiedColumns[':p' . $index++] = '`REF`';
|
||||
}
|
||||
if ($this->isColumnModified(ImportTableMap::IMPORT_CATEGORY_ID)) {
|
||||
$modifiedColumns[':p' . $index++] = '`IMPORT_CATEGORY_ID`';
|
||||
}
|
||||
if ($this->isColumnModified(ImportTableMap::POSITION)) {
|
||||
$modifiedColumns[':p' . $index++] = '`POSITION`';
|
||||
}
|
||||
if ($this->isColumnModified(ImportTableMap::IMPORT_CATEGORY_ID)) {
|
||||
$modifiedColumns[':p' . $index++] = '`IMPORT_CATEGORY_ID`';
|
||||
}
|
||||
if ($this->isColumnModified(ImportTableMap::HANDLE_CLASS)) {
|
||||
$modifiedColumns[':p' . $index++] = '`HANDLE_CLASS`';
|
||||
}
|
||||
@@ -1008,12 +1008,12 @@ abstract class Import implements ActiveRecordInterface
|
||||
case '`REF`':
|
||||
$stmt->bindValue($identifier, $this->ref, PDO::PARAM_STR);
|
||||
break;
|
||||
case '`IMPORT_CATEGORY_ID`':
|
||||
$stmt->bindValue($identifier, $this->import_category_id, PDO::PARAM_INT);
|
||||
break;
|
||||
case '`POSITION`':
|
||||
$stmt->bindValue($identifier, $this->position, PDO::PARAM_INT);
|
||||
break;
|
||||
case '`IMPORT_CATEGORY_ID`':
|
||||
$stmt->bindValue($identifier, $this->import_category_id, PDO::PARAM_INT);
|
||||
break;
|
||||
case '`HANDLE_CLASS`':
|
||||
$stmt->bindValue($identifier, $this->handle_class, PDO::PARAM_STR);
|
||||
break;
|
||||
@@ -1092,10 +1092,10 @@ abstract class Import implements ActiveRecordInterface
|
||||
return $this->getRef();
|
||||
break;
|
||||
case 2:
|
||||
return $this->getImportCategoryId();
|
||||
return $this->getPosition();
|
||||
break;
|
||||
case 3:
|
||||
return $this->getPosition();
|
||||
return $this->getImportCategoryId();
|
||||
break;
|
||||
case 4:
|
||||
return $this->getHandleClass();
|
||||
@@ -1137,8 +1137,8 @@ abstract class Import implements ActiveRecordInterface
|
||||
$result = array(
|
||||
$keys[0] => $this->getId(),
|
||||
$keys[1] => $this->getRef(),
|
||||
$keys[2] => $this->getImportCategoryId(),
|
||||
$keys[3] => $this->getPosition(),
|
||||
$keys[2] => $this->getPosition(),
|
||||
$keys[3] => $this->getImportCategoryId(),
|
||||
$keys[4] => $this->getHandleClass(),
|
||||
$keys[5] => $this->getCreatedAt(),
|
||||
$keys[6] => $this->getUpdatedAt(),
|
||||
@@ -1196,10 +1196,10 @@ abstract class Import implements ActiveRecordInterface
|
||||
$this->setRef($value);
|
||||
break;
|
||||
case 2:
|
||||
$this->setImportCategoryId($value);
|
||||
$this->setPosition($value);
|
||||
break;
|
||||
case 3:
|
||||
$this->setPosition($value);
|
||||
$this->setImportCategoryId($value);
|
||||
break;
|
||||
case 4:
|
||||
$this->setHandleClass($value);
|
||||
@@ -1236,8 +1236,8 @@ abstract class Import implements ActiveRecordInterface
|
||||
|
||||
if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
|
||||
if (array_key_exists($keys[1], $arr)) $this->setRef($arr[$keys[1]]);
|
||||
if (array_key_exists($keys[2], $arr)) $this->setImportCategoryId($arr[$keys[2]]);
|
||||
if (array_key_exists($keys[3], $arr)) $this->setPosition($arr[$keys[3]]);
|
||||
if (array_key_exists($keys[2], $arr)) $this->setPosition($arr[$keys[2]]);
|
||||
if (array_key_exists($keys[3], $arr)) $this->setImportCategoryId($arr[$keys[3]]);
|
||||
if (array_key_exists($keys[4], $arr)) $this->setHandleClass($arr[$keys[4]]);
|
||||
if (array_key_exists($keys[5], $arr)) $this->setCreatedAt($arr[$keys[5]]);
|
||||
if (array_key_exists($keys[6], $arr)) $this->setUpdatedAt($arr[$keys[6]]);
|
||||
@@ -1254,8 +1254,8 @@ abstract class Import implements ActiveRecordInterface
|
||||
|
||||
if ($this->isColumnModified(ImportTableMap::ID)) $criteria->add(ImportTableMap::ID, $this->id);
|
||||
if ($this->isColumnModified(ImportTableMap::REF)) $criteria->add(ImportTableMap::REF, $this->ref);
|
||||
if ($this->isColumnModified(ImportTableMap::IMPORT_CATEGORY_ID)) $criteria->add(ImportTableMap::IMPORT_CATEGORY_ID, $this->import_category_id);
|
||||
if ($this->isColumnModified(ImportTableMap::POSITION)) $criteria->add(ImportTableMap::POSITION, $this->position);
|
||||
if ($this->isColumnModified(ImportTableMap::IMPORT_CATEGORY_ID)) $criteria->add(ImportTableMap::IMPORT_CATEGORY_ID, $this->import_category_id);
|
||||
if ($this->isColumnModified(ImportTableMap::HANDLE_CLASS)) $criteria->add(ImportTableMap::HANDLE_CLASS, $this->handle_class);
|
||||
if ($this->isColumnModified(ImportTableMap::CREATED_AT)) $criteria->add(ImportTableMap::CREATED_AT, $this->created_at);
|
||||
if ($this->isColumnModified(ImportTableMap::UPDATED_AT)) $criteria->add(ImportTableMap::UPDATED_AT, $this->updated_at);
|
||||
@@ -1323,8 +1323,8 @@ abstract class Import implements ActiveRecordInterface
|
||||
public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
|
||||
{
|
||||
$copyObj->setRef($this->getRef());
|
||||
$copyObj->setImportCategoryId($this->getImportCategoryId());
|
||||
$copyObj->setPosition($this->getPosition());
|
||||
$copyObj->setImportCategoryId($this->getImportCategoryId());
|
||||
$copyObj->setHandleClass($this->getHandleClass());
|
||||
$copyObj->setCreatedAt($this->getCreatedAt());
|
||||
$copyObj->setUpdatedAt($this->getUpdatedAt());
|
||||
@@ -1669,8 +1669,8 @@ abstract class Import implements ActiveRecordInterface
|
||||
{
|
||||
$this->id = null;
|
||||
$this->ref = null;
|
||||
$this->import_category_id = null;
|
||||
$this->position = null;
|
||||
$this->import_category_id = null;
|
||||
$this->handle_class = null;
|
||||
$this->created_at = null;
|
||||
$this->updated_at = null;
|
||||
@@ -1718,6 +1718,20 @@ abstract class Import implements ActiveRecordInterface
|
||||
return (string) $this->exportTo(ImportTableMap::DEFAULT_STRING_FORMAT);
|
||||
}
|
||||
|
||||
// timestampable behavior
|
||||
|
||||
/**
|
||||
* Mark the current object so that the update date doesn't get updated during next save
|
||||
*
|
||||
* @return ChildImport The current object (for fluent API support)
|
||||
*/
|
||||
public function keepUpdateDateUnchanged()
|
||||
{
|
||||
$this->modifiedColumns[ImportTableMap::UPDATED_AT] = true;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
// i18n behavior
|
||||
|
||||
/**
|
||||
@@ -1865,20 +1879,6 @@ abstract class Import implements ActiveRecordInterface
|
||||
return $this;
|
||||
}
|
||||
|
||||
// timestampable behavior
|
||||
|
||||
/**
|
||||
* Mark the current object so that the update date doesn't get updated during next save
|
||||
*
|
||||
* @return ChildImport The current object (for fluent API support)
|
||||
*/
|
||||
public function keepUpdateDateUnchanged()
|
||||
{
|
||||
$this->modifiedColumns[ImportTableMap::UPDATED_AT] = true;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Code to be run before persisting the object
|
||||
* @param ConnectionInterface $con
|
||||
|
||||
@@ -1789,6 +1789,20 @@ abstract class ImportCategory implements ActiveRecordInterface
|
||||
return (string) $this->exportTo(ImportCategoryTableMap::DEFAULT_STRING_FORMAT);
|
||||
}
|
||||
|
||||
// timestampable behavior
|
||||
|
||||
/**
|
||||
* Mark the current object so that the update date doesn't get updated during next save
|
||||
*
|
||||
* @return ChildImportCategory The current object (for fluent API support)
|
||||
*/
|
||||
public function keepUpdateDateUnchanged()
|
||||
{
|
||||
$this->modifiedColumns[ImportCategoryTableMap::UPDATED_AT] = true;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
// i18n behavior
|
||||
|
||||
/**
|
||||
@@ -1912,20 +1926,6 @@ abstract class ImportCategory implements ActiveRecordInterface
|
||||
return $this;
|
||||
}
|
||||
|
||||
// timestampable behavior
|
||||
|
||||
/**
|
||||
* Mark the current object so that the update date doesn't get updated during next save
|
||||
*
|
||||
* @return ChildImportCategory The current object (for fluent API support)
|
||||
*/
|
||||
public function keepUpdateDateUnchanged()
|
||||
{
|
||||
$this->modifiedColumns[ImportCategoryTableMap::UPDATED_AT] = true;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Code to be run before persisting the object
|
||||
* @param ConnectionInterface $con
|
||||
|
||||
@@ -671,63 +671,6 @@ abstract class ImportCategoryQuery extends ModelCriteria
|
||||
}
|
||||
}
|
||||
|
||||
// i18n behavior
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the i18n relation
|
||||
*
|
||||
* @param string $locale Locale to use for the join condition, e.g. 'fr_FR'
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join.
|
||||
*
|
||||
* @return ChildImportCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$relationName = $relationAlias ? $relationAlias : 'ImportCategoryI18n';
|
||||
|
||||
return $this
|
||||
->joinImportCategoryI18n($relationAlias, $joinType)
|
||||
->addJoinCondition($relationName, $relationName . '.Locale = ?', $locale);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query and hydrates the related I18n object.
|
||||
* Shortcut for $c->joinI18n($locale)->with()
|
||||
*
|
||||
* @param string $locale Locale to use for the join condition, e.g. 'fr_FR'
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join.
|
||||
*
|
||||
* @return ChildImportCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$this
|
||||
->joinI18n($locale, null, $joinType)
|
||||
->with('ImportCategoryI18n');
|
||||
$this->with['ImportCategoryI18n']->setIsWithOneToMany(false);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the I18n relation query object
|
||||
*
|
||||
* @see useQuery()
|
||||
*
|
||||
* @param string $locale Locale to use for the join condition, e.g. 'fr_FR'
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join.
|
||||
*
|
||||
* @return ChildImportCategoryI18nQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinI18n($locale, $relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'ImportCategoryI18n', '\Thelia\Model\ImportCategoryI18nQuery');
|
||||
}
|
||||
|
||||
// timestampable behavior
|
||||
|
||||
/**
|
||||
@@ -794,4 +737,61 @@ abstract class ImportCategoryQuery extends ModelCriteria
|
||||
return $this->addAscendingOrderByColumn(ImportCategoryTableMap::CREATED_AT);
|
||||
}
|
||||
|
||||
// i18n behavior
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the i18n relation
|
||||
*
|
||||
* @param string $locale Locale to use for the join condition, e.g. 'fr_FR'
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join.
|
||||
*
|
||||
* @return ChildImportCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$relationName = $relationAlias ? $relationAlias : 'ImportCategoryI18n';
|
||||
|
||||
return $this
|
||||
->joinImportCategoryI18n($relationAlias, $joinType)
|
||||
->addJoinCondition($relationName, $relationName . '.Locale = ?', $locale);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query and hydrates the related I18n object.
|
||||
* Shortcut for $c->joinI18n($locale)->with()
|
||||
*
|
||||
* @param string $locale Locale to use for the join condition, e.g. 'fr_FR'
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join.
|
||||
*
|
||||
* @return ChildImportCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$this
|
||||
->joinI18n($locale, null, $joinType)
|
||||
->with('ImportCategoryI18n');
|
||||
$this->with['ImportCategoryI18n']->setIsWithOneToMany(false);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the I18n relation query object
|
||||
*
|
||||
* @see useQuery()
|
||||
*
|
||||
* @param string $locale Locale to use for the join condition, e.g. 'fr_FR'
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join.
|
||||
*
|
||||
* @return ChildImportCategoryI18nQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinI18n($locale, $relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'ImportCategoryI18n', '\Thelia\Model\ImportCategoryI18nQuery');
|
||||
}
|
||||
|
||||
} // ImportCategoryQuery
|
||||
|
||||
@@ -24,16 +24,16 @@ use Thelia\Model\Map\ImportTableMap;
|
||||
*
|
||||
* @method ChildImportQuery orderById($order = Criteria::ASC) Order by the id column
|
||||
* @method ChildImportQuery orderByRef($order = Criteria::ASC) Order by the ref column
|
||||
* @method ChildImportQuery orderByImportCategoryId($order = Criteria::ASC) Order by the import_category_id column
|
||||
* @method ChildImportQuery orderByPosition($order = Criteria::ASC) Order by the position column
|
||||
* @method ChildImportQuery orderByImportCategoryId($order = Criteria::ASC) Order by the import_category_id column
|
||||
* @method ChildImportQuery orderByHandleClass($order = Criteria::ASC) Order by the handle_class column
|
||||
* @method ChildImportQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
|
||||
* @method ChildImportQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
|
||||
*
|
||||
* @method ChildImportQuery groupById() Group by the id column
|
||||
* @method ChildImportQuery groupByRef() Group by the ref column
|
||||
* @method ChildImportQuery groupByImportCategoryId() Group by the import_category_id column
|
||||
* @method ChildImportQuery groupByPosition() Group by the position column
|
||||
* @method ChildImportQuery groupByImportCategoryId() Group by the import_category_id column
|
||||
* @method ChildImportQuery groupByHandleClass() Group by the handle_class column
|
||||
* @method ChildImportQuery groupByCreatedAt() Group by the created_at column
|
||||
* @method ChildImportQuery groupByUpdatedAt() Group by the updated_at column
|
||||
@@ -55,16 +55,16 @@ use Thelia\Model\Map\ImportTableMap;
|
||||
*
|
||||
* @method ChildImport findOneById(int $id) Return the first ChildImport filtered by the id column
|
||||
* @method ChildImport findOneByRef(string $ref) Return the first ChildImport filtered by the ref column
|
||||
* @method ChildImport findOneByImportCategoryId(int $import_category_id) Return the first ChildImport filtered by the import_category_id column
|
||||
* @method ChildImport findOneByPosition(int $position) Return the first ChildImport filtered by the position column
|
||||
* @method ChildImport findOneByImportCategoryId(int $import_category_id) Return the first ChildImport filtered by the import_category_id column
|
||||
* @method ChildImport findOneByHandleClass(string $handle_class) Return the first ChildImport filtered by the handle_class column
|
||||
* @method ChildImport findOneByCreatedAt(string $created_at) Return the first ChildImport filtered by the created_at column
|
||||
* @method ChildImport findOneByUpdatedAt(string $updated_at) Return the first ChildImport filtered by the updated_at column
|
||||
*
|
||||
* @method array findById(int $id) Return ChildImport objects filtered by the id column
|
||||
* @method array findByRef(string $ref) Return ChildImport objects filtered by the ref column
|
||||
* @method array findByImportCategoryId(int $import_category_id) Return ChildImport objects filtered by the import_category_id column
|
||||
* @method array findByPosition(int $position) Return ChildImport objects filtered by the position column
|
||||
* @method array findByImportCategoryId(int $import_category_id) Return ChildImport objects filtered by the import_category_id column
|
||||
* @method array findByHandleClass(string $handle_class) Return ChildImport objects filtered by the handle_class column
|
||||
* @method array findByCreatedAt(string $created_at) Return ChildImport objects filtered by the created_at column
|
||||
* @method array findByUpdatedAt(string $updated_at) Return ChildImport objects filtered by the updated_at column
|
||||
@@ -156,7 +156,7 @@ abstract class ImportQuery extends ModelCriteria
|
||||
*/
|
||||
protected function findPkSimple($key, $con)
|
||||
{
|
||||
$sql = 'SELECT `ID`, `REF`, `IMPORT_CATEGORY_ID`, `POSITION`, `HANDLE_CLASS`, `CREATED_AT`, `UPDATED_AT` FROM `import` WHERE `ID` = :p0';
|
||||
$sql = 'SELECT `ID`, `REF`, `POSITION`, `IMPORT_CATEGORY_ID`, `HANDLE_CLASS`, `CREATED_AT`, `UPDATED_AT` FROM `import` WHERE `ID` = :p0';
|
||||
try {
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
|
||||
@@ -315,6 +315,47 @@ abstract class ImportQuery extends ModelCriteria
|
||||
return $this->addUsingAlias(ImportTableMap::REF, $ref, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the position column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByPosition(1234); // WHERE position = 1234
|
||||
* $query->filterByPosition(array(12, 34)); // WHERE position IN (12, 34)
|
||||
* $query->filterByPosition(array('min' => 12)); // WHERE position > 12
|
||||
* </code>
|
||||
*
|
||||
* @param mixed $position 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 ChildImportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByPosition($position = null, $comparison = null)
|
||||
{
|
||||
if (is_array($position)) {
|
||||
$useMinMax = false;
|
||||
if (isset($position['min'])) {
|
||||
$this->addUsingAlias(ImportTableMap::POSITION, $position['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($position['max'])) {
|
||||
$this->addUsingAlias(ImportTableMap::POSITION, $position['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ImportTableMap::POSITION, $position, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the import_category_id column
|
||||
*
|
||||
@@ -358,47 +399,6 @@ abstract class ImportQuery extends ModelCriteria
|
||||
return $this->addUsingAlias(ImportTableMap::IMPORT_CATEGORY_ID, $importCategoryId, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the position column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByPosition(1234); // WHERE position = 1234
|
||||
* $query->filterByPosition(array(12, 34)); // WHERE position IN (12, 34)
|
||||
* $query->filterByPosition(array('min' => 12)); // WHERE position > 12
|
||||
* </code>
|
||||
*
|
||||
* @param mixed $position 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 ChildImportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByPosition($position = null, $comparison = null)
|
||||
{
|
||||
if (is_array($position)) {
|
||||
$useMinMax = false;
|
||||
if (isset($position['min'])) {
|
||||
$this->addUsingAlias(ImportTableMap::POSITION, $position['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($position['max'])) {
|
||||
$this->addUsingAlias(ImportTableMap::POSITION, $position['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ImportTableMap::POSITION, $position, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the handle_class column
|
||||
*
|
||||
@@ -753,63 +753,6 @@ abstract class ImportQuery extends ModelCriteria
|
||||
}
|
||||
}
|
||||
|
||||
// i18n behavior
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the i18n relation
|
||||
*
|
||||
* @param string $locale Locale to use for the join condition, e.g. 'fr_FR'
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join.
|
||||
*
|
||||
* @return ChildImportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$relationName = $relationAlias ? $relationAlias : 'ImportI18n';
|
||||
|
||||
return $this
|
||||
->joinImportI18n($relationAlias, $joinType)
|
||||
->addJoinCondition($relationName, $relationName . '.Locale = ?', $locale);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query and hydrates the related I18n object.
|
||||
* Shortcut for $c->joinI18n($locale)->with()
|
||||
*
|
||||
* @param string $locale Locale to use for the join condition, e.g. 'fr_FR'
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join.
|
||||
*
|
||||
* @return ChildImportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$this
|
||||
->joinI18n($locale, null, $joinType)
|
||||
->with('ImportI18n');
|
||||
$this->with['ImportI18n']->setIsWithOneToMany(false);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the I18n relation query object
|
||||
*
|
||||
* @see useQuery()
|
||||
*
|
||||
* @param string $locale Locale to use for the join condition, e.g. 'fr_FR'
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join.
|
||||
*
|
||||
* @return ChildImportI18nQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinI18n($locale, $relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'ImportI18n', '\Thelia\Model\ImportI18nQuery');
|
||||
}
|
||||
|
||||
// timestampable behavior
|
||||
|
||||
/**
|
||||
@@ -876,4 +819,61 @@ abstract class ImportQuery extends ModelCriteria
|
||||
return $this->addAscendingOrderByColumn(ImportTableMap::CREATED_AT);
|
||||
}
|
||||
|
||||
// i18n behavior
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the i18n relation
|
||||
*
|
||||
* @param string $locale Locale to use for the join condition, e.g. 'fr_FR'
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join.
|
||||
*
|
||||
* @return ChildImportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$relationName = $relationAlias ? $relationAlias : 'ImportI18n';
|
||||
|
||||
return $this
|
||||
->joinImportI18n($relationAlias, $joinType)
|
||||
->addJoinCondition($relationName, $relationName . '.Locale = ?', $locale);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query and hydrates the related I18n object.
|
||||
* Shortcut for $c->joinI18n($locale)->with()
|
||||
*
|
||||
* @param string $locale Locale to use for the join condition, e.g. 'fr_FR'
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join.
|
||||
*
|
||||
* @return ChildImportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$this
|
||||
->joinI18n($locale, null, $joinType)
|
||||
->with('ImportI18n');
|
||||
$this->with['ImportI18n']->setIsWithOneToMany(false);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the I18n relation query object
|
||||
*
|
||||
* @see useQuery()
|
||||
*
|
||||
* @param string $locale Locale to use for the join condition, e.g. 'fr_FR'
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join.
|
||||
*
|
||||
* @return ChildImportI18nQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinI18n($locale, $relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'ImportI18n', '\Thelia\Model\ImportI18nQuery');
|
||||
}
|
||||
|
||||
} // ImportQuery
|
||||
|
||||
@@ -167,7 +167,7 @@ class ExportCategoryTableMap extends TableMap
|
||||
*/
|
||||
public function buildRelations()
|
||||
{
|
||||
$this->addRelation('Export', '\\Thelia\\Model\\Export', RelationMap::ONE_TO_MANY, array('id' => 'export_category_id', ), 'CASCADE', 'RESTRICT', 'Exports');
|
||||
$this->addRelation('Export', '\\Thelia\\Model\\Export', RelationMap::ONE_TO_MANY, array('id' => 'export_category_id', ), null, null, 'Exports');
|
||||
$this->addRelation('ExportCategoryI18n', '\\Thelia\\Model\\ExportCategoryI18n', RelationMap::ONE_TO_MANY, array('id' => 'id', ), 'CASCADE', null, 'ExportCategoryI18ns');
|
||||
} // buildRelations()
|
||||
|
||||
@@ -191,7 +191,6 @@ class ExportCategoryTableMap 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.
|
||||
ExportTableMap::clearInstancePool();
|
||||
ExportCategoryI18nTableMap::clearInstancePool();
|
||||
}
|
||||
|
||||
|
||||
@@ -144,7 +144,7 @@ class ExportI18nTableMap extends TableMap
|
||||
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'export', 'ID', true, null, null);
|
||||
$this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_US');
|
||||
$this->addColumn('TITLE', 'Title', 'VARCHAR', true, 255, null);
|
||||
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
|
||||
$this->addColumn('DESCRIPTION', 'Description', 'LONGVARCHAR', false, null, null);
|
||||
} // initialize()
|
||||
|
||||
/**
|
||||
|
||||
@@ -80,16 +80,16 @@ class ExportTableMap extends TableMap
|
||||
*/
|
||||
const REF = 'export.REF';
|
||||
|
||||
/**
|
||||
* the column name for the EXPORT_CATEGORY_ID field
|
||||
*/
|
||||
const EXPORT_CATEGORY_ID = 'export.EXPORT_CATEGORY_ID';
|
||||
|
||||
/**
|
||||
* the column name for the POSITION field
|
||||
*/
|
||||
const POSITION = 'export.POSITION';
|
||||
|
||||
/**
|
||||
* the column name for the EXPORT_CATEGORY_ID field
|
||||
*/
|
||||
const EXPORT_CATEGORY_ID = 'export.EXPORT_CATEGORY_ID';
|
||||
|
||||
/**
|
||||
* the column name for the HANDLE_CLASS field
|
||||
*/
|
||||
@@ -126,11 +126,11 @@ class ExportTableMap extends TableMap
|
||||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||
*/
|
||||
protected static $fieldNames = array (
|
||||
self::TYPE_PHPNAME => array('Id', 'Ref', 'ExportCategoryId', 'Position', 'HandleClass', 'CreatedAt', 'UpdatedAt', ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id', 'ref', 'exportCategoryId', 'position', 'handleClass', 'createdAt', 'updatedAt', ),
|
||||
self::TYPE_COLNAME => array(ExportTableMap::ID, ExportTableMap::REF, ExportTableMap::EXPORT_CATEGORY_ID, ExportTableMap::POSITION, ExportTableMap::HANDLE_CLASS, ExportTableMap::CREATED_AT, ExportTableMap::UPDATED_AT, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID', 'REF', 'EXPORT_CATEGORY_ID', 'POSITION', 'HANDLE_CLASS', 'CREATED_AT', 'UPDATED_AT', ),
|
||||
self::TYPE_FIELDNAME => array('id', 'ref', 'export_category_id', 'position', 'handle_class', 'created_at', 'updated_at', ),
|
||||
self::TYPE_PHPNAME => array('Id', 'Ref', 'Position', 'ExportCategoryId', 'HandleClass', 'CreatedAt', 'UpdatedAt', ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id', 'ref', 'position', 'exportCategoryId', 'handleClass', 'createdAt', 'updatedAt', ),
|
||||
self::TYPE_COLNAME => array(ExportTableMap::ID, ExportTableMap::REF, ExportTableMap::POSITION, ExportTableMap::EXPORT_CATEGORY_ID, ExportTableMap::HANDLE_CLASS, ExportTableMap::CREATED_AT, ExportTableMap::UPDATED_AT, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID', 'REF', 'POSITION', 'EXPORT_CATEGORY_ID', 'HANDLE_CLASS', 'CREATED_AT', 'UPDATED_AT', ),
|
||||
self::TYPE_FIELDNAME => array('id', 'ref', 'position', 'export_category_id', 'handle_class', 'created_at', 'updated_at', ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, )
|
||||
);
|
||||
|
||||
@@ -141,11 +141,11 @@ class ExportTableMap extends TableMap
|
||||
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
|
||||
*/
|
||||
protected static $fieldKeys = array (
|
||||
self::TYPE_PHPNAME => array('Id' => 0, 'Ref' => 1, 'ExportCategoryId' => 2, 'Position' => 3, 'HandleClass' => 4, 'CreatedAt' => 5, 'UpdatedAt' => 6, ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'ref' => 1, 'exportCategoryId' => 2, 'position' => 3, 'handleClass' => 4, 'createdAt' => 5, 'updatedAt' => 6, ),
|
||||
self::TYPE_COLNAME => array(ExportTableMap::ID => 0, ExportTableMap::REF => 1, ExportTableMap::EXPORT_CATEGORY_ID => 2, ExportTableMap::POSITION => 3, ExportTableMap::HANDLE_CLASS => 4, ExportTableMap::CREATED_AT => 5, ExportTableMap::UPDATED_AT => 6, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID' => 0, 'REF' => 1, 'EXPORT_CATEGORY_ID' => 2, 'POSITION' => 3, 'HANDLE_CLASS' => 4, 'CREATED_AT' => 5, 'UPDATED_AT' => 6, ),
|
||||
self::TYPE_FIELDNAME => array('id' => 0, 'ref' => 1, 'export_category_id' => 2, 'position' => 3, 'handle_class' => 4, 'created_at' => 5, 'updated_at' => 6, ),
|
||||
self::TYPE_PHPNAME => array('Id' => 0, 'Ref' => 1, 'Position' => 2, 'ExportCategoryId' => 3, 'HandleClass' => 4, 'CreatedAt' => 5, 'UpdatedAt' => 6, ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'ref' => 1, 'position' => 2, 'exportCategoryId' => 3, 'handleClass' => 4, 'createdAt' => 5, 'updatedAt' => 6, ),
|
||||
self::TYPE_COLNAME => array(ExportTableMap::ID => 0, ExportTableMap::REF => 1, ExportTableMap::POSITION => 2, ExportTableMap::EXPORT_CATEGORY_ID => 3, ExportTableMap::HANDLE_CLASS => 4, ExportTableMap::CREATED_AT => 5, ExportTableMap::UPDATED_AT => 6, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID' => 0, 'REF' => 1, 'POSITION' => 2, 'EXPORT_CATEGORY_ID' => 3, 'HANDLE_CLASS' => 4, 'CREATED_AT' => 5, 'UPDATED_AT' => 6, ),
|
||||
self::TYPE_FIELDNAME => array('id' => 0, 'ref' => 1, 'position' => 2, 'export_category_id' => 3, 'handle_class' => 4, 'created_at' => 5, 'updated_at' => 6, ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, )
|
||||
);
|
||||
|
||||
@@ -167,9 +167,9 @@ class ExportTableMap extends TableMap
|
||||
// columns
|
||||
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
|
||||
$this->addColumn('REF', 'Ref', 'VARCHAR', true, 255, null);
|
||||
$this->addForeignKey('EXPORT_CATEGORY_ID', 'ExportCategoryId', 'INTEGER', 'export_category', 'ID', true, null, null);
|
||||
$this->addColumn('POSITION', 'Position', 'INTEGER', true, null, null);
|
||||
$this->addColumn('HANDLE_CLASS', 'HandleClass', 'CLOB', true, null, null);
|
||||
$this->addForeignKey('EXPORT_CATEGORY_ID', 'ExportCategoryId', 'INTEGER', 'export_category', 'ID', true, null, null);
|
||||
$this->addColumn('HANDLE_CLASS', 'HandleClass', 'LONGVARCHAR', true, null, null);
|
||||
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
|
||||
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
|
||||
} // initialize()
|
||||
@@ -179,7 +179,7 @@ class ExportTableMap extends TableMap
|
||||
*/
|
||||
public function buildRelations()
|
||||
{
|
||||
$this->addRelation('ExportCategory', '\\Thelia\\Model\\ExportCategory', RelationMap::MANY_TO_ONE, array('export_category_id' => 'id', ), 'CASCADE', 'RESTRICT');
|
||||
$this->addRelation('ExportCategory', '\\Thelia\\Model\\ExportCategory', RelationMap::MANY_TO_ONE, array('export_category_id' => 'id', ), null, null);
|
||||
$this->addRelation('ExportI18n', '\\Thelia\\Model\\ExportI18n', RelationMap::ONE_TO_MANY, array('id' => 'id', ), 'CASCADE', null, 'ExportI18ns');
|
||||
} // buildRelations()
|
||||
|
||||
@@ -192,8 +192,8 @@ class ExportTableMap extends TableMap
|
||||
public function getBehaviors()
|
||||
{
|
||||
return array(
|
||||
'i18n' => array('i18n_table' => '%TABLE%_i18n', 'i18n_phpname' => '%PHPNAME%I18n', 'i18n_columns' => 'title, description', 'locale_column' => 'locale', 'locale_length' => '5', 'default_locale' => '', 'locale_alias' => '', ),
|
||||
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', ),
|
||||
'i18n' => array('i18n_table' => '%TABLE%_i18n', 'i18n_phpname' => '%PHPNAME%I18n', 'i18n_columns' => 'title,description', 'locale_column' => 'locale', 'locale_length' => '5', 'default_locale' => '', 'locale_alias' => '', ),
|
||||
);
|
||||
} // getBehaviors()
|
||||
/**
|
||||
@@ -346,16 +346,16 @@ class ExportTableMap extends TableMap
|
||||
if (null === $alias) {
|
||||
$criteria->addSelectColumn(ExportTableMap::ID);
|
||||
$criteria->addSelectColumn(ExportTableMap::REF);
|
||||
$criteria->addSelectColumn(ExportTableMap::EXPORT_CATEGORY_ID);
|
||||
$criteria->addSelectColumn(ExportTableMap::POSITION);
|
||||
$criteria->addSelectColumn(ExportTableMap::EXPORT_CATEGORY_ID);
|
||||
$criteria->addSelectColumn(ExportTableMap::HANDLE_CLASS);
|
||||
$criteria->addSelectColumn(ExportTableMap::CREATED_AT);
|
||||
$criteria->addSelectColumn(ExportTableMap::UPDATED_AT);
|
||||
} else {
|
||||
$criteria->addSelectColumn($alias . '.ID');
|
||||
$criteria->addSelectColumn($alias . '.REF');
|
||||
$criteria->addSelectColumn($alias . '.EXPORT_CATEGORY_ID');
|
||||
$criteria->addSelectColumn($alias . '.POSITION');
|
||||
$criteria->addSelectColumn($alias . '.EXPORT_CATEGORY_ID');
|
||||
$criteria->addSelectColumn($alias . '.HANDLE_CLASS');
|
||||
$criteria->addSelectColumn($alias . '.CREATED_AT');
|
||||
$criteria->addSelectColumn($alias . '.UPDATED_AT');
|
||||
|
||||
@@ -167,7 +167,7 @@ class ImportCategoryTableMap extends TableMap
|
||||
*/
|
||||
public function buildRelations()
|
||||
{
|
||||
$this->addRelation('Import', '\\Thelia\\Model\\Import', RelationMap::ONE_TO_MANY, array('id' => 'import_category_id', ), 'CASCADE', 'RESTRICT', 'Imports');
|
||||
$this->addRelation('Import', '\\Thelia\\Model\\Import', RelationMap::ONE_TO_MANY, array('id' => 'import_category_id', ), null, null, 'Imports');
|
||||
$this->addRelation('ImportCategoryI18n', '\\Thelia\\Model\\ImportCategoryI18n', RelationMap::ONE_TO_MANY, array('id' => 'id', ), 'CASCADE', null, 'ImportCategoryI18ns');
|
||||
} // buildRelations()
|
||||
|
||||
@@ -180,8 +180,8 @@ class ImportCategoryTableMap extends TableMap
|
||||
public function getBehaviors()
|
||||
{
|
||||
return array(
|
||||
'i18n' => array('i18n_table' => '%TABLE%_i18n', 'i18n_phpname' => '%PHPNAME%I18n', 'i18n_columns' => 'title', 'locale_column' => 'locale', 'locale_length' => '5', 'default_locale' => '', 'locale_alias' => '', ),
|
||||
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', ),
|
||||
'i18n' => array('i18n_table' => '%TABLE%_i18n', 'i18n_phpname' => '%PHPNAME%I18n', 'i18n_columns' => 'title', 'locale_column' => 'locale', 'locale_length' => '5', 'default_locale' => '', 'locale_alias' => '', ),
|
||||
);
|
||||
} // getBehaviors()
|
||||
/**
|
||||
@@ -191,7 +191,6 @@ class ImportCategoryTableMap 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.
|
||||
ImportTableMap::clearInstancePool();
|
||||
ImportCategoryI18nTableMap::clearInstancePool();
|
||||
}
|
||||
|
||||
|
||||
@@ -144,7 +144,7 @@ class ImportI18nTableMap extends TableMap
|
||||
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'import', 'ID', true, null, null);
|
||||
$this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_US');
|
||||
$this->addColumn('TITLE', 'Title', 'VARCHAR', true, 255, null);
|
||||
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
|
||||
$this->addColumn('DESCRIPTION', 'Description', 'LONGVARCHAR', false, null, null);
|
||||
} // initialize()
|
||||
|
||||
/**
|
||||
|
||||
@@ -80,16 +80,16 @@ class ImportTableMap extends TableMap
|
||||
*/
|
||||
const REF = 'import.REF';
|
||||
|
||||
/**
|
||||
* the column name for the IMPORT_CATEGORY_ID field
|
||||
*/
|
||||
const IMPORT_CATEGORY_ID = 'import.IMPORT_CATEGORY_ID';
|
||||
|
||||
/**
|
||||
* the column name for the POSITION field
|
||||
*/
|
||||
const POSITION = 'import.POSITION';
|
||||
|
||||
/**
|
||||
* the column name for the IMPORT_CATEGORY_ID field
|
||||
*/
|
||||
const IMPORT_CATEGORY_ID = 'import.IMPORT_CATEGORY_ID';
|
||||
|
||||
/**
|
||||
* the column name for the HANDLE_CLASS field
|
||||
*/
|
||||
@@ -126,11 +126,11 @@ class ImportTableMap extends TableMap
|
||||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||
*/
|
||||
protected static $fieldNames = array (
|
||||
self::TYPE_PHPNAME => array('Id', 'Ref', 'ImportCategoryId', 'Position', 'HandleClass', 'CreatedAt', 'UpdatedAt', ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id', 'ref', 'importCategoryId', 'position', 'handleClass', 'createdAt', 'updatedAt', ),
|
||||
self::TYPE_COLNAME => array(ImportTableMap::ID, ImportTableMap::REF, ImportTableMap::IMPORT_CATEGORY_ID, ImportTableMap::POSITION, ImportTableMap::HANDLE_CLASS, ImportTableMap::CREATED_AT, ImportTableMap::UPDATED_AT, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID', 'REF', 'IMPORT_CATEGORY_ID', 'POSITION', 'HANDLE_CLASS', 'CREATED_AT', 'UPDATED_AT', ),
|
||||
self::TYPE_FIELDNAME => array('id', 'ref', 'import_category_id', 'position', 'handle_class', 'created_at', 'updated_at', ),
|
||||
self::TYPE_PHPNAME => array('Id', 'Ref', 'Position', 'ImportCategoryId', 'HandleClass', 'CreatedAt', 'UpdatedAt', ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id', 'ref', 'position', 'importCategoryId', 'handleClass', 'createdAt', 'updatedAt', ),
|
||||
self::TYPE_COLNAME => array(ImportTableMap::ID, ImportTableMap::REF, ImportTableMap::POSITION, ImportTableMap::IMPORT_CATEGORY_ID, ImportTableMap::HANDLE_CLASS, ImportTableMap::CREATED_AT, ImportTableMap::UPDATED_AT, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID', 'REF', 'POSITION', 'IMPORT_CATEGORY_ID', 'HANDLE_CLASS', 'CREATED_AT', 'UPDATED_AT', ),
|
||||
self::TYPE_FIELDNAME => array('id', 'ref', 'position', 'import_category_id', 'handle_class', 'created_at', 'updated_at', ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, )
|
||||
);
|
||||
|
||||
@@ -141,11 +141,11 @@ class ImportTableMap extends TableMap
|
||||
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
|
||||
*/
|
||||
protected static $fieldKeys = array (
|
||||
self::TYPE_PHPNAME => array('Id' => 0, 'Ref' => 1, 'ImportCategoryId' => 2, 'Position' => 3, 'HandleClass' => 4, 'CreatedAt' => 5, 'UpdatedAt' => 6, ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'ref' => 1, 'importCategoryId' => 2, 'position' => 3, 'handleClass' => 4, 'createdAt' => 5, 'updatedAt' => 6, ),
|
||||
self::TYPE_COLNAME => array(ImportTableMap::ID => 0, ImportTableMap::REF => 1, ImportTableMap::IMPORT_CATEGORY_ID => 2, ImportTableMap::POSITION => 3, ImportTableMap::HANDLE_CLASS => 4, ImportTableMap::CREATED_AT => 5, ImportTableMap::UPDATED_AT => 6, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID' => 0, 'REF' => 1, 'IMPORT_CATEGORY_ID' => 2, 'POSITION' => 3, 'HANDLE_CLASS' => 4, 'CREATED_AT' => 5, 'UPDATED_AT' => 6, ),
|
||||
self::TYPE_FIELDNAME => array('id' => 0, 'ref' => 1, 'import_category_id' => 2, 'position' => 3, 'handle_class' => 4, 'created_at' => 5, 'updated_at' => 6, ),
|
||||
self::TYPE_PHPNAME => array('Id' => 0, 'Ref' => 1, 'Position' => 2, 'ImportCategoryId' => 3, 'HandleClass' => 4, 'CreatedAt' => 5, 'UpdatedAt' => 6, ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'ref' => 1, 'position' => 2, 'importCategoryId' => 3, 'handleClass' => 4, 'createdAt' => 5, 'updatedAt' => 6, ),
|
||||
self::TYPE_COLNAME => array(ImportTableMap::ID => 0, ImportTableMap::REF => 1, ImportTableMap::POSITION => 2, ImportTableMap::IMPORT_CATEGORY_ID => 3, ImportTableMap::HANDLE_CLASS => 4, ImportTableMap::CREATED_AT => 5, ImportTableMap::UPDATED_AT => 6, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID' => 0, 'REF' => 1, 'POSITION' => 2, 'IMPORT_CATEGORY_ID' => 3, 'HANDLE_CLASS' => 4, 'CREATED_AT' => 5, 'UPDATED_AT' => 6, ),
|
||||
self::TYPE_FIELDNAME => array('id' => 0, 'ref' => 1, 'position' => 2, 'import_category_id' => 3, 'handle_class' => 4, 'created_at' => 5, 'updated_at' => 6, ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, )
|
||||
);
|
||||
|
||||
@@ -167,9 +167,9 @@ class ImportTableMap extends TableMap
|
||||
// columns
|
||||
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
|
||||
$this->addColumn('REF', 'Ref', 'VARCHAR', true, 255, null);
|
||||
$this->addForeignKey('IMPORT_CATEGORY_ID', 'ImportCategoryId', 'INTEGER', 'import_category', 'ID', true, null, null);
|
||||
$this->addColumn('POSITION', 'Position', 'INTEGER', true, null, null);
|
||||
$this->addColumn('HANDLE_CLASS', 'HandleClass', 'CLOB', true, null, null);
|
||||
$this->addForeignKey('IMPORT_CATEGORY_ID', 'ImportCategoryId', 'INTEGER', 'import_category', 'ID', true, null, null);
|
||||
$this->addColumn('HANDLE_CLASS', 'HandleClass', 'LONGVARCHAR', true, null, null);
|
||||
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
|
||||
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
|
||||
} // initialize()
|
||||
@@ -179,7 +179,7 @@ class ImportTableMap extends TableMap
|
||||
*/
|
||||
public function buildRelations()
|
||||
{
|
||||
$this->addRelation('ImportCategory', '\\Thelia\\Model\\ImportCategory', RelationMap::MANY_TO_ONE, array('import_category_id' => 'id', ), 'CASCADE', 'RESTRICT');
|
||||
$this->addRelation('ImportCategory', '\\Thelia\\Model\\ImportCategory', RelationMap::MANY_TO_ONE, array('import_category_id' => 'id', ), null, null);
|
||||
$this->addRelation('ImportI18n', '\\Thelia\\Model\\ImportI18n', RelationMap::ONE_TO_MANY, array('id' => 'id', ), 'CASCADE', null, 'ImportI18ns');
|
||||
} // buildRelations()
|
||||
|
||||
@@ -192,8 +192,8 @@ class ImportTableMap extends TableMap
|
||||
public function getBehaviors()
|
||||
{
|
||||
return array(
|
||||
'i18n' => array('i18n_table' => '%TABLE%_i18n', 'i18n_phpname' => '%PHPNAME%I18n', 'i18n_columns' => 'title, description', 'locale_column' => 'locale', 'locale_length' => '5', 'default_locale' => '', 'locale_alias' => '', ),
|
||||
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', ),
|
||||
'i18n' => array('i18n_table' => '%TABLE%_i18n', 'i18n_phpname' => '%PHPNAME%I18n', 'i18n_columns' => 'title,description', 'locale_column' => 'locale', 'locale_length' => '5', 'default_locale' => '', 'locale_alias' => '', ),
|
||||
);
|
||||
} // getBehaviors()
|
||||
/**
|
||||
@@ -346,16 +346,16 @@ class ImportTableMap extends TableMap
|
||||
if (null === $alias) {
|
||||
$criteria->addSelectColumn(ImportTableMap::ID);
|
||||
$criteria->addSelectColumn(ImportTableMap::REF);
|
||||
$criteria->addSelectColumn(ImportTableMap::IMPORT_CATEGORY_ID);
|
||||
$criteria->addSelectColumn(ImportTableMap::POSITION);
|
||||
$criteria->addSelectColumn(ImportTableMap::IMPORT_CATEGORY_ID);
|
||||
$criteria->addSelectColumn(ImportTableMap::HANDLE_CLASS);
|
||||
$criteria->addSelectColumn(ImportTableMap::CREATED_AT);
|
||||
$criteria->addSelectColumn(ImportTableMap::UPDATED_AT);
|
||||
} else {
|
||||
$criteria->addSelectColumn($alias . '.ID');
|
||||
$criteria->addSelectColumn($alias . '.REF');
|
||||
$criteria->addSelectColumn($alias . '.IMPORT_CATEGORY_ID');
|
||||
$criteria->addSelectColumn($alias . '.POSITION');
|
||||
$criteria->addSelectColumn($alias . '.IMPORT_CATEGORY_ID');
|
||||
$criteria->addSelectColumn($alias . '.HANDLE_CLASS');
|
||||
$criteria->addSelectColumn($alias . '.CREATED_AT');
|
||||
$criteria->addSelectColumn($alias . '.UPDATED_AT');
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<database defaultIdMethod="native" name="thelia">
|
||||
<vendor type="mysql">
|
||||
<parameter name="Engine" value="InnoDB"/>
|
||||
<parameter name="Charset" value="utf8"/>
|
||||
</vendor>
|
||||
<table name="category" namespace="Thelia\Model">
|
||||
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
|
||||
<column name="parent" type="INTEGER" />
|
||||
@@ -1516,8 +1520,8 @@
|
||||
</index>
|
||||
<behavior name="timestampable" />
|
||||
</table>
|
||||
<table name="export_category">
|
||||
<column name="id" primaryKey="true" required="true" type="INTEGER" />
|
||||
<table name="export_category" namespace="Thelia\Model">
|
||||
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
|
||||
<column name="ref" required="true" size="255" type="VARCHAR" />
|
||||
<column name="title" required="true" size="255" type="VARCHAR" />
|
||||
<column name="position" required="true" type="INTEGER" />
|
||||
@@ -1529,7 +1533,7 @@
|
||||
</behavior>
|
||||
<behavior name="timestampable" />
|
||||
</table>
|
||||
<table name="export">
|
||||
<table name="export" namespace="Thelia\Model">
|
||||
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
|
||||
<column name="ref" required="true" size="255" type="VARCHAR" />
|
||||
<column name="title" required="true" size="255" type="VARCHAR" />
|
||||
@@ -1551,8 +1555,8 @@
|
||||
<parameter name="i18n_columns" value="title,description" />
|
||||
</behavior>
|
||||
</table>
|
||||
<table name="import_category">
|
||||
<column name="id" primaryKey="true" required="true" type="INTEGER" />
|
||||
<table name="import_category" namespace="Thelia\Model">
|
||||
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
|
||||
<column name="ref" required="true" size="255" type="VARCHAR" />
|
||||
<column name="title" required="true" size="255" type="VARCHAR" />
|
||||
<column name="position" required="true" type="INTEGER" />
|
||||
@@ -1564,7 +1568,7 @@
|
||||
<parameter name="i18n_columns" value="title" />
|
||||
</behavior>
|
||||
</table>
|
||||
<table name="import">
|
||||
<table name="import" namespace="Thelia\Model">
|
||||
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
|
||||
<column name="ref" required="true" size="255" type="VARCHAR" />
|
||||
<column name="title" required="true" size="255" type="VARCHAR" />
|
||||
|
||||
400
setup/thelia.sql
400
setup/thelia.sql
File diff suppressed because it is too large
Load Diff
6
setup/update/2.0.3-beta2.sql
Normal file
6
setup/update/2.0.3-beta2.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
ALTER TABLE `export` ADD INDEX `fk_export_1_idx` (`export_category_id`);
|
||||
ALTER TABLE `import` ADD INDEX `fk_import_1_idx` (`import_category_id`);
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
Reference in New Issue
Block a user