Merge pull request #574 from lovenunu/update-schema

Update schema with PropelUtility
This commit is contained in:
Manuel Raynaud
2014-08-08 09:28:32 +02:00
13 changed files with 743 additions and 728 deletions

View File

@@ -71,18 +71,18 @@ abstract class Export implements ActiveRecordInterface
*/ */
protected $ref; protected $ref;
/**
* The value for the export_category_id field.
* @var int
*/
protected $export_category_id;
/** /**
* The value for the position field. * The value for the position field.
* @var int * @var int
*/ */
protected $position; protected $position;
/**
* The value for the export_category_id field.
* @var int
*/
protected $export_category_id;
/** /**
* The value for the handle_class field. * The value for the handle_class field.
* @var string * @var string
@@ -420,17 +420,6 @@ abstract class Export implements ActiveRecordInterface
return $this->ref; 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. * Get the [position] column value.
* *
@@ -442,6 +431,17 @@ abstract class Export implements ActiveRecordInterface
return $this->position; 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. * Get the [handle_class] column value.
* *
@@ -535,6 +535,27 @@ abstract class Export implements ActiveRecordInterface
return $this; return $this;
} // setRef() } // 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. * Set the value of [export_category_id] column.
* *
@@ -560,27 +581,6 @@ abstract class Export implements ActiveRecordInterface
return $this; return $this;
} // setExportCategoryId() } // 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. * 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)]; $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : ExportTableMap::translateFieldName('Ref', TableMap::TYPE_PHPNAME, $indexType)];
$this->ref = (null !== $col) ? (string) $col : null; $this->ref = (null !== $col) ? (string) $col : null;
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : ExportTableMap::translateFieldName('ExportCategoryId', TableMap::TYPE_PHPNAME, $indexType)]; $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : ExportTableMap::translateFieldName('Position', 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)];
$this->position = (null !== $col) ? (int) $col : null; $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)]; $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : ExportTableMap::translateFieldName('HandleClass', TableMap::TYPE_PHPNAME, $indexType)];
$this->handle_class = (null !== $col) ? (string) $col : null; $this->handle_class = (null !== $col) ? (string) $col : null;
@@ -976,12 +976,12 @@ abstract class Export implements ActiveRecordInterface
if ($this->isColumnModified(ExportTableMap::REF)) { if ($this->isColumnModified(ExportTableMap::REF)) {
$modifiedColumns[':p' . $index++] = '`REF`'; $modifiedColumns[':p' . $index++] = '`REF`';
} }
if ($this->isColumnModified(ExportTableMap::EXPORT_CATEGORY_ID)) {
$modifiedColumns[':p' . $index++] = '`EXPORT_CATEGORY_ID`';
}
if ($this->isColumnModified(ExportTableMap::POSITION)) { if ($this->isColumnModified(ExportTableMap::POSITION)) {
$modifiedColumns[':p' . $index++] = '`POSITION`'; $modifiedColumns[':p' . $index++] = '`POSITION`';
} }
if ($this->isColumnModified(ExportTableMap::EXPORT_CATEGORY_ID)) {
$modifiedColumns[':p' . $index++] = '`EXPORT_CATEGORY_ID`';
}
if ($this->isColumnModified(ExportTableMap::HANDLE_CLASS)) { if ($this->isColumnModified(ExportTableMap::HANDLE_CLASS)) {
$modifiedColumns[':p' . $index++] = '`HANDLE_CLASS`'; $modifiedColumns[':p' . $index++] = '`HANDLE_CLASS`';
} }
@@ -1008,12 +1008,12 @@ abstract class Export implements ActiveRecordInterface
case '`REF`': case '`REF`':
$stmt->bindValue($identifier, $this->ref, PDO::PARAM_STR); $stmt->bindValue($identifier, $this->ref, PDO::PARAM_STR);
break; break;
case '`EXPORT_CATEGORY_ID`':
$stmt->bindValue($identifier, $this->export_category_id, PDO::PARAM_INT);
break;
case '`POSITION`': case '`POSITION`':
$stmt->bindValue($identifier, $this->position, PDO::PARAM_INT); $stmt->bindValue($identifier, $this->position, PDO::PARAM_INT);
break; break;
case '`EXPORT_CATEGORY_ID`':
$stmt->bindValue($identifier, $this->export_category_id, PDO::PARAM_INT);
break;
case '`HANDLE_CLASS`': case '`HANDLE_CLASS`':
$stmt->bindValue($identifier, $this->handle_class, PDO::PARAM_STR); $stmt->bindValue($identifier, $this->handle_class, PDO::PARAM_STR);
break; break;
@@ -1092,10 +1092,10 @@ abstract class Export implements ActiveRecordInterface
return $this->getRef(); return $this->getRef();
break; break;
case 2: case 2:
return $this->getExportCategoryId(); return $this->getPosition();
break; break;
case 3: case 3:
return $this->getPosition(); return $this->getExportCategoryId();
break; break;
case 4: case 4:
return $this->getHandleClass(); return $this->getHandleClass();
@@ -1137,8 +1137,8 @@ abstract class Export implements ActiveRecordInterface
$result = array( $result = array(
$keys[0] => $this->getId(), $keys[0] => $this->getId(),
$keys[1] => $this->getRef(), $keys[1] => $this->getRef(),
$keys[2] => $this->getExportCategoryId(), $keys[2] => $this->getPosition(),
$keys[3] => $this->getPosition(), $keys[3] => $this->getExportCategoryId(),
$keys[4] => $this->getHandleClass(), $keys[4] => $this->getHandleClass(),
$keys[5] => $this->getCreatedAt(), $keys[5] => $this->getCreatedAt(),
$keys[6] => $this->getUpdatedAt(), $keys[6] => $this->getUpdatedAt(),
@@ -1196,10 +1196,10 @@ abstract class Export implements ActiveRecordInterface
$this->setRef($value); $this->setRef($value);
break; break;
case 2: case 2:
$this->setExportCategoryId($value); $this->setPosition($value);
break; break;
case 3: case 3:
$this->setPosition($value); $this->setExportCategoryId($value);
break; break;
case 4: case 4:
$this->setHandleClass($value); $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[0], $arr)) $this->setId($arr[$keys[0]]);
if (array_key_exists($keys[1], $arr)) $this->setRef($arr[$keys[1]]); 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[2], $arr)) $this->setPosition($arr[$keys[2]]);
if (array_key_exists($keys[3], $arr)) $this->setPosition($arr[$keys[3]]); 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[4], $arr)) $this->setHandleClass($arr[$keys[4]]);
if (array_key_exists($keys[5], $arr)) $this->setCreatedAt($arr[$keys[5]]); if (array_key_exists($keys[5], $arr)) $this->setCreatedAt($arr[$keys[5]]);
if (array_key_exists($keys[6], $arr)) $this->setUpdatedAt($arr[$keys[6]]); 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::ID)) $criteria->add(ExportTableMap::ID, $this->id);
if ($this->isColumnModified(ExportTableMap::REF)) $criteria->add(ExportTableMap::REF, $this->ref); 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::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::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::CREATED_AT)) $criteria->add(ExportTableMap::CREATED_AT, $this->created_at);
if ($this->isColumnModified(ExportTableMap::UPDATED_AT)) $criteria->add(ExportTableMap::UPDATED_AT, $this->updated_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) public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
{ {
$copyObj->setRef($this->getRef()); $copyObj->setRef($this->getRef());
$copyObj->setExportCategoryId($this->getExportCategoryId());
$copyObj->setPosition($this->getPosition()); $copyObj->setPosition($this->getPosition());
$copyObj->setExportCategoryId($this->getExportCategoryId());
$copyObj->setHandleClass($this->getHandleClass()); $copyObj->setHandleClass($this->getHandleClass());
$copyObj->setCreatedAt($this->getCreatedAt()); $copyObj->setCreatedAt($this->getCreatedAt());
$copyObj->setUpdatedAt($this->getUpdatedAt()); $copyObj->setUpdatedAt($this->getUpdatedAt());
@@ -1669,8 +1669,8 @@ abstract class Export implements ActiveRecordInterface
{ {
$this->id = null; $this->id = null;
$this->ref = null; $this->ref = null;
$this->export_category_id = null;
$this->position = null; $this->position = null;
$this->export_category_id = null;
$this->handle_class = null; $this->handle_class = null;
$this->created_at = null; $this->created_at = null;
$this->updated_at = null; $this->updated_at = null;
@@ -1718,6 +1718,20 @@ abstract class Export implements ActiveRecordInterface
return (string) $this->exportTo(ExportTableMap::DEFAULT_STRING_FORMAT); 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 // i18n behavior
/** /**
@@ -1865,20 +1879,6 @@ abstract class Export implements ActiveRecordInterface
return $this; 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 * Code to be run before persisting the object
* @param ConnectionInterface $con * @param ConnectionInterface $con

View File

@@ -24,16 +24,16 @@ use Thelia\Model\Map\ExportTableMap;
* *
* @method ChildExportQuery orderById($order = Criteria::ASC) Order by the id column * @method ChildExportQuery orderById($order = Criteria::ASC) Order by the id column
* @method ChildExportQuery orderByRef($order = Criteria::ASC) Order by the ref 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 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 orderByHandleClass($order = Criteria::ASC) Order by the handle_class column
* @method ChildExportQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at 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 orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
* *
* @method ChildExportQuery groupById() Group by the id column * @method ChildExportQuery groupById() Group by the id column
* @method ChildExportQuery groupByRef() Group by the ref 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 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 groupByHandleClass() Group by the handle_class column
* @method ChildExportQuery groupByCreatedAt() Group by the created_at column * @method ChildExportQuery groupByCreatedAt() Group by the created_at column
* @method ChildExportQuery groupByUpdatedAt() Group by the updated_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 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 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 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 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 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 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 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 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 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 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 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 * @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) 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 { try {
$stmt = $con->prepare($sql); $stmt = $con->prepare($sql);
$stmt->bindValue(':p0', $key, PDO::PARAM_INT); $stmt->bindValue(':p0', $key, PDO::PARAM_INT);
@@ -315,6 +315,47 @@ abstract class ExportQuery extends ModelCriteria
return $this->addUsingAlias(ExportTableMap::REF, $ref, $comparison); 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 * 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); 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 * 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 // timestampable behavior
/** /**
@@ -876,4 +819,61 @@ abstract class ExportQuery extends ModelCriteria
return $this->addAscendingOrderByColumn(ExportTableMap::CREATED_AT); 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 } // ExportQuery

View File

@@ -71,18 +71,18 @@ abstract class Import implements ActiveRecordInterface
*/ */
protected $ref; protected $ref;
/**
* The value for the import_category_id field.
* @var int
*/
protected $import_category_id;
/** /**
* The value for the position field. * The value for the position field.
* @var int * @var int
*/ */
protected $position; protected $position;
/**
* The value for the import_category_id field.
* @var int
*/
protected $import_category_id;
/** /**
* The value for the handle_class field. * The value for the handle_class field.
* @var string * @var string
@@ -420,17 +420,6 @@ abstract class Import implements ActiveRecordInterface
return $this->ref; 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. * Get the [position] column value.
* *
@@ -442,6 +431,17 @@ abstract class Import implements ActiveRecordInterface
return $this->position; 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. * Get the [handle_class] column value.
* *
@@ -535,6 +535,27 @@ abstract class Import implements ActiveRecordInterface
return $this; return $this;
} // setRef() } // 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. * Set the value of [import_category_id] column.
* *
@@ -560,27 +581,6 @@ abstract class Import implements ActiveRecordInterface
return $this; return $this;
} // setImportCategoryId() } // 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. * 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)]; $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : ImportTableMap::translateFieldName('Ref', TableMap::TYPE_PHPNAME, $indexType)];
$this->ref = (null !== $col) ? (string) $col : null; $this->ref = (null !== $col) ? (string) $col : null;
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : ImportTableMap::translateFieldName('ImportCategoryId', TableMap::TYPE_PHPNAME, $indexType)]; $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : ImportTableMap::translateFieldName('Position', 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)];
$this->position = (null !== $col) ? (int) $col : null; $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)]; $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : ImportTableMap::translateFieldName('HandleClass', TableMap::TYPE_PHPNAME, $indexType)];
$this->handle_class = (null !== $col) ? (string) $col : null; $this->handle_class = (null !== $col) ? (string) $col : null;
@@ -976,12 +976,12 @@ abstract class Import implements ActiveRecordInterface
if ($this->isColumnModified(ImportTableMap::REF)) { if ($this->isColumnModified(ImportTableMap::REF)) {
$modifiedColumns[':p' . $index++] = '`REF`'; $modifiedColumns[':p' . $index++] = '`REF`';
} }
if ($this->isColumnModified(ImportTableMap::IMPORT_CATEGORY_ID)) {
$modifiedColumns[':p' . $index++] = '`IMPORT_CATEGORY_ID`';
}
if ($this->isColumnModified(ImportTableMap::POSITION)) { if ($this->isColumnModified(ImportTableMap::POSITION)) {
$modifiedColumns[':p' . $index++] = '`POSITION`'; $modifiedColumns[':p' . $index++] = '`POSITION`';
} }
if ($this->isColumnModified(ImportTableMap::IMPORT_CATEGORY_ID)) {
$modifiedColumns[':p' . $index++] = '`IMPORT_CATEGORY_ID`';
}
if ($this->isColumnModified(ImportTableMap::HANDLE_CLASS)) { if ($this->isColumnModified(ImportTableMap::HANDLE_CLASS)) {
$modifiedColumns[':p' . $index++] = '`HANDLE_CLASS`'; $modifiedColumns[':p' . $index++] = '`HANDLE_CLASS`';
} }
@@ -1008,12 +1008,12 @@ abstract class Import implements ActiveRecordInterface
case '`REF`': case '`REF`':
$stmt->bindValue($identifier, $this->ref, PDO::PARAM_STR); $stmt->bindValue($identifier, $this->ref, PDO::PARAM_STR);
break; break;
case '`IMPORT_CATEGORY_ID`':
$stmt->bindValue($identifier, $this->import_category_id, PDO::PARAM_INT);
break;
case '`POSITION`': case '`POSITION`':
$stmt->bindValue($identifier, $this->position, PDO::PARAM_INT); $stmt->bindValue($identifier, $this->position, PDO::PARAM_INT);
break; break;
case '`IMPORT_CATEGORY_ID`':
$stmt->bindValue($identifier, $this->import_category_id, PDO::PARAM_INT);
break;
case '`HANDLE_CLASS`': case '`HANDLE_CLASS`':
$stmt->bindValue($identifier, $this->handle_class, PDO::PARAM_STR); $stmt->bindValue($identifier, $this->handle_class, PDO::PARAM_STR);
break; break;
@@ -1092,10 +1092,10 @@ abstract class Import implements ActiveRecordInterface
return $this->getRef(); return $this->getRef();
break; break;
case 2: case 2:
return $this->getImportCategoryId(); return $this->getPosition();
break; break;
case 3: case 3:
return $this->getPosition(); return $this->getImportCategoryId();
break; break;
case 4: case 4:
return $this->getHandleClass(); return $this->getHandleClass();
@@ -1137,8 +1137,8 @@ abstract class Import implements ActiveRecordInterface
$result = array( $result = array(
$keys[0] => $this->getId(), $keys[0] => $this->getId(),
$keys[1] => $this->getRef(), $keys[1] => $this->getRef(),
$keys[2] => $this->getImportCategoryId(), $keys[2] => $this->getPosition(),
$keys[3] => $this->getPosition(), $keys[3] => $this->getImportCategoryId(),
$keys[4] => $this->getHandleClass(), $keys[4] => $this->getHandleClass(),
$keys[5] => $this->getCreatedAt(), $keys[5] => $this->getCreatedAt(),
$keys[6] => $this->getUpdatedAt(), $keys[6] => $this->getUpdatedAt(),
@@ -1196,10 +1196,10 @@ abstract class Import implements ActiveRecordInterface
$this->setRef($value); $this->setRef($value);
break; break;
case 2: case 2:
$this->setImportCategoryId($value); $this->setPosition($value);
break; break;
case 3: case 3:
$this->setPosition($value); $this->setImportCategoryId($value);
break; break;
case 4: case 4:
$this->setHandleClass($value); $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[0], $arr)) $this->setId($arr[$keys[0]]);
if (array_key_exists($keys[1], $arr)) $this->setRef($arr[$keys[1]]); 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[2], $arr)) $this->setPosition($arr[$keys[2]]);
if (array_key_exists($keys[3], $arr)) $this->setPosition($arr[$keys[3]]); 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[4], $arr)) $this->setHandleClass($arr[$keys[4]]);
if (array_key_exists($keys[5], $arr)) $this->setCreatedAt($arr[$keys[5]]); if (array_key_exists($keys[5], $arr)) $this->setCreatedAt($arr[$keys[5]]);
if (array_key_exists($keys[6], $arr)) $this->setUpdatedAt($arr[$keys[6]]); 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::ID)) $criteria->add(ImportTableMap::ID, $this->id);
if ($this->isColumnModified(ImportTableMap::REF)) $criteria->add(ImportTableMap::REF, $this->ref); 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::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::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::CREATED_AT)) $criteria->add(ImportTableMap::CREATED_AT, $this->created_at);
if ($this->isColumnModified(ImportTableMap::UPDATED_AT)) $criteria->add(ImportTableMap::UPDATED_AT, $this->updated_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) public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
{ {
$copyObj->setRef($this->getRef()); $copyObj->setRef($this->getRef());
$copyObj->setImportCategoryId($this->getImportCategoryId());
$copyObj->setPosition($this->getPosition()); $copyObj->setPosition($this->getPosition());
$copyObj->setImportCategoryId($this->getImportCategoryId());
$copyObj->setHandleClass($this->getHandleClass()); $copyObj->setHandleClass($this->getHandleClass());
$copyObj->setCreatedAt($this->getCreatedAt()); $copyObj->setCreatedAt($this->getCreatedAt());
$copyObj->setUpdatedAt($this->getUpdatedAt()); $copyObj->setUpdatedAt($this->getUpdatedAt());
@@ -1669,8 +1669,8 @@ abstract class Import implements ActiveRecordInterface
{ {
$this->id = null; $this->id = null;
$this->ref = null; $this->ref = null;
$this->import_category_id = null;
$this->position = null; $this->position = null;
$this->import_category_id = null;
$this->handle_class = null; $this->handle_class = null;
$this->created_at = null; $this->created_at = null;
$this->updated_at = null; $this->updated_at = null;
@@ -1718,6 +1718,20 @@ abstract class Import implements ActiveRecordInterface
return (string) $this->exportTo(ImportTableMap::DEFAULT_STRING_FORMAT); 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 // i18n behavior
/** /**
@@ -1865,20 +1879,6 @@ abstract class Import implements ActiveRecordInterface
return $this; 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 * Code to be run before persisting the object
* @param ConnectionInterface $con * @param ConnectionInterface $con

View File

@@ -1789,6 +1789,20 @@ abstract class ImportCategory implements ActiveRecordInterface
return (string) $this->exportTo(ImportCategoryTableMap::DEFAULT_STRING_FORMAT); 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 // i18n behavior
/** /**
@@ -1912,20 +1926,6 @@ abstract class ImportCategory implements ActiveRecordInterface
return $this; 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 * Code to be run before persisting the object
* @param ConnectionInterface $con * @param ConnectionInterface $con

View File

@@ -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 // timestampable behavior
/** /**
@@ -794,4 +737,61 @@ abstract class ImportCategoryQuery extends ModelCriteria
return $this->addAscendingOrderByColumn(ImportCategoryTableMap::CREATED_AT); 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 } // ImportCategoryQuery

View File

@@ -24,16 +24,16 @@ use Thelia\Model\Map\ImportTableMap;
* *
* @method ChildImportQuery orderById($order = Criteria::ASC) Order by the id column * @method ChildImportQuery orderById($order = Criteria::ASC) Order by the id column
* @method ChildImportQuery orderByRef($order = Criteria::ASC) Order by the ref 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 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 orderByHandleClass($order = Criteria::ASC) Order by the handle_class column
* @method ChildImportQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at 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 orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
* *
* @method ChildImportQuery groupById() Group by the id column * @method ChildImportQuery groupById() Group by the id column
* @method ChildImportQuery groupByRef() Group by the ref 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 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 groupByHandleClass() Group by the handle_class column
* @method ChildImportQuery groupByCreatedAt() Group by the created_at column * @method ChildImportQuery groupByCreatedAt() Group by the created_at column
* @method ChildImportQuery groupByUpdatedAt() Group by the updated_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 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 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 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 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 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 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 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 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 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 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 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 * @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) 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 { try {
$stmt = $con->prepare($sql); $stmt = $con->prepare($sql);
$stmt->bindValue(':p0', $key, PDO::PARAM_INT); $stmt->bindValue(':p0', $key, PDO::PARAM_INT);
@@ -315,6 +315,47 @@ abstract class ImportQuery extends ModelCriteria
return $this->addUsingAlias(ImportTableMap::REF, $ref, $comparison); 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 * 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); 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 * 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 // timestampable behavior
/** /**
@@ -876,4 +819,61 @@ abstract class ImportQuery extends ModelCriteria
return $this->addAscendingOrderByColumn(ImportTableMap::CREATED_AT); 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 } // ImportQuery

View File

@@ -167,7 +167,7 @@ class ExportCategoryTableMap extends TableMap
*/ */
public function buildRelations() 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', ), 'RESTRICT', 'CASCADE', 'Exports');
$this->addRelation('ExportCategoryI18n', '\\Thelia\\Model\\ExportCategoryI18n', RelationMap::ONE_TO_MANY, array('id' => 'id', ), 'CASCADE', null, 'ExportCategoryI18ns'); $this->addRelation('ExportCategoryI18n', '\\Thelia\\Model\\ExportCategoryI18n', RelationMap::ONE_TO_MANY, array('id' => 'id', ), 'CASCADE', null, 'ExportCategoryI18ns');
} // buildRelations() } // buildRelations()
@@ -191,7 +191,6 @@ class ExportCategoryTableMap extends TableMap
{ {
// Invalidate objects in ".$this->getClassNameFromBuilder($joinedTableTableMapBuilder)." instance pool, // Invalidate objects in ".$this->getClassNameFromBuilder($joinedTableTableMapBuilder)." instance pool,
// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule. // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
ExportTableMap::clearInstancePool();
ExportCategoryI18nTableMap::clearInstancePool(); ExportCategoryI18nTableMap::clearInstancePool();
} }

