category link last stand

This commit is contained in:
Etienne Roudeix
2013-07-24 14:51:36 +02:00
parent a1d5e275dd
commit f05331da1a
9 changed files with 100 additions and 312 deletions

View File

@@ -74,7 +74,6 @@ class Category extends BaseLoop
Argument::createBooleanTypeArgument('current'), Argument::createBooleanTypeArgument('current'),
Argument::createBooleanTypeArgument('not_empty', 0), Argument::createBooleanTypeArgument('not_empty', 0),
Argument::createBooleanTypeArgument('visible', 1), Argument::createBooleanTypeArgument('visible', 1),
Argument::createAnyTypeArgument('link'),
new Argument( new Argument(
'order', 'order',
new TypeCollection( new TypeCollection(
@@ -123,13 +122,6 @@ class Category extends BaseLoop
$search->filterById($exclude, Criteria::NOT_IN); $search->filterById($exclude, Criteria::NOT_IN);
} }
$link = $this->getLink();
if (!is_null($link)) {
$search->filterByLink($link);
}
$search->filterByVisible($this->getVisible() ? 1 : 0); $search->filterByVisible($this->getVisible() ? 1 : 0);
$orders = $this->getOrder(); $orders = $this->getOrder();
@@ -183,7 +175,6 @@ class Category extends BaseLoop
$loopResultRow->set("PARENT", $category->getParent()); $loopResultRow->set("PARENT", $category->getParent());
$loopResultRow->set("ID", $category->getId()); $loopResultRow->set("ID", $category->getId());
$loopResultRow->set("URL", $category->getUrl()); $loopResultRow->set("URL", $category->getUrl());
$loopResultRow->set("LINK", $category->getLink());
$loopResultRow->set("PRODUCT_COUNT", $category->countChild()); $loopResultRow->set("PRODUCT_COUNT", $category->countChild());
$loopResult->addRow($loopResultRow); $loopResult->addRow($loopResultRow);

View File

@@ -92,12 +92,6 @@ abstract class Category implements ActiveRecordInterface
*/ */
protected $parent; protected $parent;
/**
* The value for the link field.
* @var string
*/
protected $link;
/** /**
* The value for the visible field. * The value for the visible field.
* @var int * @var int
@@ -601,17 +595,6 @@ abstract class Category implements ActiveRecordInterface
return $this->parent; return $this->parent;
} }
/**
* Get the [link] column value.
*
* @return string
*/
public function getLink()
{
return $this->link;
}
/** /**
* Get the [visible] column value. * Get the [visible] column value.
* *
@@ -758,27 +741,6 @@ abstract class Category implements ActiveRecordInterface
return $this; return $this;
} // setParent() } // setParent()
/**
* Set the value of [link] column.
*
* @param string $v new value
* @return \Thelia\Model\Category The current object (for fluent API support)
*/
public function setLink($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->link !== $v) {
$this->link = $v;
$this->modifiedColumns[] = CategoryTableMap::LINK;
}
return $this;
} // setLink()
/** /**
* Set the value of [visible] column. * Set the value of [visible] column.
* *
@@ -973,37 +935,34 @@ abstract class Category implements ActiveRecordInterface
$col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : CategoryTableMap::translateFieldName('Parent', TableMap::TYPE_PHPNAME, $indexType)]; $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : CategoryTableMap::translateFieldName('Parent', TableMap::TYPE_PHPNAME, $indexType)];
$this->parent = (null !== $col) ? (int) $col : null; $this->parent = (null !== $col) ? (int) $col : null;
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : CategoryTableMap::translateFieldName('Link', TableMap::TYPE_PHPNAME, $indexType)]; $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : CategoryTableMap::translateFieldName('Visible', TableMap::TYPE_PHPNAME, $indexType)];
$this->link = (null !== $col) ? (string) $col : null;
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : CategoryTableMap::translateFieldName('Visible', TableMap::TYPE_PHPNAME, $indexType)];
$this->visible = (null !== $col) ? (int) $col : null; $this->visible = (null !== $col) ? (int) $col : null;
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : CategoryTableMap::translateFieldName('Position', TableMap::TYPE_PHPNAME, $indexType)]; $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : CategoryTableMap::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 ? 5 + $startcol : CategoryTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)]; $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : CategoryTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
if ($col === '0000-00-00 00:00:00') { if ($col === '0000-00-00 00:00:00') {
$col = null; $col = null;
} }
$this->created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null; $this->created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
$col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : CategoryTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)]; $col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : CategoryTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
if ($col === '0000-00-00 00:00:00') { if ($col === '0000-00-00 00:00:00') {
$col = null; $col = null;
} }
$this->updated_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null; $this->updated_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
$col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : CategoryTableMap::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)]; $col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : CategoryTableMap::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)];
$this->version = (null !== $col) ? (int) $col : null; $this->version = (null !== $col) ? (int) $col : null;
$col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : CategoryTableMap::translateFieldName('VersionCreatedAt', TableMap::TYPE_PHPNAME, $indexType)]; $col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : CategoryTableMap::translateFieldName('VersionCreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
if ($col === '0000-00-00 00:00:00') { if ($col === '0000-00-00 00:00:00') {
$col = null; $col = null;
} }
$this->version_created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null; $this->version_created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
$col = $row[TableMap::TYPE_NUM == $indexType ? 9 + $startcol : CategoryTableMap::translateFieldName('VersionCreatedBy', TableMap::TYPE_PHPNAME, $indexType)]; $col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : CategoryTableMap::translateFieldName('VersionCreatedBy', TableMap::TYPE_PHPNAME, $indexType)];
$this->version_created_by = (null !== $col) ? (string) $col : null; $this->version_created_by = (null !== $col) ? (string) $col : null;
$this->resetModified(); $this->resetModified();
@@ -1013,7 +972,7 @@ abstract class Category implements ActiveRecordInterface
$this->ensureConsistency(); $this->ensureConsistency();
} }
return $startcol + 10; // 10 = CategoryTableMap::NUM_HYDRATE_COLUMNS. return $startcol + 9; // 9 = CategoryTableMap::NUM_HYDRATE_COLUMNS.
} catch (Exception $e) { } catch (Exception $e) {
throw new PropelException("Error populating \Thelia\Model\Category object", 0, $e); throw new PropelException("Error populating \Thelia\Model\Category object", 0, $e);
@@ -1506,9 +1465,6 @@ abstract class Category implements ActiveRecordInterface
if ($this->isColumnModified(CategoryTableMap::PARENT)) { if ($this->isColumnModified(CategoryTableMap::PARENT)) {
$modifiedColumns[':p' . $index++] = 'PARENT'; $modifiedColumns[':p' . $index++] = 'PARENT';
} }
if ($this->isColumnModified(CategoryTableMap::LINK)) {
$modifiedColumns[':p' . $index++] = 'LINK';
}
if ($this->isColumnModified(CategoryTableMap::VISIBLE)) { if ($this->isColumnModified(CategoryTableMap::VISIBLE)) {
$modifiedColumns[':p' . $index++] = 'VISIBLE'; $modifiedColumns[':p' . $index++] = 'VISIBLE';
} }
@@ -1547,9 +1503,6 @@ abstract class Category implements ActiveRecordInterface
case 'PARENT': case 'PARENT':
$stmt->bindValue($identifier, $this->parent, PDO::PARAM_INT); $stmt->bindValue($identifier, $this->parent, PDO::PARAM_INT);
break; break;
case 'LINK':
$stmt->bindValue($identifier, $this->link, PDO::PARAM_STR);
break;
case 'VISIBLE': case 'VISIBLE':
$stmt->bindValue($identifier, $this->visible, PDO::PARAM_INT); $stmt->bindValue($identifier, $this->visible, PDO::PARAM_INT);
break; break;
@@ -1640,27 +1593,24 @@ abstract class Category implements ActiveRecordInterface
return $this->getParent(); return $this->getParent();
break; break;
case 2: case 2:
return $this->getLink();
break;
case 3:
return $this->getVisible(); return $this->getVisible();
break; break;
case 4: case 3:
return $this->getPosition(); return $this->getPosition();
break; break;
case 5: case 4:
return $this->getCreatedAt(); return $this->getCreatedAt();
break; break;
case 6: case 5:
return $this->getUpdatedAt(); return $this->getUpdatedAt();
break; break;
case 7: case 6:
return $this->getVersion(); return $this->getVersion();
break; break;
case 8: case 7:
return $this->getVersionCreatedAt(); return $this->getVersionCreatedAt();
break; break;
case 9: case 8:
return $this->getVersionCreatedBy(); return $this->getVersionCreatedBy();
break; break;
default: default:
@@ -1694,14 +1644,13 @@ abstract class Category implements ActiveRecordInterface
$result = array( $result = array(
$keys[0] => $this->getId(), $keys[0] => $this->getId(),
$keys[1] => $this->getParent(), $keys[1] => $this->getParent(),
$keys[2] => $this->getLink(), $keys[2] => $this->getVisible(),
$keys[3] => $this->getVisible(), $keys[3] => $this->getPosition(),
$keys[4] => $this->getPosition(), $keys[4] => $this->getCreatedAt(),
$keys[5] => $this->getCreatedAt(), $keys[5] => $this->getUpdatedAt(),
$keys[6] => $this->getUpdatedAt(), $keys[6] => $this->getVersion(),
$keys[7] => $this->getVersion(), $keys[7] => $this->getVersionCreatedAt(),
$keys[8] => $this->getVersionCreatedAt(), $keys[8] => $this->getVersionCreatedBy(),
$keys[9] => $this->getVersionCreatedBy(),
); );
$virtualColumns = $this->virtualColumns; $virtualColumns = $this->virtualColumns;
foreach($virtualColumns as $key => $virtualColumn) foreach($virtualColumns as $key => $virtualColumn)
@@ -1778,27 +1727,24 @@ abstract class Category implements ActiveRecordInterface
$this->setParent($value); $this->setParent($value);
break; break;
case 2: case 2:
$this->setLink($value);
break;
case 3:
$this->setVisible($value); $this->setVisible($value);
break; break;
case 4: case 3:
$this->setPosition($value); $this->setPosition($value);
break; break;
case 5: case 4:
$this->setCreatedAt($value); $this->setCreatedAt($value);
break; break;
case 6: case 5:
$this->setUpdatedAt($value); $this->setUpdatedAt($value);
break; break;
case 7: case 6:
$this->setVersion($value); $this->setVersion($value);
break; break;
case 8: case 7:
$this->setVersionCreatedAt($value); $this->setVersionCreatedAt($value);
break; break;
case 9: case 8:
$this->setVersionCreatedBy($value); $this->setVersionCreatedBy($value);
break; break;
} // switch() } // switch()
@@ -1827,14 +1773,13 @@ abstract class Category 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->setParent($arr[$keys[1]]); if (array_key_exists($keys[1], $arr)) $this->setParent($arr[$keys[1]]);
if (array_key_exists($keys[2], $arr)) $this->setLink($arr[$keys[2]]); if (array_key_exists($keys[2], $arr)) $this->setVisible($arr[$keys[2]]);
if (array_key_exists($keys[3], $arr)) $this->setVisible($arr[$keys[3]]); if (array_key_exists($keys[3], $arr)) $this->setPosition($arr[$keys[3]]);
if (array_key_exists($keys[4], $arr)) $this->setPosition($arr[$keys[4]]); if (array_key_exists($keys[4], $arr)) $this->setCreatedAt($arr[$keys[4]]);
if (array_key_exists($keys[5], $arr)) $this->setCreatedAt($arr[$keys[5]]); if (array_key_exists($keys[5], $arr)) $this->setUpdatedAt($arr[$keys[5]]);
if (array_key_exists($keys[6], $arr)) $this->setUpdatedAt($arr[$keys[6]]); if (array_key_exists($keys[6], $arr)) $this->setVersion($arr[$keys[6]]);
if (array_key_exists($keys[7], $arr)) $this->setVersion($arr[$keys[7]]); if (array_key_exists($keys[7], $arr)) $this->setVersionCreatedAt($arr[$keys[7]]);
if (array_key_exists($keys[8], $arr)) $this->setVersionCreatedAt($arr[$keys[8]]); if (array_key_exists($keys[8], $arr)) $this->setVersionCreatedBy($arr[$keys[8]]);
if (array_key_exists($keys[9], $arr)) $this->setVersionCreatedBy($arr[$keys[9]]);
} }
/** /**
@@ -1848,7 +1793,6 @@ abstract class Category implements ActiveRecordInterface
if ($this->isColumnModified(CategoryTableMap::ID)) $criteria->add(CategoryTableMap::ID, $this->id); if ($this->isColumnModified(CategoryTableMap::ID)) $criteria->add(CategoryTableMap::ID, $this->id);
if ($this->isColumnModified(CategoryTableMap::PARENT)) $criteria->add(CategoryTableMap::PARENT, $this->parent); if ($this->isColumnModified(CategoryTableMap::PARENT)) $criteria->add(CategoryTableMap::PARENT, $this->parent);
if ($this->isColumnModified(CategoryTableMap::LINK)) $criteria->add(CategoryTableMap::LINK, $this->link);
if ($this->isColumnModified(CategoryTableMap::VISIBLE)) $criteria->add(CategoryTableMap::VISIBLE, $this->visible); if ($this->isColumnModified(CategoryTableMap::VISIBLE)) $criteria->add(CategoryTableMap::VISIBLE, $this->visible);
if ($this->isColumnModified(CategoryTableMap::POSITION)) $criteria->add(CategoryTableMap::POSITION, $this->position); if ($this->isColumnModified(CategoryTableMap::POSITION)) $criteria->add(CategoryTableMap::POSITION, $this->position);
if ($this->isColumnModified(CategoryTableMap::CREATED_AT)) $criteria->add(CategoryTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(CategoryTableMap::CREATED_AT)) $criteria->add(CategoryTableMap::CREATED_AT, $this->created_at);
@@ -1920,7 +1864,6 @@ abstract class Category implements ActiveRecordInterface
public function copyInto($copyObj, $deepCopy = false, $makeNew = true) public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
{ {
$copyObj->setParent($this->getParent()); $copyObj->setParent($this->getParent());
$copyObj->setLink($this->getLink());
$copyObj->setVisible($this->getVisible()); $copyObj->setVisible($this->getVisible());
$copyObj->setPosition($this->getPosition()); $copyObj->setPosition($this->getPosition());
$copyObj->setCreatedAt($this->getCreatedAt()); $copyObj->setCreatedAt($this->getCreatedAt());
@@ -4939,7 +4882,6 @@ abstract class Category implements ActiveRecordInterface
{ {
$this->id = null; $this->id = null;
$this->parent = null; $this->parent = null;
$this->link = null;
$this->visible = null; $this->visible = null;
$this->position = null; $this->position = null;
$this->created_at = null; $this->created_at = null;
@@ -5352,7 +5294,6 @@ abstract class Category implements ActiveRecordInterface
$version = new ChildCategoryVersion(); $version = new ChildCategoryVersion();
$version->setId($this->getId()); $version->setId($this->getId());
$version->setParent($this->getParent()); $version->setParent($this->getParent());
$version->setLink($this->getLink());
$version->setVisible($this->getVisible()); $version->setVisible($this->getVisible());
$version->setPosition($this->getPosition()); $version->setPosition($this->getPosition());
$version->setCreatedAt($this->getCreatedAt()); $version->setCreatedAt($this->getCreatedAt());
@@ -5399,7 +5340,6 @@ abstract class Category implements ActiveRecordInterface
$loadedObjects['ChildCategory'][$version->getId()][$version->getVersion()] = $this; $loadedObjects['ChildCategory'][$version->getId()][$version->getVersion()] = $this;
$this->setId($version->getId()); $this->setId($version->getId());
$this->setParent($version->getParent()); $this->setParent($version->getParent());
$this->setLink($version->getLink());
$this->setVisible($version->getVisible()); $this->setVisible($version->getVisible());
$this->setPosition($version->getPosition()); $this->setPosition($version->getPosition());
$this->setCreatedAt($version->getCreatedAt()); $this->setCreatedAt($version->getCreatedAt());

View File

@@ -24,7 +24,6 @@ use Thelia\Model\Map\CategoryTableMap;
* *
* @method ChildCategoryQuery orderById($order = Criteria::ASC) Order by the id column * @method ChildCategoryQuery orderById($order = Criteria::ASC) Order by the id column
* @method ChildCategoryQuery orderByParent($order = Criteria::ASC) Order by the parent column * @method ChildCategoryQuery orderByParent($order = Criteria::ASC) Order by the parent column
* @method ChildCategoryQuery orderByLink($order = Criteria::ASC) Order by the link column
* @method ChildCategoryQuery orderByVisible($order = Criteria::ASC) Order by the visible column * @method ChildCategoryQuery orderByVisible($order = Criteria::ASC) Order by the visible column
* @method ChildCategoryQuery orderByPosition($order = Criteria::ASC) Order by the position column * @method ChildCategoryQuery orderByPosition($order = Criteria::ASC) Order by the position column
* @method ChildCategoryQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column * @method ChildCategoryQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
@@ -35,7 +34,6 @@ use Thelia\Model\Map\CategoryTableMap;
* *
* @method ChildCategoryQuery groupById() Group by the id column * @method ChildCategoryQuery groupById() Group by the id column
* @method ChildCategoryQuery groupByParent() Group by the parent column * @method ChildCategoryQuery groupByParent() Group by the parent column
* @method ChildCategoryQuery groupByLink() Group by the link column
* @method ChildCategoryQuery groupByVisible() Group by the visible column * @method ChildCategoryQuery groupByVisible() Group by the visible column
* @method ChildCategoryQuery groupByPosition() Group by the position column * @method ChildCategoryQuery groupByPosition() Group by the position column
* @method ChildCategoryQuery groupByCreatedAt() Group by the created_at column * @method ChildCategoryQuery groupByCreatedAt() Group by the created_at column
@@ -89,7 +87,6 @@ use Thelia\Model\Map\CategoryTableMap;
* *
* @method ChildCategory findOneById(int $id) Return the first ChildCategory filtered by the id column * @method ChildCategory findOneById(int $id) Return the first ChildCategory filtered by the id column
* @method ChildCategory findOneByParent(int $parent) Return the first ChildCategory filtered by the parent column * @method ChildCategory findOneByParent(int $parent) Return the first ChildCategory filtered by the parent column
* @method ChildCategory findOneByLink(string $link) Return the first ChildCategory filtered by the link column
* @method ChildCategory findOneByVisible(int $visible) Return the first ChildCategory filtered by the visible column * @method ChildCategory findOneByVisible(int $visible) Return the first ChildCategory filtered by the visible column
* @method ChildCategory findOneByPosition(int $position) Return the first ChildCategory filtered by the position column * @method ChildCategory findOneByPosition(int $position) Return the first ChildCategory filtered by the position column
* @method ChildCategory findOneByCreatedAt(string $created_at) Return the first ChildCategory filtered by the created_at column * @method ChildCategory findOneByCreatedAt(string $created_at) Return the first ChildCategory filtered by the created_at column
@@ -100,7 +97,6 @@ use Thelia\Model\Map\CategoryTableMap;
* *
* @method array findById(int $id) Return ChildCategory objects filtered by the id column * @method array findById(int $id) Return ChildCategory objects filtered by the id column
* @method array findByParent(int $parent) Return ChildCategory objects filtered by the parent column * @method array findByParent(int $parent) Return ChildCategory objects filtered by the parent column
* @method array findByLink(string $link) Return ChildCategory objects filtered by the link column
* @method array findByVisible(int $visible) Return ChildCategory objects filtered by the visible column * @method array findByVisible(int $visible) Return ChildCategory objects filtered by the visible column
* @method array findByPosition(int $position) Return ChildCategory objects filtered by the position column * @method array findByPosition(int $position) Return ChildCategory objects filtered by the position column
* @method array findByCreatedAt(string $created_at) Return ChildCategory objects filtered by the created_at column * @method array findByCreatedAt(string $created_at) Return ChildCategory objects filtered by the created_at column
@@ -203,7 +199,7 @@ abstract class CategoryQuery extends ModelCriteria
*/ */
protected function findPkSimple($key, $con) protected function findPkSimple($key, $con)
{ {
$sql = 'SELECT ID, PARENT, LINK, VISIBLE, POSITION, CREATED_AT, UPDATED_AT, VERSION, VERSION_CREATED_AT, VERSION_CREATED_BY FROM category WHERE ID = :p0'; $sql = 'SELECT ID, PARENT, VISIBLE, POSITION, CREATED_AT, UPDATED_AT, VERSION, VERSION_CREATED_AT, VERSION_CREATED_BY FROM category 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);
@@ -374,35 +370,6 @@ abstract class CategoryQuery extends ModelCriteria
return $this->addUsingAlias(CategoryTableMap::PARENT, $parent, $comparison); return $this->addUsingAlias(CategoryTableMap::PARENT, $parent, $comparison);
} }
/**
* Filter the query on the link column
*
* Example usage:
* <code>
* $query->filterByLink('fooValue'); // WHERE link = 'fooValue'
* $query->filterByLink('%fooValue%'); // WHERE link LIKE '%fooValue%'
* </code>
*
* @param string $link The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return ChildCategoryQuery The current query, for fluid interface
*/
public function filterByLink($link = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($link)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $link)) {
$link = str_replace('*', '%', $link);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CategoryTableMap::LINK, $link, $comparison);
}
/** /**
* Filter the query on the visible column * Filter the query on the visible column
* *

View File

@@ -67,12 +67,6 @@ abstract class CategoryVersion implements ActiveRecordInterface
*/ */
protected $parent; protected $parent;
/**
* The value for the link field.
* @var string
*/
protected $link;
/** /**
* The value for the visible field. * The value for the visible field.
* @var int * @var int
@@ -418,17 +412,6 @@ abstract class CategoryVersion implements ActiveRecordInterface
return $this->parent; return $this->parent;
} }
/**
* Get the [link] column value.
*
* @return string
*/
public function getLink()
{
return $this->link;
}
/** /**
* Get the [visible] column value. * Get the [visible] column value.
* *
@@ -579,27 +562,6 @@ abstract class CategoryVersion implements ActiveRecordInterface
return $this; return $this;
} // setParent() } // setParent()
/**
* Set the value of [link] column.
*
* @param string $v new value
* @return \Thelia\Model\CategoryVersion The current object (for fluent API support)
*/
public function setLink($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->link !== $v) {
$this->link = $v;
$this->modifiedColumns[] = CategoryVersionTableMap::LINK;
}
return $this;
} // setLink()
/** /**
* Set the value of [visible] column. * Set the value of [visible] column.
* *
@@ -794,37 +756,34 @@ abstract class CategoryVersion implements ActiveRecordInterface
$col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : CategoryVersionTableMap::translateFieldName('Parent', TableMap::TYPE_PHPNAME, $indexType)]; $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : CategoryVersionTableMap::translateFieldName('Parent', TableMap::TYPE_PHPNAME, $indexType)];
$this->parent = (null !== $col) ? (int) $col : null; $this->parent = (null !== $col) ? (int) $col : null;
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : CategoryVersionTableMap::translateFieldName('Link', TableMap::TYPE_PHPNAME, $indexType)]; $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : CategoryVersionTableMap::translateFieldName('Visible', TableMap::TYPE_PHPNAME, $indexType)];
$this->link = (null !== $col) ? (string) $col : null;
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : CategoryVersionTableMap::translateFieldName('Visible', TableMap::TYPE_PHPNAME, $indexType)];
$this->visible = (null !== $col) ? (int) $col : null; $this->visible = (null !== $col) ? (int) $col : null;
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : CategoryVersionTableMap::translateFieldName('Position', TableMap::TYPE_PHPNAME, $indexType)]; $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : CategoryVersionTableMap::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 ? 5 + $startcol : CategoryVersionTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)]; $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : CategoryVersionTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
if ($col === '0000-00-00 00:00:00') { if ($col === '0000-00-00 00:00:00') {
$col = null; $col = null;
} }
$this->created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null; $this->created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
$col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : CategoryVersionTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)]; $col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : CategoryVersionTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
if ($col === '0000-00-00 00:00:00') { if ($col === '0000-00-00 00:00:00') {
$col = null; $col = null;
} }
$this->updated_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null; $this->updated_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
$col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : CategoryVersionTableMap::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)]; $col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : CategoryVersionTableMap::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)];
$this->version = (null !== $col) ? (int) $col : null; $this->version = (null !== $col) ? (int) $col : null;
$col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : CategoryVersionTableMap::translateFieldName('VersionCreatedAt', TableMap::TYPE_PHPNAME, $indexType)]; $col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : CategoryVersionTableMap::translateFieldName('VersionCreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
if ($col === '0000-00-00 00:00:00') { if ($col === '0000-00-00 00:00:00') {
$col = null; $col = null;
} }
$this->version_created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null; $this->version_created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
$col = $row[TableMap::TYPE_NUM == $indexType ? 9 + $startcol : CategoryVersionTableMap::translateFieldName('VersionCreatedBy', TableMap::TYPE_PHPNAME, $indexType)]; $col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : CategoryVersionTableMap::translateFieldName('VersionCreatedBy', TableMap::TYPE_PHPNAME, $indexType)];
$this->version_created_by = (null !== $col) ? (string) $col : null; $this->version_created_by = (null !== $col) ? (string) $col : null;
$this->resetModified(); $this->resetModified();
@@ -834,7 +793,7 @@ abstract class CategoryVersion implements ActiveRecordInterface
$this->ensureConsistency(); $this->ensureConsistency();
} }
return $startcol + 10; // 10 = CategoryVersionTableMap::NUM_HYDRATE_COLUMNS. return $startcol + 9; // 9 = CategoryVersionTableMap::NUM_HYDRATE_COLUMNS.
} catch (Exception $e) { } catch (Exception $e) {
throw new PropelException("Error populating \Thelia\Model\CategoryVersion object", 0, $e); throw new PropelException("Error populating \Thelia\Model\CategoryVersion object", 0, $e);
@@ -1061,9 +1020,6 @@ abstract class CategoryVersion implements ActiveRecordInterface
if ($this->isColumnModified(CategoryVersionTableMap::PARENT)) { if ($this->isColumnModified(CategoryVersionTableMap::PARENT)) {
$modifiedColumns[':p' . $index++] = 'PARENT'; $modifiedColumns[':p' . $index++] = 'PARENT';
} }
if ($this->isColumnModified(CategoryVersionTableMap::LINK)) {
$modifiedColumns[':p' . $index++] = 'LINK';
}
if ($this->isColumnModified(CategoryVersionTableMap::VISIBLE)) { if ($this->isColumnModified(CategoryVersionTableMap::VISIBLE)) {
$modifiedColumns[':p' . $index++] = 'VISIBLE'; $modifiedColumns[':p' . $index++] = 'VISIBLE';
} }
@@ -1102,9 +1058,6 @@ abstract class CategoryVersion implements ActiveRecordInterface
case 'PARENT': case 'PARENT':
$stmt->bindValue($identifier, $this->parent, PDO::PARAM_INT); $stmt->bindValue($identifier, $this->parent, PDO::PARAM_INT);
break; break;
case 'LINK':
$stmt->bindValue($identifier, $this->link, PDO::PARAM_STR);
break;
case 'VISIBLE': case 'VISIBLE':
$stmt->bindValue($identifier, $this->visible, PDO::PARAM_INT); $stmt->bindValue($identifier, $this->visible, PDO::PARAM_INT);
break; break;
@@ -1188,27 +1141,24 @@ abstract class CategoryVersion implements ActiveRecordInterface
return $this->getParent(); return $this->getParent();
break; break;
case 2: case 2:
return $this->getLink();
break;
case 3:
return $this->getVisible(); return $this->getVisible();
break; break;
case 4: case 3:
return $this->getPosition(); return $this->getPosition();
break; break;
case 5: case 4:
return $this->getCreatedAt(); return $this->getCreatedAt();
break; break;
case 6: case 5:
return $this->getUpdatedAt(); return $this->getUpdatedAt();
break; break;
case 7: case 6:
return $this->getVersion(); return $this->getVersion();
break; break;
case 8: case 7:
return $this->getVersionCreatedAt(); return $this->getVersionCreatedAt();
break; break;
case 9: case 8:
return $this->getVersionCreatedBy(); return $this->getVersionCreatedBy();
break; break;
default: default:
@@ -1242,14 +1192,13 @@ abstract class CategoryVersion implements ActiveRecordInterface
$result = array( $result = array(
$keys[0] => $this->getId(), $keys[0] => $this->getId(),
$keys[1] => $this->getParent(), $keys[1] => $this->getParent(),
$keys[2] => $this->getLink(), $keys[2] => $this->getVisible(),
$keys[3] => $this->getVisible(), $keys[3] => $this->getPosition(),
$keys[4] => $this->getPosition(), $keys[4] => $this->getCreatedAt(),
$keys[5] => $this->getCreatedAt(), $keys[5] => $this->getUpdatedAt(),
$keys[6] => $this->getUpdatedAt(), $keys[6] => $this->getVersion(),
$keys[7] => $this->getVersion(), $keys[7] => $this->getVersionCreatedAt(),
$keys[8] => $this->getVersionCreatedAt(), $keys[8] => $this->getVersionCreatedBy(),
$keys[9] => $this->getVersionCreatedBy(),
); );
$virtualColumns = $this->virtualColumns; $virtualColumns = $this->virtualColumns;
foreach($virtualColumns as $key => $virtualColumn) foreach($virtualColumns as $key => $virtualColumn)
@@ -1302,27 +1251,24 @@ abstract class CategoryVersion implements ActiveRecordInterface
$this->setParent($value); $this->setParent($value);
break; break;
case 2: case 2:
$this->setLink($value);
break;
case 3:
$this->setVisible($value); $this->setVisible($value);
break; break;
case 4: case 3:
$this->setPosition($value); $this->setPosition($value);
break; break;
case 5: case 4:
$this->setCreatedAt($value); $this->setCreatedAt($value);
break; break;
case 6: case 5:
$this->setUpdatedAt($value); $this->setUpdatedAt($value);
break; break;
case 7: case 6:
$this->setVersion($value); $this->setVersion($value);
break; break;
case 8: case 7:
$this->setVersionCreatedAt($value); $this->setVersionCreatedAt($value);
break; break;
case 9: case 8:
$this->setVersionCreatedBy($value); $this->setVersionCreatedBy($value);
break; break;
} // switch() } // switch()
@@ -1351,14 +1297,13 @@ abstract class CategoryVersion 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->setParent($arr[$keys[1]]); if (array_key_exists($keys[1], $arr)) $this->setParent($arr[$keys[1]]);
if (array_key_exists($keys[2], $arr)) $this->setLink($arr[$keys[2]]); if (array_key_exists($keys[2], $arr)) $this->setVisible($arr[$keys[2]]);
if (array_key_exists($keys[3], $arr)) $this->setVisible($arr[$keys[3]]); if (array_key_exists($keys[3], $arr)) $this->setPosition($arr[$keys[3]]);
if (array_key_exists($keys[4], $arr)) $this->setPosition($arr[$keys[4]]); if (array_key_exists($keys[4], $arr)) $this->setCreatedAt($arr[$keys[4]]);
if (array_key_exists($keys[5], $arr)) $this->setCreatedAt($arr[$keys[5]]); if (array_key_exists($keys[5], $arr)) $this->setUpdatedAt($arr[$keys[5]]);
if (array_key_exists($keys[6], $arr)) $this->setUpdatedAt($arr[$keys[6]]); if (array_key_exists($keys[6], $arr)) $this->setVersion($arr[$keys[6]]);
if (array_key_exists($keys[7], $arr)) $this->setVersion($arr[$keys[7]]); if (array_key_exists($keys[7], $arr)) $this->setVersionCreatedAt($arr[$keys[7]]);
if (array_key_exists($keys[8], $arr)) $this->setVersionCreatedAt($arr[$keys[8]]); if (array_key_exists($keys[8], $arr)) $this->setVersionCreatedBy($arr[$keys[8]]);
if (array_key_exists($keys[9], $arr)) $this->setVersionCreatedBy($arr[$keys[9]]);
} }
/** /**
@@ -1372,7 +1317,6 @@ abstract class CategoryVersion implements ActiveRecordInterface
if ($this->isColumnModified(CategoryVersionTableMap::ID)) $criteria->add(CategoryVersionTableMap::ID, $this->id); if ($this->isColumnModified(CategoryVersionTableMap::ID)) $criteria->add(CategoryVersionTableMap::ID, $this->id);
if ($this->isColumnModified(CategoryVersionTableMap::PARENT)) $criteria->add(CategoryVersionTableMap::PARENT, $this->parent); if ($this->isColumnModified(CategoryVersionTableMap::PARENT)) $criteria->add(CategoryVersionTableMap::PARENT, $this->parent);
if ($this->isColumnModified(CategoryVersionTableMap::LINK)) $criteria->add(CategoryVersionTableMap::LINK, $this->link);
if ($this->isColumnModified(CategoryVersionTableMap::VISIBLE)) $criteria->add(CategoryVersionTableMap::VISIBLE, $this->visible); if ($this->isColumnModified(CategoryVersionTableMap::VISIBLE)) $criteria->add(CategoryVersionTableMap::VISIBLE, $this->visible);
if ($this->isColumnModified(CategoryVersionTableMap::POSITION)) $criteria->add(CategoryVersionTableMap::POSITION, $this->position); if ($this->isColumnModified(CategoryVersionTableMap::POSITION)) $criteria->add(CategoryVersionTableMap::POSITION, $this->position);
if ($this->isColumnModified(CategoryVersionTableMap::CREATED_AT)) $criteria->add(CategoryVersionTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(CategoryVersionTableMap::CREATED_AT)) $criteria->add(CategoryVersionTableMap::CREATED_AT, $this->created_at);
@@ -1452,7 +1396,6 @@ abstract class CategoryVersion implements ActiveRecordInterface
{ {
$copyObj->setId($this->getId()); $copyObj->setId($this->getId());
$copyObj->setParent($this->getParent()); $copyObj->setParent($this->getParent());
$copyObj->setLink($this->getLink());
$copyObj->setVisible($this->getVisible()); $copyObj->setVisible($this->getVisible());
$copyObj->setPosition($this->getPosition()); $copyObj->setPosition($this->getPosition());
$copyObj->setCreatedAt($this->getCreatedAt()); $copyObj->setCreatedAt($this->getCreatedAt());
@@ -1545,7 +1488,6 @@ abstract class CategoryVersion implements ActiveRecordInterface
{ {
$this->id = null; $this->id = null;
$this->parent = null; $this->parent = null;
$this->link = null;
$this->visible = null; $this->visible = null;
$this->position = null; $this->position = null;
$this->created_at = null; $this->created_at = null;

View File

@@ -23,7 +23,6 @@ use Thelia\Model\Map\CategoryVersionTableMap;
* *
* @method ChildCategoryVersionQuery orderById($order = Criteria::ASC) Order by the id column * @method ChildCategoryVersionQuery orderById($order = Criteria::ASC) Order by the id column
* @method ChildCategoryVersionQuery orderByParent($order = Criteria::ASC) Order by the parent column * @method ChildCategoryVersionQuery orderByParent($order = Criteria::ASC) Order by the parent column
* @method ChildCategoryVersionQuery orderByLink($order = Criteria::ASC) Order by the link column
* @method ChildCategoryVersionQuery orderByVisible($order = Criteria::ASC) Order by the visible column * @method ChildCategoryVersionQuery orderByVisible($order = Criteria::ASC) Order by the visible column
* @method ChildCategoryVersionQuery orderByPosition($order = Criteria::ASC) Order by the position column * @method ChildCategoryVersionQuery orderByPosition($order = Criteria::ASC) Order by the position column
* @method ChildCategoryVersionQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column * @method ChildCategoryVersionQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
@@ -34,7 +33,6 @@ use Thelia\Model\Map\CategoryVersionTableMap;
* *
* @method ChildCategoryVersionQuery groupById() Group by the id column * @method ChildCategoryVersionQuery groupById() Group by the id column
* @method ChildCategoryVersionQuery groupByParent() Group by the parent column * @method ChildCategoryVersionQuery groupByParent() Group by the parent column
* @method ChildCategoryVersionQuery groupByLink() Group by the link column
* @method ChildCategoryVersionQuery groupByVisible() Group by the visible column * @method ChildCategoryVersionQuery groupByVisible() Group by the visible column
* @method ChildCategoryVersionQuery groupByPosition() Group by the position column * @method ChildCategoryVersionQuery groupByPosition() Group by the position column
* @method ChildCategoryVersionQuery groupByCreatedAt() Group by the created_at column * @method ChildCategoryVersionQuery groupByCreatedAt() Group by the created_at column
@@ -56,7 +54,6 @@ use Thelia\Model\Map\CategoryVersionTableMap;
* *
* @method ChildCategoryVersion findOneById(int $id) Return the first ChildCategoryVersion filtered by the id column * @method ChildCategoryVersion findOneById(int $id) Return the first ChildCategoryVersion filtered by the id column
* @method ChildCategoryVersion findOneByParent(int $parent) Return the first ChildCategoryVersion filtered by the parent column * @method ChildCategoryVersion findOneByParent(int $parent) Return the first ChildCategoryVersion filtered by the parent column
* @method ChildCategoryVersion findOneByLink(string $link) Return the first ChildCategoryVersion filtered by the link column
* @method ChildCategoryVersion findOneByVisible(int $visible) Return the first ChildCategoryVersion filtered by the visible column * @method ChildCategoryVersion findOneByVisible(int $visible) Return the first ChildCategoryVersion filtered by the visible column
* @method ChildCategoryVersion findOneByPosition(int $position) Return the first ChildCategoryVersion filtered by the position column * @method ChildCategoryVersion findOneByPosition(int $position) Return the first ChildCategoryVersion filtered by the position column
* @method ChildCategoryVersion findOneByCreatedAt(string $created_at) Return the first ChildCategoryVersion filtered by the created_at column * @method ChildCategoryVersion findOneByCreatedAt(string $created_at) Return the first ChildCategoryVersion filtered by the created_at column
@@ -67,7 +64,6 @@ use Thelia\Model\Map\CategoryVersionTableMap;
* *
* @method array findById(int $id) Return ChildCategoryVersion objects filtered by the id column * @method array findById(int $id) Return ChildCategoryVersion objects filtered by the id column
* @method array findByParent(int $parent) Return ChildCategoryVersion objects filtered by the parent column * @method array findByParent(int $parent) Return ChildCategoryVersion objects filtered by the parent column
* @method array findByLink(string $link) Return ChildCategoryVersion objects filtered by the link column
* @method array findByVisible(int $visible) Return ChildCategoryVersion objects filtered by the visible column * @method array findByVisible(int $visible) Return ChildCategoryVersion objects filtered by the visible column
* @method array findByPosition(int $position) Return ChildCategoryVersion objects filtered by the position column * @method array findByPosition(int $position) Return ChildCategoryVersion objects filtered by the position column
* @method array findByCreatedAt(string $created_at) Return ChildCategoryVersion objects filtered by the created_at column * @method array findByCreatedAt(string $created_at) Return ChildCategoryVersion objects filtered by the created_at column
@@ -163,7 +159,7 @@ abstract class CategoryVersionQuery extends ModelCriteria
*/ */
protected function findPkSimple($key, $con) protected function findPkSimple($key, $con)
{ {
$sql = 'SELECT ID, PARENT, LINK, VISIBLE, POSITION, CREATED_AT, UPDATED_AT, VERSION, VERSION_CREATED_AT, VERSION_CREATED_BY FROM category_version WHERE ID = :p0 AND VERSION = :p1'; $sql = 'SELECT ID, PARENT, VISIBLE, POSITION, CREATED_AT, UPDATED_AT, VERSION, VERSION_CREATED_AT, VERSION_CREATED_BY FROM category_version WHERE ID = :p0 AND VERSION = :p1';
try { try {
$stmt = $con->prepare($sql); $stmt = $con->prepare($sql);
$stmt->bindValue(':p0', $key[0], PDO::PARAM_INT); $stmt->bindValue(':p0', $key[0], PDO::PARAM_INT);
@@ -348,35 +344,6 @@ abstract class CategoryVersionQuery extends ModelCriteria
return $this->addUsingAlias(CategoryVersionTableMap::PARENT, $parent, $comparison); return $this->addUsingAlias(CategoryVersionTableMap::PARENT, $parent, $comparison);
} }
/**
* Filter the query on the link column
*
* Example usage:
* <code>
* $query->filterByLink('fooValue'); // WHERE link = 'fooValue'
* $query->filterByLink('%fooValue%'); // WHERE link LIKE '%fooValue%'
* </code>
*
* @param string $link The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return ChildCategoryVersionQuery The current query, for fluid interface
*/
public function filterByLink($link = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($link)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $link)) {
$link = str_replace('*', '%', $link);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CategoryVersionTableMap::LINK, $link, $comparison);
}
/** /**
* Filter the query on the visible column * Filter the query on the visible column
* *

View File

@@ -57,7 +57,7 @@ class CategoryTableMap extends TableMap
/** /**
* The total number of columns * The total number of columns
*/ */
const NUM_COLUMNS = 10; const NUM_COLUMNS = 9;
/** /**
* The number of lazy-loaded columns * The number of lazy-loaded columns
@@ -67,7 +67,7 @@ class CategoryTableMap extends TableMap
/** /**
* The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS) * The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS)
*/ */
const NUM_HYDRATE_COLUMNS = 10; const NUM_HYDRATE_COLUMNS = 9;
/** /**
* the column name for the ID field * the column name for the ID field
@@ -79,11 +79,6 @@ class CategoryTableMap extends TableMap
*/ */
const PARENT = 'category.PARENT'; const PARENT = 'category.PARENT';
/**
* the column name for the LINK field
*/
const LINK = 'category.LINK';
/** /**
* the column name for the VISIBLE field * the column name for the VISIBLE field
*/ */
@@ -140,12 +135,12 @@ class CategoryTableMap 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', 'Parent', 'Link', 'Visible', 'Position', 'CreatedAt', 'UpdatedAt', 'Version', 'VersionCreatedAt', 'VersionCreatedBy', ), self::TYPE_PHPNAME => array('Id', 'Parent', 'Visible', 'Position', 'CreatedAt', 'UpdatedAt', 'Version', 'VersionCreatedAt', 'VersionCreatedBy', ),
self::TYPE_STUDLYPHPNAME => array('id', 'parent', 'link', 'visible', 'position', 'createdAt', 'updatedAt', 'version', 'versionCreatedAt', 'versionCreatedBy', ), self::TYPE_STUDLYPHPNAME => array('id', 'parent', 'visible', 'position', 'createdAt', 'updatedAt', 'version', 'versionCreatedAt', 'versionCreatedBy', ),
self::TYPE_COLNAME => array(CategoryTableMap::ID, CategoryTableMap::PARENT, CategoryTableMap::LINK, CategoryTableMap::VISIBLE, CategoryTableMap::POSITION, CategoryTableMap::CREATED_AT, CategoryTableMap::UPDATED_AT, CategoryTableMap::VERSION, CategoryTableMap::VERSION_CREATED_AT, CategoryTableMap::VERSION_CREATED_BY, ), self::TYPE_COLNAME => array(CategoryTableMap::ID, CategoryTableMap::PARENT, CategoryTableMap::VISIBLE, CategoryTableMap::POSITION, CategoryTableMap::CREATED_AT, CategoryTableMap::UPDATED_AT, CategoryTableMap::VERSION, CategoryTableMap::VERSION_CREATED_AT, CategoryTableMap::VERSION_CREATED_BY, ),
self::TYPE_RAW_COLNAME => array('ID', 'PARENT', 'LINK', 'VISIBLE', 'POSITION', 'CREATED_AT', 'UPDATED_AT', 'VERSION', 'VERSION_CREATED_AT', 'VERSION_CREATED_BY', ), self::TYPE_RAW_COLNAME => array('ID', 'PARENT', 'VISIBLE', 'POSITION', 'CREATED_AT', 'UPDATED_AT', 'VERSION', 'VERSION_CREATED_AT', 'VERSION_CREATED_BY', ),
self::TYPE_FIELDNAME => array('id', 'parent', 'link', 'visible', 'position', 'created_at', 'updated_at', 'version', 'version_created_at', 'version_created_by', ), self::TYPE_FIELDNAME => array('id', 'parent', 'visible', 'position', 'created_at', 'updated_at', 'version', 'version_created_at', 'version_created_by', ),
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ) self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, )
); );
/** /**
@@ -155,12 +150,12 @@ class CategoryTableMap 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, 'Parent' => 1, 'Link' => 2, 'Visible' => 3, 'Position' => 4, 'CreatedAt' => 5, 'UpdatedAt' => 6, 'Version' => 7, 'VersionCreatedAt' => 8, 'VersionCreatedBy' => 9, ), self::TYPE_PHPNAME => array('Id' => 0, 'Parent' => 1, 'Visible' => 2, 'Position' => 3, 'CreatedAt' => 4, 'UpdatedAt' => 5, 'Version' => 6, 'VersionCreatedAt' => 7, 'VersionCreatedBy' => 8, ),
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'parent' => 1, 'link' => 2, 'visible' => 3, 'position' => 4, 'createdAt' => 5, 'updatedAt' => 6, 'version' => 7, 'versionCreatedAt' => 8, 'versionCreatedBy' => 9, ), self::TYPE_STUDLYPHPNAME => array('id' => 0, 'parent' => 1, 'visible' => 2, 'position' => 3, 'createdAt' => 4, 'updatedAt' => 5, 'version' => 6, 'versionCreatedAt' => 7, 'versionCreatedBy' => 8, ),
self::TYPE_COLNAME => array(CategoryTableMap::ID => 0, CategoryTableMap::PARENT => 1, CategoryTableMap::LINK => 2, CategoryTableMap::VISIBLE => 3, CategoryTableMap::POSITION => 4, CategoryTableMap::CREATED_AT => 5, CategoryTableMap::UPDATED_AT => 6, CategoryTableMap::VERSION => 7, CategoryTableMap::VERSION_CREATED_AT => 8, CategoryTableMap::VERSION_CREATED_BY => 9, ), self::TYPE_COLNAME => array(CategoryTableMap::ID => 0, CategoryTableMap::PARENT => 1, CategoryTableMap::VISIBLE => 2, CategoryTableMap::POSITION => 3, CategoryTableMap::CREATED_AT => 4, CategoryTableMap::UPDATED_AT => 5, CategoryTableMap::VERSION => 6, CategoryTableMap::VERSION_CREATED_AT => 7, CategoryTableMap::VERSION_CREATED_BY => 8, ),
self::TYPE_RAW_COLNAME => array('ID' => 0, 'PARENT' => 1, 'LINK' => 2, 'VISIBLE' => 3, 'POSITION' => 4, 'CREATED_AT' => 5, 'UPDATED_AT' => 6, 'VERSION' => 7, 'VERSION_CREATED_AT' => 8, 'VERSION_CREATED_BY' => 9, ), self::TYPE_RAW_COLNAME => array('ID' => 0, 'PARENT' => 1, 'VISIBLE' => 2, 'POSITION' => 3, 'CREATED_AT' => 4, 'UPDATED_AT' => 5, 'VERSION' => 6, 'VERSION_CREATED_AT' => 7, 'VERSION_CREATED_BY' => 8, ),
self::TYPE_FIELDNAME => array('id' => 0, 'parent' => 1, 'link' => 2, 'visible' => 3, 'position' => 4, 'created_at' => 5, 'updated_at' => 6, 'version' => 7, 'version_created_at' => 8, 'version_created_by' => 9, ), self::TYPE_FIELDNAME => array('id' => 0, 'parent' => 1, 'visible' => 2, 'position' => 3, 'created_at' => 4, 'updated_at' => 5, 'version' => 6, 'version_created_at' => 7, 'version_created_by' => 8, ),
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ) self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, )
); );
/** /**
@@ -181,7 +176,6 @@ class CategoryTableMap extends TableMap
// columns // columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null); $this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addColumn('PARENT', 'Parent', 'INTEGER', false, null, null); $this->addColumn('PARENT', 'Parent', 'INTEGER', false, null, null);
$this->addColumn('LINK', 'Link', 'VARCHAR', false, 255, null);
$this->addColumn('VISIBLE', 'Visible', 'TINYINT', true, null, null); $this->addColumn('VISIBLE', 'Visible', 'TINYINT', true, null, null);
$this->addColumn('POSITION', 'Position', 'INTEGER', true, null, null); $this->addColumn('POSITION', 'Position', 'INTEGER', true, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null); $this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
@@ -382,7 +376,6 @@ class CategoryTableMap extends TableMap
if (null === $alias) { if (null === $alias) {
$criteria->addSelectColumn(CategoryTableMap::ID); $criteria->addSelectColumn(CategoryTableMap::ID);
$criteria->addSelectColumn(CategoryTableMap::PARENT); $criteria->addSelectColumn(CategoryTableMap::PARENT);
$criteria->addSelectColumn(CategoryTableMap::LINK);
$criteria->addSelectColumn(CategoryTableMap::VISIBLE); $criteria->addSelectColumn(CategoryTableMap::VISIBLE);
$criteria->addSelectColumn(CategoryTableMap::POSITION); $criteria->addSelectColumn(CategoryTableMap::POSITION);
$criteria->addSelectColumn(CategoryTableMap::CREATED_AT); $criteria->addSelectColumn(CategoryTableMap::CREATED_AT);
@@ -393,7 +386,6 @@ class CategoryTableMap extends TableMap
} else { } else {
$criteria->addSelectColumn($alias . '.ID'); $criteria->addSelectColumn($alias . '.ID');
$criteria->addSelectColumn($alias . '.PARENT'); $criteria->addSelectColumn($alias . '.PARENT');
$criteria->addSelectColumn($alias . '.LINK');
$criteria->addSelectColumn($alias . '.VISIBLE'); $criteria->addSelectColumn($alias . '.VISIBLE');
$criteria->addSelectColumn($alias . '.POSITION'); $criteria->addSelectColumn($alias . '.POSITION');
$criteria->addSelectColumn($alias . '.CREATED_AT'); $criteria->addSelectColumn($alias . '.CREATED_AT');

View File

@@ -57,7 +57,7 @@ class CategoryVersionTableMap extends TableMap
/** /**
* The total number of columns * The total number of columns
*/ */
const NUM_COLUMNS = 10; const NUM_COLUMNS = 9;
/** /**
* The number of lazy-loaded columns * The number of lazy-loaded columns
@@ -67,7 +67,7 @@ class CategoryVersionTableMap extends TableMap
/** /**
* The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS) * The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS)
*/ */
const NUM_HYDRATE_COLUMNS = 10; const NUM_HYDRATE_COLUMNS = 9;
/** /**
* the column name for the ID field * the column name for the ID field
@@ -79,11 +79,6 @@ class CategoryVersionTableMap extends TableMap
*/ */
const PARENT = 'category_version.PARENT'; const PARENT = 'category_version.PARENT';
/**
* the column name for the LINK field
*/
const LINK = 'category_version.LINK';
/** /**
* the column name for the VISIBLE field * the column name for the VISIBLE field
*/ */
@@ -131,12 +126,12 @@ class CategoryVersionTableMap 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', 'Parent', 'Link', 'Visible', 'Position', 'CreatedAt', 'UpdatedAt', 'Version', 'VersionCreatedAt', 'VersionCreatedBy', ), self::TYPE_PHPNAME => array('Id', 'Parent', 'Visible', 'Position', 'CreatedAt', 'UpdatedAt', 'Version', 'VersionCreatedAt', 'VersionCreatedBy', ),
self::TYPE_STUDLYPHPNAME => array('id', 'parent', 'link', 'visible', 'position', 'createdAt', 'updatedAt', 'version', 'versionCreatedAt', 'versionCreatedBy', ), self::TYPE_STUDLYPHPNAME => array('id', 'parent', 'visible', 'position', 'createdAt', 'updatedAt', 'version', 'versionCreatedAt', 'versionCreatedBy', ),
self::TYPE_COLNAME => array(CategoryVersionTableMap::ID, CategoryVersionTableMap::PARENT, CategoryVersionTableMap::LINK, CategoryVersionTableMap::VISIBLE, CategoryVersionTableMap::POSITION, CategoryVersionTableMap::CREATED_AT, CategoryVersionTableMap::UPDATED_AT, CategoryVersionTableMap::VERSION, CategoryVersionTableMap::VERSION_CREATED_AT, CategoryVersionTableMap::VERSION_CREATED_BY, ), self::TYPE_COLNAME => array(CategoryVersionTableMap::ID, CategoryVersionTableMap::PARENT, CategoryVersionTableMap::VISIBLE, CategoryVersionTableMap::POSITION, CategoryVersionTableMap::CREATED_AT, CategoryVersionTableMap::UPDATED_AT, CategoryVersionTableMap::VERSION, CategoryVersionTableMap::VERSION_CREATED_AT, CategoryVersionTableMap::VERSION_CREATED_BY, ),
self::TYPE_RAW_COLNAME => array('ID', 'PARENT', 'LINK', 'VISIBLE', 'POSITION', 'CREATED_AT', 'UPDATED_AT', 'VERSION', 'VERSION_CREATED_AT', 'VERSION_CREATED_BY', ), self::TYPE_RAW_COLNAME => array('ID', 'PARENT', 'VISIBLE', 'POSITION', 'CREATED_AT', 'UPDATED_AT', 'VERSION', 'VERSION_CREATED_AT', 'VERSION_CREATED_BY', ),
self::TYPE_FIELDNAME => array('id', 'parent', 'link', 'visible', 'position', 'created_at', 'updated_at', 'version', 'version_created_at', 'version_created_by', ), self::TYPE_FIELDNAME => array('id', 'parent', 'visible', 'position', 'created_at', 'updated_at', 'version', 'version_created_at', 'version_created_by', ),
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ) self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, )
); );
/** /**
@@ -146,12 +141,12 @@ class CategoryVersionTableMap 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, 'Parent' => 1, 'Link' => 2, 'Visible' => 3, 'Position' => 4, 'CreatedAt' => 5, 'UpdatedAt' => 6, 'Version' => 7, 'VersionCreatedAt' => 8, 'VersionCreatedBy' => 9, ), self::TYPE_PHPNAME => array('Id' => 0, 'Parent' => 1, 'Visible' => 2, 'Position' => 3, 'CreatedAt' => 4, 'UpdatedAt' => 5, 'Version' => 6, 'VersionCreatedAt' => 7, 'VersionCreatedBy' => 8, ),
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'parent' => 1, 'link' => 2, 'visible' => 3, 'position' => 4, 'createdAt' => 5, 'updatedAt' => 6, 'version' => 7, 'versionCreatedAt' => 8, 'versionCreatedBy' => 9, ), self::TYPE_STUDLYPHPNAME => array('id' => 0, 'parent' => 1, 'visible' => 2, 'position' => 3, 'createdAt' => 4, 'updatedAt' => 5, 'version' => 6, 'versionCreatedAt' => 7, 'versionCreatedBy' => 8, ),
self::TYPE_COLNAME => array(CategoryVersionTableMap::ID => 0, CategoryVersionTableMap::PARENT => 1, CategoryVersionTableMap::LINK => 2, CategoryVersionTableMap::VISIBLE => 3, CategoryVersionTableMap::POSITION => 4, CategoryVersionTableMap::CREATED_AT => 5, CategoryVersionTableMap::UPDATED_AT => 6, CategoryVersionTableMap::VERSION => 7, CategoryVersionTableMap::VERSION_CREATED_AT => 8, CategoryVersionTableMap::VERSION_CREATED_BY => 9, ), self::TYPE_COLNAME => array(CategoryVersionTableMap::ID => 0, CategoryVersionTableMap::PARENT => 1, CategoryVersionTableMap::VISIBLE => 2, CategoryVersionTableMap::POSITION => 3, CategoryVersionTableMap::CREATED_AT => 4, CategoryVersionTableMap::UPDATED_AT => 5, CategoryVersionTableMap::VERSION => 6, CategoryVersionTableMap::VERSION_CREATED_AT => 7, CategoryVersionTableMap::VERSION_CREATED_BY => 8, ),
self::TYPE_RAW_COLNAME => array('ID' => 0, 'PARENT' => 1, 'LINK' => 2, 'VISIBLE' => 3, 'POSITION' => 4, 'CREATED_AT' => 5, 'UPDATED_AT' => 6, 'VERSION' => 7, 'VERSION_CREATED_AT' => 8, 'VERSION_CREATED_BY' => 9, ), self::TYPE_RAW_COLNAME => array('ID' => 0, 'PARENT' => 1, 'VISIBLE' => 2, 'POSITION' => 3, 'CREATED_AT' => 4, 'UPDATED_AT' => 5, 'VERSION' => 6, 'VERSION_CREATED_AT' => 7, 'VERSION_CREATED_BY' => 8, ),
self::TYPE_FIELDNAME => array('id' => 0, 'parent' => 1, 'link' => 2, 'visible' => 3, 'position' => 4, 'created_at' => 5, 'updated_at' => 6, 'version' => 7, 'version_created_at' => 8, 'version_created_by' => 9, ), self::TYPE_FIELDNAME => array('id' => 0, 'parent' => 1, 'visible' => 2, 'position' => 3, 'created_at' => 4, 'updated_at' => 5, 'version' => 6, 'version_created_at' => 7, 'version_created_by' => 8, ),
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ) self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, )
); );
/** /**
@@ -172,7 +167,6 @@ class CategoryVersionTableMap extends TableMap
// columns // columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'category', 'ID', true, null, null); $this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'category', 'ID', true, null, null);
$this->addColumn('PARENT', 'Parent', 'INTEGER', false, null, null); $this->addColumn('PARENT', 'Parent', 'INTEGER', false, null, null);
$this->addColumn('LINK', 'Link', 'VARCHAR', false, 255, null);
$this->addColumn('VISIBLE', 'Visible', 'TINYINT', true, null, null); $this->addColumn('VISIBLE', 'Visible', 'TINYINT', true, null, null);
$this->addColumn('POSITION', 'Position', 'INTEGER', true, null, null); $this->addColumn('POSITION', 'Position', 'INTEGER', true, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null); $this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
@@ -257,11 +251,11 @@ class CategoryVersionTableMap extends TableMap
public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
{ {
// If the PK cannot be derived from the row, return NULL. // If the PK cannot be derived from the row, return NULL.
if ($row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)] === null && $row[TableMap::TYPE_NUM == $indexType ? 7 + $offset : static::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)] === null) { if ($row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)] === null && $row[TableMap::TYPE_NUM == $indexType ? 6 + $offset : static::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)] === null) {
return null; return null;
} }
return serialize(array((string) $row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)], (string) $row[TableMap::TYPE_NUM == $indexType ? 7 + $offset : static::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)])); return serialize(array((string) $row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)], (string) $row[TableMap::TYPE_NUM == $indexType ? 6 + $offset : static::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)]));
} }
/** /**
@@ -379,7 +373,6 @@ class CategoryVersionTableMap extends TableMap
if (null === $alias) { if (null === $alias) {
$criteria->addSelectColumn(CategoryVersionTableMap::ID); $criteria->addSelectColumn(CategoryVersionTableMap::ID);
$criteria->addSelectColumn(CategoryVersionTableMap::PARENT); $criteria->addSelectColumn(CategoryVersionTableMap::PARENT);
$criteria->addSelectColumn(CategoryVersionTableMap::LINK);
$criteria->addSelectColumn(CategoryVersionTableMap::VISIBLE); $criteria->addSelectColumn(CategoryVersionTableMap::VISIBLE);
$criteria->addSelectColumn(CategoryVersionTableMap::POSITION); $criteria->addSelectColumn(CategoryVersionTableMap::POSITION);
$criteria->addSelectColumn(CategoryVersionTableMap::CREATED_AT); $criteria->addSelectColumn(CategoryVersionTableMap::CREATED_AT);
@@ -390,7 +383,6 @@ class CategoryVersionTableMap extends TableMap
} else { } else {
$criteria->addSelectColumn($alias . '.ID'); $criteria->addSelectColumn($alias . '.ID');
$criteria->addSelectColumn($alias . '.PARENT'); $criteria->addSelectColumn($alias . '.PARENT');
$criteria->addSelectColumn($alias . '.LINK');
$criteria->addSelectColumn($alias . '.VISIBLE'); $criteria->addSelectColumn($alias . '.VISIBLE');
$criteria->addSelectColumn($alias . '.POSITION'); $criteria->addSelectColumn($alias . '.POSITION');
$criteria->addSelectColumn($alias . '.CREATED_AT'); $criteria->addSelectColumn($alias . '.CREATED_AT');

View File

@@ -13,7 +13,6 @@ CREATE TABLE `category`
( (
`id` INTEGER NOT NULL AUTO_INCREMENT, `id` INTEGER NOT NULL AUTO_INCREMENT,
`parent` INTEGER, `parent` INTEGER,
`link` VARCHAR(255),
`visible` TINYINT NOT NULL, `visible` TINYINT NOT NULL,
`position` INTEGER NOT NULL, `position` INTEGER NOT NULL,
`created_at` DATETIME, `created_at` DATETIME,
@@ -1775,7 +1774,6 @@ CREATE TABLE `category_version`
( (
`id` INTEGER NOT NULL, `id` INTEGER NOT NULL,
`parent` INTEGER, `parent` INTEGER,
`link` VARCHAR(255),
`visible` TINYINT NOT NULL, `visible` TINYINT NOT NULL,
`position` INTEGER NOT NULL, `position` INTEGER NOT NULL,
`created_at` DATETIME, `created_at` DATETIME,

View File

@@ -3,7 +3,6 @@
<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" />
<column name="link" size="255" type="VARCHAR" />
<column name="visible" required="true" type="TINYINT" /> <column name="visible" required="true" type="TINYINT" />
<column name="position" required="true" type="INTEGER" /> <column name="position" required="true" type="INTEGER" />
<column name="title" size="255" type="VARCHAR" /> <column name="title" size="255" type="VARCHAR" />