View File

@@ -80,16 +80,16 @@ class ExportTableMap extends TableMap
*/ */
const REF = 'export.REF'; 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 * the column name for the POSITION field
*/ */
const POSITION = 'export.POSITION'; 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 * 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' * e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/ */
protected static $fieldNames = array ( protected static $fieldNames = array (
self::TYPE_PHPNAME => array('Id', 'Ref', 'ExportCategoryId', 'Position', 'HandleClass', 'CreatedAt', 'UpdatedAt', ), self::TYPE_PHPNAME => array('Id', 'Ref', 'Position', 'ExportCategoryId', 'HandleClass', 'CreatedAt', 'UpdatedAt', ),
self::TYPE_STUDLYPHPNAME => array('id', 'ref', 'exportCategoryId', 'position', 'handleClass', 'createdAt', 'updatedAt', ), self::TYPE_STUDLYPHPNAME => array('id', 'ref', 'position', 'exportCategoryId', '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_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', 'EXPORT_CATEGORY_ID', 'POSITION', 'HANDLE_CLASS', 'CREATED_AT', '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', 'export_category_id', 'position', '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, ) 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 * e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
*/ */
protected static $fieldKeys = array ( protected static $fieldKeys = array (
self::TYPE_PHPNAME => array('Id' => 0, 'Ref' => 1, 'ExportCategoryId' => 2, 'Position' => 3, 'HandleClass' => 4, 'CreatedAt' => 5, 'UpdatedAt' => 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, 'exportCategoryId' => 2, 'position' => 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::EXPORT_CATEGORY_ID => 2, ExportTableMap::POSITION => 3, ExportTableMap::HANDLE_CLASS => 4, ExportTableMap::CREATED_AT => 5, ExportTableMap::UPDATED_AT => 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, 'EXPORT_CATEGORY_ID' => 2, 'POSITION' => 3, 'HANDLE_CLASS' => 4, 'CREATED_AT' => 5, '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, 'export_category_id' => 2, 'position' => 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, ) self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, )
); );
@@ -167,8 +167,8 @@ class ExportTableMap extends TableMap
// columns // columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null); $this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addColumn('REF', 'Ref', 'VARCHAR', true, 255, 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('POSITION', 'Position', 'INTEGER', true, null, null);
$this->addForeignKey('EXPORT_CATEGORY_ID', 'ExportCategoryId', 'INTEGER', 'export_category', 'ID', true, null, null);
$this->addColumn('HANDLE_CLASS', 'HandleClass', 'CLOB', true, null, null); $this->addColumn('HANDLE_CLASS', 'HandleClass', 'CLOB', true, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null); $this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null); $this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
@@ -179,7 +179,7 @@ class ExportTableMap extends TableMap
*/ */
public function buildRelations() 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', ), 'RESTRICT', 'CASCADE');
$this->addRelation('ExportI18n', '\\Thelia\\Model\\ExportI18n', RelationMap::ONE_TO_MANY, array('id' => 'id', ), 'CASCADE', null, 'ExportI18ns'); $this->addRelation('ExportI18n', '\\Thelia\\Model\\ExportI18n', RelationMap::ONE_TO_MANY, array('id' => 'id', ), 'CASCADE', null, 'ExportI18ns');
} // buildRelations() } // buildRelations()
@@ -192,8 +192,8 @@ class ExportTableMap extends TableMap
public function getBehaviors() public function getBehaviors()
{ {
return array( 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', ), '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() } // getBehaviors()
/** /**
@@ -346,16 +346,16 @@ class ExportTableMap extends TableMap
if (null === $alias) { if (null === $alias) {
$criteria->addSelectColumn(ExportTableMap::ID); $criteria->addSelectColumn(ExportTableMap::ID);
$criteria->addSelectColumn(ExportTableMap::REF); $criteria->addSelectColumn(ExportTableMap::REF);
$criteria->addSelectColumn(ExportTableMap::EXPORT_CATEGORY_ID);
$criteria->addSelectColumn(ExportTableMap::POSITION); $criteria->addSelectColumn(ExportTableMap::POSITION);
$criteria->addSelectColumn(ExportTableMap::EXPORT_CATEGORY_ID);
$criteria->addSelectColumn(ExportTableMap::HANDLE_CLASS); $criteria->addSelectColumn(ExportTableMap::HANDLE_CLASS);
$criteria->addSelectColumn(ExportTableMap::CREATED_AT); $criteria->addSelectColumn(ExportTableMap::CREATED_AT);
$criteria->addSelectColumn(ExportTableMap::UPDATED_AT); $criteria->addSelectColumn(ExportTableMap::UPDATED_AT);
} else { } else {
$criteria->addSelectColumn($alias . '.ID'); $criteria->addSelectColumn($alias . '.ID');
$criteria->addSelectColumn($alias . '.REF'); $criteria->addSelectColumn($alias . '.REF');
$criteria->addSelectColumn($alias . '.EXPORT_CATEGORY_ID');
$criteria->addSelectColumn($alias . '.POSITION'); $criteria->addSelectColumn($alias . '.POSITION');
$criteria->addSelectColumn($alias . '.EXPORT_CATEGORY_ID');
$criteria->addSelectColumn($alias . '.HANDLE_CLASS'); $criteria->addSelectColumn($alias . '.HANDLE_CLASS');
$criteria->addSelectColumn($alias . '.CREATED_AT'); $criteria->addSelectColumn($alias . '.CREATED_AT');
$criteria->addSelectColumn($alias . '.UPDATED_AT'); $criteria->addSelectColumn($alias . '.UPDATED_AT');

View File

@@ -167,7 +167,7 @@ class ImportCategoryTableMap extends TableMap
*/ */
public function buildRelations() 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', ), 'RESTRICT', 'CASCADE', 'Imports');
$this->addRelation('ImportCategoryI18n', '\\Thelia\\Model\\ImportCategoryI18n', RelationMap::ONE_TO_MANY, array('id' => 'id', ), 'CASCADE', null, 'ImportCategoryI18ns'); $this->addRelation('ImportCategoryI18n', '\\Thelia\\Model\\ImportCategoryI18n', RelationMap::ONE_TO_MANY, array('id' => 'id', ), 'CASCADE', null, 'ImportCategoryI18ns');
} // buildRelations() } // buildRelations()
@@ -180,8 +180,8 @@ class ImportCategoryTableMap extends TableMap
public function getBehaviors() public function getBehaviors()
{ {
return array( 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', ), '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() } // getBehaviors()
/** /**
@@ -191,7 +191,6 @@ class ImportCategoryTableMap extends TableMap
{ {
// Invalidate objects in ".$this->getClassNameFromBuilder($joinedTableTableMapBuilder)." instance pool, // Invalidate objects in ".$this->getClassNameFromBuilder($joinedTableTableMapBuilder)." instance pool,
// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule. // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
ImportTableMap::clearInstancePool();
ImportCategoryI18nTableMap::clearInstancePool(); ImportCategoryI18nTableMap::clearInstancePool();
} }

View File

@@ -80,16 +80,16 @@ class ImportTableMap extends TableMap
*/ */
const REF = 'import.REF'; 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 * the column name for the POSITION field
*/ */
const POSITION = 'import.POSITION'; 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 * 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' * e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/ */
protected static $fieldNames = array ( protected static $fieldNames = array (
self::TYPE_PHPNAME => array('Id', 'Ref', 'ImportCategoryId', 'Position', 'HandleClass', 'CreatedAt', 'UpdatedAt', ), self::TYPE_PHPNAME => array('Id', 'Ref', 'Position', 'ImportCategoryId', 'HandleClass', 'CreatedAt', 'UpdatedAt', ),
self::TYPE_STUDLYPHPNAME => array('id', 'ref', 'importCategoryId', 'position', 'handleClass', 'createdAt', 'updatedAt', ), self::TYPE_STUDLYPHPNAME => array('id', 'ref', 'position', 'importCategoryId', '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_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', 'IMPORT_CATEGORY_ID', 'POSITION', 'HANDLE_CLASS', 'CREATED_AT', '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', 'import_category_id', 'position', '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, ) 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 * e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
*/ */
protected static $fieldKeys = array ( protected static $fieldKeys = array (
self::TYPE_PHPNAME => array('Id' => 0, 'Ref' => 1, 'ImportCategoryId' => 2, 'Position' => 3, 'HandleClass' => 4, 'CreatedAt' => 5, 'UpdatedAt' => 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, 'importCategoryId' => 2, 'position' => 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::IMPORT_CATEGORY_ID => 2, ImportTableMap::POSITION => 3, ImportTableMap::HANDLE_CLASS => 4, ImportTableMap::CREATED_AT => 5, ImportTableMap::UPDATED_AT => 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, 'IMPORT_CATEGORY_ID' => 2, 'POSITION' => 3, 'HANDLE_CLASS' => 4, 'CREATED_AT' => 5, '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, 'import_category_id' => 2, 'position' => 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, ) self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, )
); );
@@ -167,8 +167,8 @@ class ImportTableMap extends TableMap
// columns // columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null); $this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addColumn('REF', 'Ref', 'VARCHAR', true, 255, 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('POSITION', 'Position', 'INTEGER', true, null, null);
$this->addForeignKey('IMPORT_CATEGORY_ID', 'ImportCategoryId', 'INTEGER', 'import_category', 'ID', true, null, null);
$this->addColumn('HANDLE_CLASS', 'HandleClass', 'CLOB', true, null, null); $this->addColumn('HANDLE_CLASS', 'HandleClass', 'CLOB', true, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null); $this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null); $this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
@@ -179,7 +179,7 @@ class ImportTableMap extends TableMap
*/ */
public function buildRelations() 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', ), 'RESTRICT', 'CASCADE');
$this->addRelation('ImportI18n', '\\Thelia\\Model\\ImportI18n', RelationMap::ONE_TO_MANY, array('id' => 'id', ), 'CASCADE', null, 'ImportI18ns'); $this->addRelation('ImportI18n', '\\Thelia\\Model\\ImportI18n', RelationMap::ONE_TO_MANY, array('id' => 'id', ), 'CASCADE', null, 'ImportI18ns');
} // buildRelations() } // buildRelations()
@@ -192,8 +192,8 @@ class ImportTableMap extends TableMap
public function getBehaviors() public function getBehaviors()
{ {
return array( 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', ), '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() } // getBehaviors()
/** /**
@@ -346,16 +346,16 @@ class ImportTableMap extends TableMap
if (null === $alias) { if (null === $alias) {
$criteria->addSelectColumn(ImportTableMap::ID); $criteria->addSelectColumn(ImportTableMap::ID);
$criteria->addSelectColumn(ImportTableMap::REF); $criteria->addSelectColumn(ImportTableMap::REF);
$criteria->addSelectColumn(ImportTableMap::IMPORT_CATEGORY_ID);
$criteria->addSelectColumn(ImportTableMap::POSITION); $criteria->addSelectColumn(ImportTableMap::POSITION);
$criteria->addSelectColumn(ImportTableMap::IMPORT_CATEGORY_ID);
$criteria->addSelectColumn(ImportTableMap::HANDLE_CLASS); $criteria->addSelectColumn(ImportTableMap::HANDLE_CLASS);
$criteria->addSelectColumn(ImportTableMap::CREATED_AT); $criteria->addSelectColumn(ImportTableMap::CREATED_AT);
$criteria->addSelectColumn(ImportTableMap::UPDATED_AT); $criteria->addSelectColumn(ImportTableMap::UPDATED_AT);
} else { } else {
$criteria->addSelectColumn($alias . '.ID'); $criteria->addSelectColumn($alias . '.ID');
$criteria->addSelectColumn($alias . '.REF'); $criteria->addSelectColumn($alias . '.REF');
$criteria->addSelectColumn($alias . '.IMPORT_CATEGORY_ID');
$criteria->addSelectColumn($alias . '.POSITION'); $criteria->addSelectColumn($alias . '.POSITION');
$criteria->addSelectColumn($alias . '.IMPORT_CATEGORY_ID');
$criteria->addSelectColumn($alias . '.HANDLE_CLASS'); $criteria->addSelectColumn($alias . '.HANDLE_CLASS');
$criteria->addSelectColumn($alias . '.CREATED_AT'); $criteria->addSelectColumn($alias . '.CREATED_AT');
$criteria->addSelectColumn($alias . '.UPDATED_AT'); $criteria->addSelectColumn($alias . '.UPDATED_AT');

View File

@@ -1,6 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<database defaultIdMethod="native" name="thelia"> <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"> <table name="category" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" /> <column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="parent" type="INTEGER" /> <column name="parent" type="INTEGER" />
@@ -662,12 +665,18 @@
<column name="city" required="true" size="255" type="VARCHAR" /> <column name="city" required="true" size="255" type="VARCHAR" />
<column name="phone" size="20" type="VARCHAR" /> <column name="phone" size="20" type="VARCHAR" />
<column name="country_id" required="true" type="INTEGER" /> <column name="country_id" required="true" type="INTEGER" />
<foreign-key foreignTable="customer_title" name="fk_order_address_customer_title_id" onDelete="RESTRICT" onUpdate="RESTRICT"> <foreign-key foreignTable="customer_title" name="fk_order_address_customer_title_id" onDelete="RESTRICT" onUpdate="RESTRICT">
<reference foreign="id" local="customer_title_id" /> <reference foreign="id" local="customer_title_id" />
</foreign-key> </foreign-key>
<foreign-key foreignTable="country" name="fk_order_address_country_id" onDelete="RESTRICT" onUpdate="RESTRICT"> <foreign-key foreignTable="country" name="fk_order_address_country_id" onDelete="RESTRICT" onUpdate="RESTRICT">
<reference foreign="id" local="country_id" /> <reference foreign="id" local="country_id" />
</foreign-key> </foreign-key>
<index name="fk_order_address_customer_title_id_idx">
<index-column name="customer_title_id" />
</index>
<index name="fk_order_address_country_id_idx">
<index-column name="country_id" />
</index>
<behavior name="timestampable" /> <behavior name="timestampable" />
</table> </table>
<table name="order_product" namespace="Thelia\Model"> <table name="order_product" namespace="Thelia\Model">
@@ -1500,8 +1509,8 @@
</table> </table>
<table name="form_firewall" namespace="Thelia\Model"> <table name="form_firewall" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" /> <column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="form_name" required="true" type="VARCHAR" size="255" /> <column name="form_name" required="true" size="255" type="VARCHAR" />
<column name="ip_address" required="true" type="VARCHAR" size="15" /> <column name="ip_address" required="true" size="15" type="VARCHAR" />
<column defaultValue="1" name="attempts" type="TINYINT" /> <column defaultValue="1" name="attempts" type="TINYINT" />
<index name="idx_form_firewall_form_name"> <index name="idx_form_firewall_form_name">
<index-column name="form_name" /> <index-column name="form_name" />
@@ -1509,27 +1518,13 @@
<index name="idx_form_firewall_ip_address"> <index name="idx_form_firewall_ip_address">
<index-column name="ip_address" /> <index-column name="ip_address" />
</index> </index>
<behavior name="timestampable" />
</table>
<table name="import_category" namespace="Thelia\Model">
<column name="id" required="true" primaryKey="true" autoIncrement="true" type="INTEGER" />
<column name="ref" required="true" type="VARCHAR" size="255" />
<column name="title" type="VARCHAR" size="255" required="true" />
<column name="position" type="INTEGER" required="true" />
<unique name="ref_UNIQUE">
<unique-column name="ref" />
</unique>
<behavior name="i18n">
<parameter name="i18n_columns" value="title" />
</behavior>
<behavior name="timestampable" /> <behavior name="timestampable" />
</table> </table>
<table name="export_category" namespace="Thelia\Model"> <table name="export_category" namespace="Thelia\Model">
<column name="id" required="true" primaryKey="true" autoIncrement="true" type="INTEGER" /> <column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="ref" required="true" type="VARCHAR" size="255" /> <column name="ref" required="true" size="255" type="VARCHAR" />
<column name="title" type="VARCHAR" size="255" required="true" /> <column name="title" required="true" size="255" type="VARCHAR" />
<column name="position" type="INTEGER" required="true" /> <column name="position" required="true" type="INTEGER" />
<unique name="ref_UNIQUE"> <unique name="ref_UNIQUE">
<unique-column name="ref" /> <unique-column name="ref" />
</unique> </unique>
@@ -1538,48 +1533,61 @@
</behavior> </behavior>
<behavior name="timestampable" /> <behavior name="timestampable" />
</table> </table>
<table name="import" namespace="Thelia\Model">
<column name="id" required="true" primaryKey="true" autoIncrement="true" type="INTEGER" />
<column name="ref" required="true" type="VARCHAR" size="255" />
<column name="title" type="VARCHAR" size="255" required="true" />
<column name="description" type="CLOB" />
<column name="import_category_id" type="INTEGER" required="true" />
<column name="position" type="INTEGER" required="true" />
<column name="handle_class" type="CLOB" required="true"/>
<foreign-key foreignTable="import_category" name="fk_import_import_category_id" onDelete="CASCADE" onUpdate="RESTRICT">
<reference foreign="id" local="import_category_id" />
</foreign-key>
<unique name="ref_UNIQUE">
<unique-column name="ref" />
</unique>
<index name="idx_import_import_category_id">
<index-column name="import_category_id" />
</index>
<behavior name="i18n">
<parameter name="i18n_columns" value="title, description" />
</behavior>
<behavior name="timestampable" />
</table>
<table name="export" namespace="Thelia\Model"> <table name="export" namespace="Thelia\Model">
<column name="id" primaryKey="true" autoIncrement="true" required="true" type="INTEGER" /> <column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="ref" required="true" type="VARCHAR" size="255" /> <column name="ref" required="true" size="255" type="VARCHAR" />
<column name="title" type="VARCHAR" size="255" required="true" /> <column name="title" required="true" size="255" type="VARCHAR" />
<column name="description" type="CLOB" /> <column name="description" type="CLOB" />
<column name="export_category_id" type="INTEGER" required="true" /> <column name="position" required="true" type="INTEGER" />
<column name="position" type="INTEGER" required="true" /> <column name="export_category_id" required="true" type="INTEGER" />
<column name="handle_class" type="CLOB" required="true"/> <column name="handle_class" required="true" type="CLOB" />
<foreign-key foreignTable="export_category" name="fk_export_export_category_id" onDelete="CASCADE" onUpdate="RESTRICT"> <foreign-key foreignTable="export_category" name="fk_export_export_category_id" onDelete="RESTRICT" onUpdate="CASCADE">
<reference foreign="id" local="export_category_id" /> <reference foreign="id" local="export_category_id" />
</foreign-key> </foreign-key>
<unique name="ref_UNIQUE"> <unique name="ref_UNIQUE">
<unique-column name="ref" /> <unique-column name="ref" />
</unique> </unique>
<index name="idx_export_export_category_id"> <index name="fk_export_1_idx">
<index-column name="export_category_id" /> <index-column name="export_category_id" />
</index> </index>
<behavior name="i18n">
<parameter name="i18n_columns" value="title, description" />
</behavior>
<behavior name="timestampable" /> <behavior name="timestampable" />
<behavior name="i18n">
<parameter name="i18n_columns" value="title,description" />
</behavior>
</table>
<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" />
<unique name="ref_UNIQUE">
<unique-column name="ref" />
</unique>
<behavior name="timestampable" />
<behavior name="i18n">
<parameter name="i18n_columns" value="title" />
</behavior>
</table>
<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" />
<column name="description" type="CLOB" />
<column name="position" required="true" type="INTEGER" />
<column name="import_category_id" required="true" type="INTEGER" />
<column name="handle_class" required="true" type="CLOB" />
<foreign-key foreignTable="import_category" name="fk_import_import_category_id" onDelete="RESTRICT" onUpdate="CASCADE">
<reference foreign="id" local="import_category_id" />
</foreign-key>
<unique name="ref_UNIQUE">
<unique-column name="ref" />
</unique>
<index name="fk_export_1_idx">
<index-column name="import_category_id" />
</index>
<behavior name="timestampable" />
<behavior name="i18n">
<parameter name="i18n_columns" value="title,description" />
</behavior>
</table> </table>
</database> </database>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,9 @@
SET FOREIGN_KEY_CHECKS = 0;
UPDATE `config` SET `value`='2.0.3-beta2' WHERE `name`='thelia_version';
UPDATE `config` SET `value`='beta2' WHERE `name`='thelia_extra_version';
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;