Split import export management in two
modifié: core/lib/Thelia/Config/Resources/config.xml modifié: core/lib/Thelia/Config/Resources/loop.xml modifié: core/lib/Thelia/Config/Resources/routing/admin.xml nouveau fichier: core/lib/Thelia/Controller/Admin/ImportExportController.php nouveau fichier: core/lib/Thelia/Core/Template/Loop/Export.php nouveau fichier: core/lib/Thelia/Core/Template/Loop/ExportCategory.php nouveau fichier: core/lib/Thelia/Core/Template/Loop/Import.php nouveau fichier: core/lib/Thelia/Core/Template/Loop/ImportCategory.php modifié: core/lib/Thelia/Core/Template/Loop/ImportExportCategory.php modifié: core/lib/Thelia/Core/Template/Loop/ImportExportType.php nouveau fichier: core/lib/Thelia/Model/Base/Export.php nouveau fichier: core/lib/Thelia/Model/Base/ExportCategory.php nouveau fichier: core/lib/Thelia/Model/Base/ExportCategoryI18n.php nouveau fichier: core/lib/Thelia/Model/Base/ExportCategoryI18nQuery.php nouveau fichier: core/lib/Thelia/Model/Base/ExportCategoryQuery.php nouveau fichier: core/lib/Thelia/Model/Base/ExportI18n.php nouveau fichier: core/lib/Thelia/Model/Base/ExportI18nQuery.php nouveau fichier: core/lib/Thelia/Model/Base/ExportQuery.php renommé: core/lib/Thelia/Model/Base/ImportExportType.php -> core/lib/Thelia/Model/Base/Import.php renommé: core/lib/Thelia/Model/Base/ImportExportCategory.php -> core/lib/Thelia/Model/Base/ImportCategory.php renommé: core/lib/Thelia/Model/Base/ImportExportCategoryI18n.php -> core/lib/Thelia/Model/Base/ImportCategoryI18n.php renommé: core/lib/Thelia/Model/Base/ImportExportCategoryI18nQuery.php -> core/lib/Thelia/Model/Base/ImportCategoryI18nQuery.php renommé: core/lib/Thelia/Model/Base/ImportExportCategoryQuery.php -> core/lib/Thelia/Model/Base/ImportCategoryQuery.php renommé: core/lib/Thelia/Model/Base/ImportExportTypeI18n.php -> core/lib/Thelia/Model/Base/ImportI18n.php renommé: core/lib/Thelia/Model/Base/ImportExportTypeI18nQuery.php -> core/lib/Thelia/Model/Base/ImportI18nQuery.php renommé: core/lib/Thelia/Model/Base/ImportExportTypeQuery.php -> core/lib/Thelia/Model/Base/ImportQuery.php nouveau fichier: core/lib/Thelia/Model/Export.php nouveau fichier: core/lib/Thelia/Model/ExportCategory.php nouveau fichier: core/lib/Thelia/Model/ExportCategoryI18n.php renommé: core/lib/Thelia/Model/ImportExportCategoryQuery.php -> core/lib/Thelia/Model/ExportCategoryI18nQuery.php renommé: core/lib/Thelia/Model/ImportExportTypeQuery.php -> core/lib/Thelia/Model/ExportCategoryQuery.php nouveau fichier: core/lib/Thelia/Model/ExportI18n.php renommé: core/lib/Thelia/Model/ImportExportTypeI18nQuery.php -> core/lib/Thelia/Model/ExportI18nQuery.php renommé: core/lib/Thelia/Model/ImportExportCategoryI18nQuery.php -> core/lib/Thelia/Model/ExportQuery.php nouveau fichier: core/lib/Thelia/Model/Import.php nouveau fichier: core/lib/Thelia/Model/ImportCategory.php nouveau fichier: core/lib/Thelia/Model/ImportCategoryI18n.php nouveau fichier: core/lib/Thelia/Model/ImportCategoryI18nQuery.php nouveau fichier: core/lib/Thelia/Model/ImportCategoryQuery.php supprimé: core/lib/Thelia/Model/ImportExportCategory.php supprimé: core/lib/Thelia/Model/ImportExportCategoryI18n.php supprimé: core/lib/Thelia/Model/ImportExportType.php supprimé: core/lib/Thelia/Model/ImportExportTypeI18n.php nouveau fichier: core/lib/Thelia/Model/ImportI18n.php nouveau fichier: core/lib/Thelia/Model/ImportI18nQuery.php nouveau fichier: core/lib/Thelia/Model/ImportQuery.php nouveau fichier: core/lib/Thelia/Model/Map/ExportCategoryI18nTableMap.php nouveau fichier: core/lib/Thelia/Model/Map/ExportCategoryTableMap.php nouveau fichier: core/lib/Thelia/Model/Map/ExportI18nTableMap.php nouveau fichier: core/lib/Thelia/Model/Map/ExportTableMap.php renommé: core/lib/Thelia/Model/Map/ImportExportCategoryI18nTableMap.php -> core/lib/Thelia/Model/Map/ImportCategoryI18nTableMap.php renommé: core/lib/Thelia/Model/Map/ImportExportCategoryTableMap.php -> core/lib/Thelia/Model/Map/ImportCategoryTableMap.php renommé: core/lib/Thelia/Model/Map/ImportExportTypeI18nTableMap.php -> core/lib/Thelia/Model/Map/ImportI18nTableMap.php renommé: core/lib/Thelia/Model/Map/ImportExportTypeTableMap.php -> core/lib/Thelia/Model/Map/ImportTableMap.php modifié: local/config/schema.xml modifié: setup/thelia.sql modifié: templates/backOffice/default/export.html
This commit is contained in:
@@ -34,6 +34,8 @@
|
|||||||
<parameter key="image.brand">Thelia\Model\BrandImage</parameter>
|
<parameter key="image.brand">Thelia\Model\BrandImage</parameter>
|
||||||
</parameter>
|
</parameter>
|
||||||
|
|
||||||
|
<parameter key="import.base_url">/admin/import</parameter>
|
||||||
|
<parameter key="export.base_url">/admin/export</parameter>
|
||||||
</parameters>
|
</parameters>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -57,7 +57,10 @@
|
|||||||
<loop class="Thelia\Core\Template\Loop\TaxRuleCountry" name="tax-rule-country"/>
|
<loop class="Thelia\Core\Template\Loop\TaxRuleCountry" name="tax-rule-country"/>
|
||||||
<loop class="Thelia\Core\Template\Loop\Formatter" name="formatter" />
|
<loop class="Thelia\Core\Template\Loop\Formatter" name="formatter" />
|
||||||
<loop class="Thelia\Core\Template\Loop\ArchiveBuilder" name="archive-builder" />
|
<loop class="Thelia\Core\Template\Loop\ArchiveBuilder" name="archive-builder" />
|
||||||
<loop class="Thelia\Core\Template\Loop\ImportExportCategory" name="import-export-category" />
|
<loop class="Thelia\Core\Template\Loop\ImportCategory" name="import-category" />
|
||||||
|
<loop class="Thelia\Core\Template\Loop\ExportCategory" name="export-category" />
|
||||||
|
<loop class="Thelia\Core\Template\Loop\Import" name="import" />
|
||||||
|
<loop class="Thelia\Core\Template\Loop\Export" name="export" />
|
||||||
</loops>
|
</loops>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1160,13 +1160,14 @@
|
|||||||
|
|
||||||
<!-- export management -->
|
<!-- export management -->
|
||||||
|
|
||||||
<route id="export.main" path="/admin/export">
|
<route id="export.generic" path="/admin/export/{key}">
|
||||||
<default key="_controller">Thelia\Controller\Admin\ExportController::indexAction</default>
|
<default key="_controller">Thelia\Controller\Admin\ImportExportController::export</default>
|
||||||
|
<requirement key="key">\d+</requirement>
|
||||||
</route>
|
</route>
|
||||||
|
|
||||||
<route id="export.customer.newsletter" path="/admin/export/{exportType}">
|
<route id="import.generic" path="/admin/import/{key}">
|
||||||
<default key="_controller">Thelia\Controller\Admin\ExportController::export</default>
|
<default key="_controller">Thelia\Controller\Admin\ImportExportController::import</default>
|
||||||
<requirement key="exportType">.+</requirement>
|
<requirement key="key">\d+</requirement>
|
||||||
</route>
|
</route>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
31
core/lib/Thelia/Controller/Admin/ImportExportController.php
Normal file
31
core/lib/Thelia/Controller/Admin/ImportExportController.php
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
/*************************************************************************************/
|
||||||
|
/* This file is part of the Thelia package. */
|
||||||
|
/* */
|
||||||
|
/* Copyright (c) OpenStudio */
|
||||||
|
/* email : dev@thelia.net */
|
||||||
|
/* web : http://www.thelia.net */
|
||||||
|
/* */
|
||||||
|
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||||
|
/* file that was distributed with this source code. */
|
||||||
|
/*************************************************************************************/
|
||||||
|
|
||||||
|
namespace Thelia\Controller\Admin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class ImportExportController
|
||||||
|
* @package Thelia\Controller\Admin
|
||||||
|
* @author Benjamin Perche <bperche@openstudio.fr>
|
||||||
|
*/
|
||||||
|
class ImportExportController extends BaseAdminController
|
||||||
|
{
|
||||||
|
public function import()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function export()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
38
core/lib/Thelia/Core/Template/Loop/Export.php
Normal file
38
core/lib/Thelia/Core/Template/Loop/Export.php
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
<?php
|
||||||
|
/*************************************************************************************/
|
||||||
|
/* This file is part of the Thelia package. */
|
||||||
|
/* */
|
||||||
|
/* Copyright (c) OpenStudio */
|
||||||
|
/* email : dev@thelia.net */
|
||||||
|
/* web : http://www.thelia.net */
|
||||||
|
/* */
|
||||||
|
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||||
|
/* file that was distributed with this source code. */
|
||||||
|
/*************************************************************************************/
|
||||||
|
|
||||||
|
namespace Thelia\Core\Template\Loop;
|
||||||
|
use Thelia\Model\ExportQuery;
|
||||||
|
use Thelia\Model\Map\ExportTableMap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class Export
|
||||||
|
* @package Thelia\Core\Template\Loop
|
||||||
|
* @author Benjamin Perche <bperche@openstudio.fr>
|
||||||
|
*/
|
||||||
|
class Export extends ImportExportType
|
||||||
|
{
|
||||||
|
protected function getBaseUrl()
|
||||||
|
{
|
||||||
|
return $this->container->getParameter("export.base_url");
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getQueryModel()
|
||||||
|
{
|
||||||
|
return ExportQuery::create();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getCategoryName()
|
||||||
|
{
|
||||||
|
return "ExportCategoryId";
|
||||||
|
}
|
||||||
|
}
|
||||||
28
core/lib/Thelia/Core/Template/Loop/ExportCategory.php
Normal file
28
core/lib/Thelia/Core/Template/Loop/ExportCategory.php
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
/*************************************************************************************/
|
||||||
|
/* This file is part of the Thelia package. */
|
||||||
|
/* */
|
||||||
|
/* Copyright (c) OpenStudio */
|
||||||
|
/* email : dev@thelia.net */
|
||||||
|
/* web : http://www.thelia.net */
|
||||||
|
/* */
|
||||||
|
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||||
|
/* file that was distributed with this source code. */
|
||||||
|
/*************************************************************************************/
|
||||||
|
|
||||||
|
namespace Thelia\Core\Template\Loop;
|
||||||
|
use Thelia\Model\ExportCategoryQuery;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class ExportCategory
|
||||||
|
* @package Thelia\Core\Template\Loop
|
||||||
|
* @author Benjamin Perche <bperche@openstudio.fr>
|
||||||
|
*/
|
||||||
|
class ExportCategory extends ImportExportCategory
|
||||||
|
{
|
||||||
|
protected function getQueryModel()
|
||||||
|
{
|
||||||
|
return ExportCategoryQuery::create();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
37
core/lib/Thelia/Core/Template/Loop/Import.php
Normal file
37
core/lib/Thelia/Core/Template/Loop/Import.php
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
<?php
|
||||||
|
/*************************************************************************************/
|
||||||
|
/* This file is part of the Thelia package. */
|
||||||
|
/* */
|
||||||
|
/* Copyright (c) OpenStudio */
|
||||||
|
/* email : dev@thelia.net */
|
||||||
|
/* web : http://www.thelia.net */
|
||||||
|
/* */
|
||||||
|
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||||
|
/* file that was distributed with this source code. */
|
||||||
|
/*************************************************************************************/
|
||||||
|
|
||||||
|
namespace Thelia\Core\Template\Loop;
|
||||||
|
use Thelia\Model\ImportQuery;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class Import
|
||||||
|
* @package Thelia\Core\Template\Loop
|
||||||
|
* @author Benjamin Perche <bperche@openstudio.fr>
|
||||||
|
*/
|
||||||
|
class Import extends ImportExportType
|
||||||
|
{
|
||||||
|
protected function getBaseUrl()
|
||||||
|
{
|
||||||
|
return $this->container->getParameter("export.base_url");
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getQueryModel()
|
||||||
|
{
|
||||||
|
return ImportQuery::create();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getCategoryName()
|
||||||
|
{
|
||||||
|
return "ImportCategoryId";
|
||||||
|
}
|
||||||
|
}
|
||||||
27
core/lib/Thelia/Core/Template/Loop/ImportCategory.php
Normal file
27
core/lib/Thelia/Core/Template/Loop/ImportCategory.php
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
/*************************************************************************************/
|
||||||
|
/* This file is part of the Thelia package. */
|
||||||
|
/* */
|
||||||
|
/* Copyright (c) OpenStudio */
|
||||||
|
/* email : dev@thelia.net */
|
||||||
|
/* web : http://www.thelia.net */
|
||||||
|
/* */
|
||||||
|
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||||
|
/* file that was distributed with this source code. */
|
||||||
|
/*************************************************************************************/
|
||||||
|
|
||||||
|
namespace Thelia\Core\Template\Loop;
|
||||||
|
use Thelia\Model\ImportCategoryQuery;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class ImportCategory
|
||||||
|
* @package Thelia\Core\Template\Loop
|
||||||
|
* @author Benjamin Perche <bperche@openstudio.fr>
|
||||||
|
*/
|
||||||
|
class ImportCategory extends ImportExportCategory
|
||||||
|
{
|
||||||
|
protected function getQueryModel()
|
||||||
|
{
|
||||||
|
return ImportCategoryQuery::create();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -18,7 +18,6 @@ use Thelia\Core\Template\Element\LoopResultRow;
|
|||||||
use Thelia\Core\Template\Element\PropelSearchLoopInterface;
|
use Thelia\Core\Template\Element\PropelSearchLoopInterface;
|
||||||
use Thelia\Core\Template\Loop\Argument\Argument;
|
use Thelia\Core\Template\Loop\Argument\Argument;
|
||||||
use Thelia\Core\Template\Loop\Argument\ArgumentCollection;
|
use Thelia\Core\Template\Loop\Argument\ArgumentCollection;
|
||||||
use Thelia\Model\Base\ImportExportCategoryQuery;
|
|
||||||
use Thelia\Type\EnumListType;
|
use Thelia\Type\EnumListType;
|
||||||
use Thelia\Type\TypeCollection;
|
use Thelia\Type\TypeCollection;
|
||||||
|
|
||||||
@@ -27,7 +26,7 @@ use Thelia\Type\TypeCollection;
|
|||||||
* @package Thelia\Core\Template\Loop
|
* @package Thelia\Core\Template\Loop
|
||||||
* @author Benjamin Perche <bperche@openstudio.fr>
|
* @author Benjamin Perche <bperche@openstudio.fr>
|
||||||
*/
|
*/
|
||||||
class ImportExportCategory extends BaseLoop implements PropelSearchLoopInterface
|
abstract class ImportExportCategory extends BaseLoop implements PropelSearchLoopInterface
|
||||||
{
|
{
|
||||||
protected $timestampable = true;
|
protected $timestampable = true;
|
||||||
|
|
||||||
@@ -38,7 +37,6 @@ class ImportExportCategory extends BaseLoop implements PropelSearchLoopInterface
|
|||||||
*/
|
*/
|
||||||
public function parseResults(LoopResult $loopResult)
|
public function parseResults(LoopResult $loopResult)
|
||||||
{
|
{
|
||||||
/** @var \Thelia\Model\ImportExportCategory $category */
|
|
||||||
foreach ($loopResult->getResultDataCollection() as $category)
|
foreach ($loopResult->getResultDataCollection() as $category)
|
||||||
{
|
{
|
||||||
$loopResultRow = new LoopResultRow($category);
|
$loopResultRow = new LoopResultRow($category);
|
||||||
@@ -62,7 +60,7 @@ class ImportExportCategory extends BaseLoop implements PropelSearchLoopInterface
|
|||||||
*/
|
*/
|
||||||
public function buildModelCriteria()
|
public function buildModelCriteria()
|
||||||
{
|
{
|
||||||
$query = ImportExportCategoryQuery::create();
|
$query = $this->getQueryModel();
|
||||||
|
|
||||||
if (null !== $ids = $this->getId()) {
|
if (null !== $ids = $this->getId()) {
|
||||||
$query->filterById($ids, Criteria::IN);
|
$query->filterById($ids, Criteria::IN);
|
||||||
@@ -133,4 +131,6 @@ class ImportExportCategory extends BaseLoop implements PropelSearchLoopInterface
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
abstract protected function getQueryModel();
|
||||||
}
|
}
|
||||||
@@ -11,11 +11,14 @@
|
|||||||
/*************************************************************************************/
|
/*************************************************************************************/
|
||||||
|
|
||||||
namespace Thelia\Core\Template\Loop;
|
namespace Thelia\Core\Template\Loop;
|
||||||
|
use Propel\Runtime\ActiveQuery\Criteria;
|
||||||
use Thelia\Core\Template\Element\BaseLoop;
|
use Thelia\Core\Template\Element\BaseLoop;
|
||||||
use Thelia\Core\Template\Element\LoopResult;
|
use Thelia\Core\Template\Element\LoopResult;
|
||||||
|
use Thelia\Core\Template\Element\LoopResultRow;
|
||||||
use Thelia\Core\Template\Element\PropelSearchLoopInterface;
|
use Thelia\Core\Template\Element\PropelSearchLoopInterface;
|
||||||
use Thelia\Core\Template\Loop\Argument\Argument;
|
use Thelia\Core\Template\Loop\Argument\Argument;
|
||||||
use Thelia\Core\Template\Loop\Argument\ArgumentCollection;
|
use Thelia\Core\Template\Loop\Argument\ArgumentCollection;
|
||||||
|
use Thelia\Tools\URL;
|
||||||
use Thelia\Type\EnumListType;
|
use Thelia\Type\EnumListType;
|
||||||
use Thelia\Type\TypeCollection;
|
use Thelia\Type\TypeCollection;
|
||||||
|
|
||||||
@@ -24,8 +27,10 @@ use Thelia\Type\TypeCollection;
|
|||||||
* @package Thelia\Core\Template\Loop
|
* @package Thelia\Core\Template\Loop
|
||||||
* @author Benjamin Perche <bperche@openstudio.fr>
|
* @author Benjamin Perche <bperche@openstudio.fr>
|
||||||
*/
|
*/
|
||||||
class ImportExportType extends BaseLoop implements PropelSearchLoopInterface
|
abstract class ImportExportType extends BaseLoop implements PropelSearchLoopInterface
|
||||||
{
|
{
|
||||||
|
protected $timestampable = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param LoopResult $loopResult
|
* @param LoopResult $loopResult
|
||||||
*
|
*
|
||||||
@@ -33,9 +38,27 @@ class ImportExportType extends BaseLoop implements PropelSearchLoopInterface
|
|||||||
*/
|
*/
|
||||||
public function parseResults(LoopResult $loopResult)
|
public function parseResults(LoopResult $loopResult)
|
||||||
{
|
{
|
||||||
// TODO: Implement parseResults() method.
|
foreach ($loopResult->getResultDataCollection() as $type) {
|
||||||
}
|
$loopResultRow = new LoopResultRow($type);
|
||||||
|
|
||||||
|
$url = URL::getInstance()->absoluteUrl(
|
||||||
|
$this->getBaseUrl() . DS . $type->getId()
|
||||||
|
);
|
||||||
|
|
||||||
|
$loopResultRow
|
||||||
|
->set("ID", $type->getId())
|
||||||
|
->set("TITLE", $type->getTitle())
|
||||||
|
->set("DESCRIPTION", $type->getDescription())
|
||||||
|
->set("URL", $type->isImport() ? $url : null)
|
||||||
|
->set("POSITION", $type->getPosition())
|
||||||
|
->set("CATEGORY_ID", $type->getImportExportCategoryId())
|
||||||
|
;
|
||||||
|
|
||||||
|
$loopResult->addRow($loopResultRow);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $loopResult;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* this method returns a Propel ModelCriteria
|
* this method returns a Propel ModelCriteria
|
||||||
@@ -44,7 +67,42 @@ class ImportExportType extends BaseLoop implements PropelSearchLoopInterface
|
|||||||
*/
|
*/
|
||||||
public function buildModelCriteria()
|
public function buildModelCriteria()
|
||||||
{
|
{
|
||||||
// TODO: Implement buildModelCriteria() method.
|
$query = $this->getQueryModel();
|
||||||
|
|
||||||
|
if (null !== $ids = $this->getId()) {
|
||||||
|
$query->filterById($ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (null !== $categories = $this->getCategory()) {
|
||||||
|
$query->filterBy($this->getCategoryName(), $categories, Criteria::IN);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (null !== $orders = $this->getOrder()) {
|
||||||
|
foreach ($orders as $order) {
|
||||||
|
switch($order) {
|
||||||
|
case "id":
|
||||||
|
$query->orderById();
|
||||||
|
break;
|
||||||
|
case "id_reverse":
|
||||||
|
$query->orderById(Criteria::DESC);
|
||||||
|
break;
|
||||||
|
case "alpha":
|
||||||
|
$query->addAscendingOrderByColumn("i18n_TITLE");
|
||||||
|
break;
|
||||||
|
case "alpha_reverse":
|
||||||
|
$query->addDescendingOrderByColumn("i18n_TITLE");
|
||||||
|
break;
|
||||||
|
case "manual":
|
||||||
|
$query->orderByPosition();
|
||||||
|
break;
|
||||||
|
case "manual_reverse":
|
||||||
|
$query->orderByPosition(Criteria::DESC);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $query;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -75,6 +133,7 @@ class ImportExportType extends BaseLoop implements PropelSearchLoopInterface
|
|||||||
{
|
{
|
||||||
return new ArgumentCollection(
|
return new ArgumentCollection(
|
||||||
Argument::createIntListTypeArgument('id'),
|
Argument::createIntListTypeArgument('id'),
|
||||||
|
Argument::createIntListTypeArgument('category'),
|
||||||
new Argument(
|
new Argument(
|
||||||
"order",
|
"order",
|
||||||
new TypeCollection(
|
new TypeCollection(
|
||||||
@@ -84,4 +143,10 @@ class ImportExportType extends BaseLoop implements PropelSearchLoopInterface
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
abstract protected function getBaseUrl();
|
||||||
|
|
||||||
|
abstract protected function getQueryModel();
|
||||||
|
|
||||||
|
abstract protected function getCategoryName();
|
||||||
}
|
}
|
||||||
1884
core/lib/Thelia/Model/Base/Export.php
Normal file
1884
core/lib/Thelia/Model/Base/Export.php
Normal file
File diff suppressed because it is too large
Load Diff
1989
core/lib/Thelia/Model/Base/ExportCategory.php
Normal file
1989
core/lib/Thelia/Model/Base/ExportCategory.php
Normal file
File diff suppressed because it is too large
Load Diff
1268
core/lib/Thelia/Model/Base/ExportCategoryI18n.php
Normal file
1268
core/lib/Thelia/Model/Base/ExportCategoryI18n.php
Normal file
File diff suppressed because it is too large
Load Diff
508
core/lib/Thelia/Model/Base/ExportCategoryI18nQuery.php
Normal file
508
core/lib/Thelia/Model/Base/ExportCategoryI18nQuery.php
Normal file
@@ -0,0 +1,508 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Thelia\Model\Base;
|
||||||
|
|
||||||
|
use \Exception;
|
||||||
|
use \PDO;
|
||||||
|
use Propel\Runtime\Propel;
|
||||||
|
use Propel\Runtime\ActiveQuery\Criteria;
|
||||||
|
use Propel\Runtime\ActiveQuery\ModelCriteria;
|
||||||
|
use Propel\Runtime\ActiveQuery\ModelJoin;
|
||||||
|
use Propel\Runtime\Collection\Collection;
|
||||||
|
use Propel\Runtime\Collection\ObjectCollection;
|
||||||
|
use Propel\Runtime\Connection\ConnectionInterface;
|
||||||
|
use Propel\Runtime\Exception\PropelException;
|
||||||
|
use Thelia\Model\ExportCategoryI18n as ChildExportCategoryI18n;
|
||||||
|
use Thelia\Model\ExportCategoryI18nQuery as ChildExportCategoryI18nQuery;
|
||||||
|
use Thelia\Model\Map\ExportCategoryI18nTableMap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Base class that represents a query for the 'export_category_i18n' table.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @method ChildExportCategoryI18nQuery orderById($order = Criteria::ASC) Order by the id column
|
||||||
|
* @method ChildExportCategoryI18nQuery orderByLocale($order = Criteria::ASC) Order by the locale column
|
||||||
|
* @method ChildExportCategoryI18nQuery orderByTitle($order = Criteria::ASC) Order by the title column
|
||||||
|
*
|
||||||
|
* @method ChildExportCategoryI18nQuery groupById() Group by the id column
|
||||||
|
* @method ChildExportCategoryI18nQuery groupByLocale() Group by the locale column
|
||||||
|
* @method ChildExportCategoryI18nQuery groupByTitle() Group by the title column
|
||||||
|
*
|
||||||
|
* @method ChildExportCategoryI18nQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
|
||||||
|
* @method ChildExportCategoryI18nQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
||||||
|
* @method ChildExportCategoryI18nQuery innerJoin($relation) Adds a INNER JOIN clause to the query
|
||||||
|
*
|
||||||
|
* @method ChildExportCategoryI18nQuery leftJoinExportCategory($relationAlias = null) Adds a LEFT JOIN clause to the query using the ExportCategory relation
|
||||||
|
* @method ChildExportCategoryI18nQuery rightJoinExportCategory($relationAlias = null) Adds a RIGHT JOIN clause to the query using the ExportCategory relation
|
||||||
|
* @method ChildExportCategoryI18nQuery innerJoinExportCategory($relationAlias = null) Adds a INNER JOIN clause to the query using the ExportCategory relation
|
||||||
|
*
|
||||||
|
* @method ChildExportCategoryI18n findOne(ConnectionInterface $con = null) Return the first ChildExportCategoryI18n matching the query
|
||||||
|
* @method ChildExportCategoryI18n findOneOrCreate(ConnectionInterface $con = null) Return the first ChildExportCategoryI18n matching the query, or a new ChildExportCategoryI18n object populated from the query conditions when no match is found
|
||||||
|
*
|
||||||
|
* @method ChildExportCategoryI18n findOneById(int $id) Return the first ChildExportCategoryI18n filtered by the id column
|
||||||
|
* @method ChildExportCategoryI18n findOneByLocale(string $locale) Return the first ChildExportCategoryI18n filtered by the locale column
|
||||||
|
* @method ChildExportCategoryI18n findOneByTitle(string $title) Return the first ChildExportCategoryI18n filtered by the title column
|
||||||
|
*
|
||||||
|
* @method array findById(int $id) Return ChildExportCategoryI18n objects filtered by the id column
|
||||||
|
* @method array findByLocale(string $locale) Return ChildExportCategoryI18n objects filtered by the locale column
|
||||||
|
* @method array findByTitle(string $title) Return ChildExportCategoryI18n objects filtered by the title column
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
abstract class ExportCategoryI18nQuery extends ModelCriteria
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initializes internal state of \Thelia\Model\Base\ExportCategoryI18nQuery object.
|
||||||
|
*
|
||||||
|
* @param string $dbName The database name
|
||||||
|
* @param string $modelName The phpName of a model, e.g. 'Book'
|
||||||
|
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
|
||||||
|
*/
|
||||||
|
public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\ExportCategoryI18n', $modelAlias = null)
|
||||||
|
{
|
||||||
|
parent::__construct($dbName, $modelName, $modelAlias);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a new ChildExportCategoryI18nQuery object.
|
||||||
|
*
|
||||||
|
* @param string $modelAlias The alias of a model in the query
|
||||||
|
* @param Criteria $criteria Optional Criteria to build the query from
|
||||||
|
*
|
||||||
|
* @return ChildExportCategoryI18nQuery
|
||||||
|
*/
|
||||||
|
public static function create($modelAlias = null, $criteria = null)
|
||||||
|
{
|
||||||
|
if ($criteria instanceof \Thelia\Model\ExportCategoryI18nQuery) {
|
||||||
|
return $criteria;
|
||||||
|
}
|
||||||
|
$query = new \Thelia\Model\ExportCategoryI18nQuery();
|
||||||
|
if (null !== $modelAlias) {
|
||||||
|
$query->setModelAlias($modelAlias);
|
||||||
|
}
|
||||||
|
if ($criteria instanceof Criteria) {
|
||||||
|
$query->mergeWith($criteria);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $query;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find object by primary key.
|
||||||
|
* Propel uses the instance pool to skip the database if the object exists.
|
||||||
|
* Go fast if the query is untouched.
|
||||||
|
*
|
||||||
|
* <code>
|
||||||
|
* $obj = $c->findPk(array(12, 34), $con);
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @param array[$id, $locale] $key Primary key to use for the query
|
||||||
|
* @param ConnectionInterface $con an optional connection object
|
||||||
|
*
|
||||||
|
* @return ChildExportCategoryI18n|array|mixed the result, formatted by the current formatter
|
||||||
|
*/
|
||||||
|
public function findPk($key, $con = null)
|
||||||
|
{
|
||||||
|
if ($key === null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
if ((null !== ($obj = ExportCategoryI18nTableMap::getInstanceFromPool(serialize(array((string) $key[0], (string) $key[1]))))) && !$this->formatter) {
|
||||||
|
// the object is already in the instance pool
|
||||||
|
return $obj;
|
||||||
|
}
|
||||||
|
if ($con === null) {
|
||||||
|
$con = Propel::getServiceContainer()->getReadConnection(ExportCategoryI18nTableMap::DATABASE_NAME);
|
||||||
|
}
|
||||||
|
$this->basePreSelect($con);
|
||||||
|
if ($this->formatter || $this->modelAlias || $this->with || $this->select
|
||||||
|
|| $this->selectColumns || $this->asColumns || $this->selectModifiers
|
||||||
|
|| $this->map || $this->having || $this->joins) {
|
||||||
|
return $this->findPkComplex($key, $con);
|
||||||
|
} else {
|
||||||
|
return $this->findPkSimple($key, $con);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find object by primary key using raw SQL to go fast.
|
||||||
|
* Bypass doSelect() and the object formatter by using generated code.
|
||||||
|
*
|
||||||
|
* @param mixed $key Primary key to use for the query
|
||||||
|
* @param ConnectionInterface $con A connection object
|
||||||
|
*
|
||||||
|
* @return ChildExportCategoryI18n A model object, or null if the key is not found
|
||||||
|
*/
|
||||||
|
protected function findPkSimple($key, $con)
|
||||||
|
{
|
||||||
|
$sql = 'SELECT `ID`, `LOCALE`, `TITLE` FROM `export_category_i18n` WHERE `ID` = :p0 AND `LOCALE` = :p1';
|
||||||
|
try {
|
||||||
|
$stmt = $con->prepare($sql);
|
||||||
|
$stmt->bindValue(':p0', $key[0], PDO::PARAM_INT);
|
||||||
|
$stmt->bindValue(':p1', $key[1], PDO::PARAM_STR);
|
||||||
|
$stmt->execute();
|
||||||
|
} catch (Exception $e) {
|
||||||
|
Propel::log($e->getMessage(), Propel::LOG_ERR);
|
||||||
|
throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), 0, $e);
|
||||||
|
}
|
||||||
|
$obj = null;
|
||||||
|
if ($row = $stmt->fetch(\PDO::FETCH_NUM)) {
|
||||||
|
$obj = new ChildExportCategoryI18n();
|
||||||
|
$obj->hydrate($row);
|
||||||
|
ExportCategoryI18nTableMap::addInstanceToPool($obj, serialize(array((string) $key[0], (string) $key[1])));
|
||||||
|
}
|
||||||
|
$stmt->closeCursor();
|
||||||
|
|
||||||
|
return $obj;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find object by primary key.
|
||||||
|
*
|
||||||
|
* @param mixed $key Primary key to use for the query
|
||||||
|
* @param ConnectionInterface $con A connection object
|
||||||
|
*
|
||||||
|
* @return ChildExportCategoryI18n|array|mixed the result, formatted by the current formatter
|
||||||
|
*/
|
||||||
|
protected function findPkComplex($key, $con)
|
||||||
|
{
|
||||||
|
// As the query uses a PK condition, no limit(1) is necessary.
|
||||||
|
$criteria = $this->isKeepQuery() ? clone $this : $this;
|
||||||
|
$dataFetcher = $criteria
|
||||||
|
->filterByPrimaryKey($key)
|
||||||
|
->doSelect($con);
|
||||||
|
|
||||||
|
return $criteria->getFormatter()->init($criteria)->formatOne($dataFetcher);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find objects by primary key
|
||||||
|
* <code>
|
||||||
|
* $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con);
|
||||||
|
* </code>
|
||||||
|
* @param array $keys Primary keys to use for the query
|
||||||
|
* @param ConnectionInterface $con an optional connection object
|
||||||
|
*
|
||||||
|
* @return ObjectCollection|array|mixed the list of results, formatted by the current formatter
|
||||||
|
*/
|
||||||
|
public function findPks($keys, $con = null)
|
||||||
|
{
|
||||||
|
if (null === $con) {
|
||||||
|
$con = Propel::getServiceContainer()->getReadConnection($this->getDbName());
|
||||||
|
}
|
||||||
|
$this->basePreSelect($con);
|
||||||
|
$criteria = $this->isKeepQuery() ? clone $this : $this;
|
||||||
|
$dataFetcher = $criteria
|
||||||
|
->filterByPrimaryKeys($keys)
|
||||||
|
->doSelect($con);
|
||||||
|
|
||||||
|
return $criteria->getFormatter()->init($criteria)->format($dataFetcher);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query by primary key
|
||||||
|
*
|
||||||
|
* @param mixed $key Primary key to use for the query
|
||||||
|
*
|
||||||
|
* @return ChildExportCategoryI18nQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByPrimaryKey($key)
|
||||||
|
{
|
||||||
|
$this->addUsingAlias(ExportCategoryI18nTableMap::ID, $key[0], Criteria::EQUAL);
|
||||||
|
$this->addUsingAlias(ExportCategoryI18nTableMap::LOCALE, $key[1], Criteria::EQUAL);
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query by a list of primary keys
|
||||||
|
*
|
||||||
|
* @param array $keys The list of primary key to use for the query
|
||||||
|
*
|
||||||
|
* @return ChildExportCategoryI18nQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByPrimaryKeys($keys)
|
||||||
|
{
|
||||||
|
if (empty($keys)) {
|
||||||
|
return $this->add(null, '1<>1', Criteria::CUSTOM);
|
||||||
|
}
|
||||||
|
foreach ($keys as $key) {
|
||||||
|
$cton0 = $this->getNewCriterion(ExportCategoryI18nTableMap::ID, $key[0], Criteria::EQUAL);
|
||||||
|
$cton1 = $this->getNewCriterion(ExportCategoryI18nTableMap::LOCALE, $key[1], Criteria::EQUAL);
|
||||||
|
$cton0->addAnd($cton1);
|
||||||
|
$this->addOr($cton0);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query on the id column
|
||||||
|
*
|
||||||
|
* Example usage:
|
||||||
|
* <code>
|
||||||
|
* $query->filterById(1234); // WHERE id = 1234
|
||||||
|
* $query->filterById(array(12, 34)); // WHERE id IN (12, 34)
|
||||||
|
* $query->filterById(array('min' => 12)); // WHERE id > 12
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @see filterByExportCategory()
|
||||||
|
*
|
||||||
|
* @param mixed $id The value to use as filter.
|
||||||
|
* Use scalar values for equality.
|
||||||
|
* Use array values for in_array() equivalent.
|
||||||
|
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||||
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
|
*
|
||||||
|
* @return ChildExportCategoryI18nQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterById($id = null, $comparison = null)
|
||||||
|
{
|
||||||
|
if (is_array($id)) {
|
||||||
|
$useMinMax = false;
|
||||||
|
if (isset($id['min'])) {
|
||||||
|
$this->addUsingAlias(ExportCategoryI18nTableMap::ID, $id['min'], Criteria::GREATER_EQUAL);
|
||||||
|
$useMinMax = true;
|
||||||
|
}
|
||||||
|
if (isset($id['max'])) {
|
||||||
|
$this->addUsingAlias(ExportCategoryI18nTableMap::ID, $id['max'], Criteria::LESS_EQUAL);
|
||||||
|
$useMinMax = true;
|
||||||
|
}
|
||||||
|
if ($useMinMax) {
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
if (null === $comparison) {
|
||||||
|
$comparison = Criteria::IN;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->addUsingAlias(ExportCategoryI18nTableMap::ID, $id, $comparison);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query on the locale column
|
||||||
|
*
|
||||||
|
* Example usage:
|
||||||
|
* <code>
|
||||||
|
* $query->filterByLocale('fooValue'); // WHERE locale = 'fooValue'
|
||||||
|
* $query->filterByLocale('%fooValue%'); // WHERE locale LIKE '%fooValue%'
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @param string $locale 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 ChildExportCategoryI18nQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByLocale($locale = null, $comparison = null)
|
||||||
|
{
|
||||||
|
if (null === $comparison) {
|
||||||
|
if (is_array($locale)) {
|
||||||
|
$comparison = Criteria::IN;
|
||||||
|
} elseif (preg_match('/[\%\*]/', $locale)) {
|
||||||
|
$locale = str_replace('*', '%', $locale);
|
||||||
|
$comparison = Criteria::LIKE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->addUsingAlias(ExportCategoryI18nTableMap::LOCALE, $locale, $comparison);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query on the title column
|
||||||
|
*
|
||||||
|
* Example usage:
|
||||||
|
* <code>
|
||||||
|
* $query->filterByTitle('fooValue'); // WHERE title = 'fooValue'
|
||||||
|
* $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%'
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @param string $title 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 ChildExportCategoryI18nQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByTitle($title = null, $comparison = null)
|
||||||
|
{
|
||||||
|
if (null === $comparison) {
|
||||||
|
if (is_array($title)) {
|
||||||
|
$comparison = Criteria::IN;
|
||||||
|
} elseif (preg_match('/[\%\*]/', $title)) {
|
||||||
|
$title = str_replace('*', '%', $title);
|
||||||
|
$comparison = Criteria::LIKE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->addUsingAlias(ExportCategoryI18nTableMap::TITLE, $title, $comparison);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query by a related \Thelia\Model\ExportCategory object
|
||||||
|
*
|
||||||
|
* @param \Thelia\Model\ExportCategory|ObjectCollection $exportCategory The related object(s) to use as filter
|
||||||
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
|
*
|
||||||
|
* @return ChildExportCategoryI18nQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByExportCategory($exportCategory, $comparison = null)
|
||||||
|
{
|
||||||
|
if ($exportCategory instanceof \Thelia\Model\ExportCategory) {
|
||||||
|
return $this
|
||||||
|
->addUsingAlias(ExportCategoryI18nTableMap::ID, $exportCategory->getId(), $comparison);
|
||||||
|
} elseif ($exportCategory instanceof ObjectCollection) {
|
||||||
|
if (null === $comparison) {
|
||||||
|
$comparison = Criteria::IN;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this
|
||||||
|
->addUsingAlias(ExportCategoryI18nTableMap::ID, $exportCategory->toKeyValue('PrimaryKey', 'Id'), $comparison);
|
||||||
|
} else {
|
||||||
|
throw new PropelException('filterByExportCategory() only accepts arguments of type \Thelia\Model\ExportCategory or Collection');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a JOIN clause to the query using the ExportCategory relation
|
||||||
|
*
|
||||||
|
* @param string $relationAlias optional alias for the relation
|
||||||
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||||
|
*
|
||||||
|
* @return ChildExportCategoryI18nQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function joinExportCategory($relationAlias = null, $joinType = 'LEFT JOIN')
|
||||||
|
{
|
||||||
|
$tableMap = $this->getTableMap();
|
||||||
|
$relationMap = $tableMap->getRelation('ExportCategory');
|
||||||
|
|
||||||
|
// create a ModelJoin object for this join
|
||||||
|
$join = new ModelJoin();
|
||||||
|
$join->setJoinType($joinType);
|
||||||
|
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
|
||||||
|
if ($previousJoin = $this->getPreviousJoin()) {
|
||||||
|
$join->setPreviousJoin($previousJoin);
|
||||||
|
}
|
||||||
|
|
||||||
|
// add the ModelJoin to the current object
|
||||||
|
if ($relationAlias) {
|
||||||
|
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||||
|
$this->addJoinObject($join, $relationAlias);
|
||||||
|
} else {
|
||||||
|
$this->addJoinObject($join, 'ExportCategory');
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use the ExportCategory relation ExportCategory object
|
||||||
|
*
|
||||||
|
* @see useQuery()
|
||||||
|
*
|
||||||
|
* @param string $relationAlias optional alias for the relation,
|
||||||
|
* to be used as main alias in the secondary query
|
||||||
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||||
|
*
|
||||||
|
* @return \Thelia\Model\ExportCategoryQuery A secondary query class using the current class as primary query
|
||||||
|
*/
|
||||||
|
public function useExportCategoryQuery($relationAlias = null, $joinType = 'LEFT JOIN')
|
||||||
|
{
|
||||||
|
return $this
|
||||||
|
->joinExportCategory($relationAlias, $joinType)
|
||||||
|
->useQuery($relationAlias ? $relationAlias : 'ExportCategory', '\Thelia\Model\ExportCategoryQuery');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Exclude object from result
|
||||||
|
*
|
||||||
|
* @param ChildExportCategoryI18n $exportCategoryI18n Object to remove from the list of results
|
||||||
|
*
|
||||||
|
* @return ChildExportCategoryI18nQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function prune($exportCategoryI18n = null)
|
||||||
|
{
|
||||||
|
if ($exportCategoryI18n) {
|
||||||
|
$this->addCond('pruneCond0', $this->getAliasedColName(ExportCategoryI18nTableMap::ID), $exportCategoryI18n->getId(), Criteria::NOT_EQUAL);
|
||||||
|
$this->addCond('pruneCond1', $this->getAliasedColName(ExportCategoryI18nTableMap::LOCALE), $exportCategoryI18n->getLocale(), Criteria::NOT_EQUAL);
|
||||||
|
$this->combine(array('pruneCond0', 'pruneCond1'), Criteria::LOGICAL_OR);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deletes all rows from the export_category_i18n table.
|
||||||
|
*
|
||||||
|
* @param ConnectionInterface $con the connection to use
|
||||||
|
* @return int The number of affected rows (if supported by underlying database driver).
|
||||||
|
*/
|
||||||
|
public function doDeleteAll(ConnectionInterface $con = null)
|
||||||
|
{
|
||||||
|
if (null === $con) {
|
||||||
|
$con = Propel::getServiceContainer()->getWriteConnection(ExportCategoryI18nTableMap::DATABASE_NAME);
|
||||||
|
}
|
||||||
|
$affectedRows = 0; // initialize var to track total num of affected rows
|
||||||
|
try {
|
||||||
|
// use transaction because $criteria could contain info
|
||||||
|
// for more than one table or we could emulating ON DELETE CASCADE, etc.
|
||||||
|
$con->beginTransaction();
|
||||||
|
$affectedRows += parent::doDeleteAll($con);
|
||||||
|
// Because this db requires some delete cascade/set null emulation, we have to
|
||||||
|
// clear the cached instance *after* the emulation has happened (since
|
||||||
|
// instances get re-added by the select statement contained therein).
|
||||||
|
ExportCategoryI18nTableMap::clearInstancePool();
|
||||||
|
ExportCategoryI18nTableMap::clearRelatedInstancePool();
|
||||||
|
|
||||||
|
$con->commit();
|
||||||
|
} catch (PropelException $e) {
|
||||||
|
$con->rollBack();
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $affectedRows;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Performs a DELETE on the database, given a ChildExportCategoryI18n or Criteria object OR a primary key value.
|
||||||
|
*
|
||||||
|
* @param mixed $values Criteria or ChildExportCategoryI18n object or primary key or array of primary keys
|
||||||
|
* which is used to create the DELETE statement
|
||||||
|
* @param ConnectionInterface $con the connection to use
|
||||||
|
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
|
||||||
|
* if supported by native driver or if emulated using Propel.
|
||||||
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
|
* rethrown wrapped into a PropelException.
|
||||||
|
*/
|
||||||
|
public function delete(ConnectionInterface $con = null)
|
||||||
|
{
|
||||||
|
if (null === $con) {
|
||||||
|
$con = Propel::getServiceContainer()->getWriteConnection(ExportCategoryI18nTableMap::DATABASE_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
$criteria = $this;
|
||||||
|
|
||||||
|
// Set the correct dbName
|
||||||
|
$criteria->setDbName(ExportCategoryI18nTableMap::DATABASE_NAME);
|
||||||
|
|
||||||
|
$affectedRows = 0; // initialize var to track total num of affected rows
|
||||||
|
|
||||||
|
try {
|
||||||
|
// use transaction because $criteria could contain info
|
||||||
|
// for more than one table or we could emulating ON DELETE CASCADE, etc.
|
||||||
|
$con->beginTransaction();
|
||||||
|
|
||||||
|
|
||||||
|
ExportCategoryI18nTableMap::removeInstanceFromPool($criteria);
|
||||||
|
|
||||||
|
$affectedRows += ModelCriteria::delete($con);
|
||||||
|
ExportCategoryI18nTableMap::clearRelatedInstancePool();
|
||||||
|
$con->commit();
|
||||||
|
|
||||||
|
return $affectedRows;
|
||||||
|
} catch (PropelException $e) {
|
||||||
|
$con->rollBack();
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} // ExportCategoryI18nQuery
|
||||||
764
core/lib/Thelia/Model/Base/ExportCategoryQuery.php
Normal file
764
core/lib/Thelia/Model/Base/ExportCategoryQuery.php
Normal file
@@ -0,0 +1,764 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Thelia\Model\Base;
|
||||||
|
|
||||||
|
use \Exception;
|
||||||
|
use \PDO;
|
||||||
|
use Propel\Runtime\Propel;
|
||||||
|
use Propel\Runtime\ActiveQuery\Criteria;
|
||||||
|
use Propel\Runtime\ActiveQuery\ModelCriteria;
|
||||||
|
use Propel\Runtime\ActiveQuery\ModelJoin;
|
||||||
|
use Propel\Runtime\Collection\Collection;
|
||||||
|
use Propel\Runtime\Collection\ObjectCollection;
|
||||||
|
use Propel\Runtime\Connection\ConnectionInterface;
|
||||||
|
use Propel\Runtime\Exception\PropelException;
|
||||||
|
use Thelia\Model\ExportCategory as ChildExportCategory;
|
||||||
|
use Thelia\Model\ExportCategoryI18nQuery as ChildExportCategoryI18nQuery;
|
||||||
|
use Thelia\Model\ExportCategoryQuery as ChildExportCategoryQuery;
|
||||||
|
use Thelia\Model\Map\ExportCategoryTableMap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Base class that represents a query for the 'export_category' table.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @method ChildExportCategoryQuery orderById($order = Criteria::ASC) Order by the id column
|
||||||
|
* @method ChildExportCategoryQuery orderByPosition($order = Criteria::ASC) Order by the position column
|
||||||
|
* @method ChildExportCategoryQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
|
||||||
|
* @method ChildExportCategoryQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
|
||||||
|
*
|
||||||
|
* @method ChildExportCategoryQuery groupById() Group by the id column
|
||||||
|
* @method ChildExportCategoryQuery groupByPosition() Group by the position column
|
||||||
|
* @method ChildExportCategoryQuery groupByCreatedAt() Group by the created_at column
|
||||||
|
* @method ChildExportCategoryQuery groupByUpdatedAt() Group by the updated_at column
|
||||||
|
*
|
||||||
|
* @method ChildExportCategoryQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
|
||||||
|
* @method ChildExportCategoryQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
||||||
|
* @method ChildExportCategoryQuery innerJoin($relation) Adds a INNER JOIN clause to the query
|
||||||
|
*
|
||||||
|
* @method ChildExportCategoryQuery leftJoinExport($relationAlias = null) Adds a LEFT JOIN clause to the query using the Export relation
|
||||||
|
* @method ChildExportCategoryQuery rightJoinExport($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Export relation
|
||||||
|
* @method ChildExportCategoryQuery innerJoinExport($relationAlias = null) Adds a INNER JOIN clause to the query using the Export relation
|
||||||
|
*
|
||||||
|
* @method ChildExportCategoryQuery leftJoinExportCategoryI18n($relationAlias = null) Adds a LEFT JOIN clause to the query using the ExportCategoryI18n relation
|
||||||
|
* @method ChildExportCategoryQuery rightJoinExportCategoryI18n($relationAlias = null) Adds a RIGHT JOIN clause to the query using the ExportCategoryI18n relation
|
||||||
|
* @method ChildExportCategoryQuery innerJoinExportCategoryI18n($relationAlias = null) Adds a INNER JOIN clause to the query using the ExportCategoryI18n relation
|
||||||
|
*
|
||||||
|
* @method ChildExportCategory findOne(ConnectionInterface $con = null) Return the first ChildExportCategory matching the query
|
||||||
|
* @method ChildExportCategory findOneOrCreate(ConnectionInterface $con = null) Return the first ChildExportCategory matching the query, or a new ChildExportCategory object populated from the query conditions when no match is found
|
||||||
|
*
|
||||||
|
* @method ChildExportCategory findOneById(int $id) Return the first ChildExportCategory filtered by the id column
|
||||||
|
* @method ChildExportCategory findOneByPosition(int $position) Return the first ChildExportCategory filtered by the position column
|
||||||
|
* @method ChildExportCategory findOneByCreatedAt(string $created_at) Return the first ChildExportCategory filtered by the created_at column
|
||||||
|
* @method ChildExportCategory findOneByUpdatedAt(string $updated_at) Return the first ChildExportCategory filtered by the updated_at column
|
||||||
|
*
|
||||||
|
* @method array findById(int $id) Return ChildExportCategory objects filtered by the id column
|
||||||
|
* @method array findByPosition(int $position) Return ChildExportCategory objects filtered by the position column
|
||||||
|
* @method array findByCreatedAt(string $created_at) Return ChildExportCategory objects filtered by the created_at column
|
||||||
|
* @method array findByUpdatedAt(string $updated_at) Return ChildExportCategory objects filtered by the updated_at column
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
abstract class ExportCategoryQuery extends ModelCriteria
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initializes internal state of \Thelia\Model\Base\ExportCategoryQuery object.
|
||||||
|
*
|
||||||
|
* @param string $dbName The database name
|
||||||
|
* @param string $modelName The phpName of a model, e.g. 'Book'
|
||||||
|
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
|
||||||
|
*/
|
||||||
|
public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\ExportCategory', $modelAlias = null)
|
||||||
|
{
|
||||||
|
parent::__construct($dbName, $modelName, $modelAlias);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a new ChildExportCategoryQuery object.
|
||||||
|
*
|
||||||
|
* @param string $modelAlias The alias of a model in the query
|
||||||
|
* @param Criteria $criteria Optional Criteria to build the query from
|
||||||
|
*
|
||||||
|
* @return ChildExportCategoryQuery
|
||||||
|
*/
|
||||||
|
public static function create($modelAlias = null, $criteria = null)
|
||||||
|
{
|
||||||
|
if ($criteria instanceof \Thelia\Model\ExportCategoryQuery) {
|
||||||
|
return $criteria;
|
||||||
|
}
|
||||||
|
$query = new \Thelia\Model\ExportCategoryQuery();
|
||||||
|
if (null !== $modelAlias) {
|
||||||
|
$query->setModelAlias($modelAlias);
|
||||||
|
}
|
||||||
|
if ($criteria instanceof Criteria) {
|
||||||
|
$query->mergeWith($criteria);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $query;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find object by primary key.
|
||||||
|
* Propel uses the instance pool to skip the database if the object exists.
|
||||||
|
* Go fast if the query is untouched.
|
||||||
|
*
|
||||||
|
* <code>
|
||||||
|
* $obj = $c->findPk(12, $con);
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @param mixed $key Primary key to use for the query
|
||||||
|
* @param ConnectionInterface $con an optional connection object
|
||||||
|
*
|
||||||
|
* @return ChildExportCategory|array|mixed the result, formatted by the current formatter
|
||||||
|
*/
|
||||||
|
public function findPk($key, $con = null)
|
||||||
|
{
|
||||||
|
if ($key === null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
if ((null !== ($obj = ExportCategoryTableMap::getInstanceFromPool((string) $key))) && !$this->formatter) {
|
||||||
|
// the object is already in the instance pool
|
||||||
|
return $obj;
|
||||||
|
}
|
||||||
|
if ($con === null) {
|
||||||
|
$con = Propel::getServiceContainer()->getReadConnection(ExportCategoryTableMap::DATABASE_NAME);
|
||||||
|
}
|
||||||
|
$this->basePreSelect($con);
|
||||||
|
if ($this->formatter || $this->modelAlias || $this->with || $this->select
|
||||||
|
|| $this->selectColumns || $this->asColumns || $this->selectModifiers
|
||||||
|
|| $this->map || $this->having || $this->joins) {
|
||||||
|
return $this->findPkComplex($key, $con);
|
||||||
|
} else {
|
||||||
|
return $this->findPkSimple($key, $con);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find object by primary key using raw SQL to go fast.
|
||||||
|
* Bypass doSelect() and the object formatter by using generated code.
|
||||||
|
*
|
||||||
|
* @param mixed $key Primary key to use for the query
|
||||||
|
* @param ConnectionInterface $con A connection object
|
||||||
|
*
|
||||||
|
* @return ChildExportCategory A model object, or null if the key is not found
|
||||||
|
*/
|
||||||
|
protected function findPkSimple($key, $con)
|
||||||
|
{
|
||||||
|
$sql = 'SELECT `ID`, `POSITION`, `CREATED_AT`, `UPDATED_AT` FROM `export_category` WHERE `ID` = :p0';
|
||||||
|
try {
|
||||||
|
$stmt = $con->prepare($sql);
|
||||||
|
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
|
||||||
|
$stmt->execute();
|
||||||
|
} catch (Exception $e) {
|
||||||
|
Propel::log($e->getMessage(), Propel::LOG_ERR);
|
||||||
|
throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), 0, $e);
|
||||||
|
}
|
||||||
|
$obj = null;
|
||||||
|
if ($row = $stmt->fetch(\PDO::FETCH_NUM)) {
|
||||||
|
$obj = new ChildExportCategory();
|
||||||
|
$obj->hydrate($row);
|
||||||
|
ExportCategoryTableMap::addInstanceToPool($obj, (string) $key);
|
||||||
|
}
|
||||||
|
$stmt->closeCursor();
|
||||||
|
|
||||||
|
return $obj;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find object by primary key.
|
||||||
|
*
|
||||||
|
* @param mixed $key Primary key to use for the query
|
||||||
|
* @param ConnectionInterface $con A connection object
|
||||||
|
*
|
||||||
|
* @return ChildExportCategory|array|mixed the result, formatted by the current formatter
|
||||||
|
*/
|
||||||
|
protected function findPkComplex($key, $con)
|
||||||
|
{
|
||||||
|
// As the query uses a PK condition, no limit(1) is necessary.
|
||||||
|
$criteria = $this->isKeepQuery() ? clone $this : $this;
|
||||||
|
$dataFetcher = $criteria
|
||||||
|
->filterByPrimaryKey($key)
|
||||||
|
->doSelect($con);
|
||||||
|
|
||||||
|
return $criteria->getFormatter()->init($criteria)->formatOne($dataFetcher);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find objects by primary key
|
||||||
|
* <code>
|
||||||
|
* $objs = $c->findPks(array(12, 56, 832), $con);
|
||||||
|
* </code>
|
||||||
|
* @param array $keys Primary keys to use for the query
|
||||||
|
* @param ConnectionInterface $con an optional connection object
|
||||||
|
*
|
||||||
|
* @return ObjectCollection|array|mixed the list of results, formatted by the current formatter
|
||||||
|
*/
|
||||||
|
public function findPks($keys, $con = null)
|
||||||
|
{
|
||||||
|
if (null === $con) {
|
||||||
|
$con = Propel::getServiceContainer()->getReadConnection($this->getDbName());
|
||||||
|
}
|
||||||
|
$this->basePreSelect($con);
|
||||||
|
$criteria = $this->isKeepQuery() ? clone $this : $this;
|
||||||
|
$dataFetcher = $criteria
|
||||||
|
->filterByPrimaryKeys($keys)
|
||||||
|
->doSelect($con);
|
||||||
|
|
||||||
|
return $criteria->getFormatter()->init($criteria)->format($dataFetcher);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query by primary key
|
||||||
|
*
|
||||||
|
* @param mixed $key Primary key to use for the query
|
||||||
|
*
|
||||||
|
* @return ChildExportCategoryQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByPrimaryKey($key)
|
||||||
|
{
|
||||||
|
|
||||||
|
return $this->addUsingAlias(ExportCategoryTableMap::ID, $key, Criteria::EQUAL);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query by a list of primary keys
|
||||||
|
*
|
||||||
|
* @param array $keys The list of primary key to use for the query
|
||||||
|
*
|
||||||
|
* @return ChildExportCategoryQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByPrimaryKeys($keys)
|
||||||
|
{
|
||||||
|
|
||||||
|
return $this->addUsingAlias(ExportCategoryTableMap::ID, $keys, Criteria::IN);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query on the id column
|
||||||
|
*
|
||||||
|
* Example usage:
|
||||||
|
* <code>
|
||||||
|
* $query->filterById(1234); // WHERE id = 1234
|
||||||
|
* $query->filterById(array(12, 34)); // WHERE id IN (12, 34)
|
||||||
|
* $query->filterById(array('min' => 12)); // WHERE id > 12
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @param mixed $id The value to use as filter.
|
||||||
|
* Use scalar values for equality.
|
||||||
|
* Use array values for in_array() equivalent.
|
||||||
|
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||||
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
|
*
|
||||||
|
* @return ChildExportCategoryQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterById($id = null, $comparison = null)
|
||||||
|
{
|
||||||
|
if (is_array($id)) {
|
||||||
|
$useMinMax = false;
|
||||||
|
if (isset($id['min'])) {
|
||||||
|
$this->addUsingAlias(ExportCategoryTableMap::ID, $id['min'], Criteria::GREATER_EQUAL);
|
||||||
|
$useMinMax = true;
|
||||||
|
}
|
||||||
|
if (isset($id['max'])) {
|
||||||
|
$this->addUsingAlias(ExportCategoryTableMap::ID, $id['max'], Criteria::LESS_EQUAL);
|
||||||
|
$useMinMax = true;
|
||||||
|
}
|
||||||
|
if ($useMinMax) {
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
if (null === $comparison) {
|
||||||
|
$comparison = Criteria::IN;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->addUsingAlias(ExportCategoryTableMap::ID, $id, $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 ChildExportCategoryQuery 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(ExportCategoryTableMap::POSITION, $position['min'], Criteria::GREATER_EQUAL);
|
||||||
|
$useMinMax = true;
|
||||||
|
}
|
||||||
|
if (isset($position['max'])) {
|
||||||
|
$this->addUsingAlias(ExportCategoryTableMap::POSITION, $position['max'], Criteria::LESS_EQUAL);
|
||||||
|
$useMinMax = true;
|
||||||
|
}
|
||||||
|
if ($useMinMax) {
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
if (null === $comparison) {
|
||||||
|
$comparison = Criteria::IN;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->addUsingAlias(ExportCategoryTableMap::POSITION, $position, $comparison);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query on the created_at column
|
||||||
|
*
|
||||||
|
* Example usage:
|
||||||
|
* <code>
|
||||||
|
* $query->filterByCreatedAt('2011-03-14'); // WHERE created_at = '2011-03-14'
|
||||||
|
* $query->filterByCreatedAt('now'); // WHERE created_at = '2011-03-14'
|
||||||
|
* $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13'
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @param mixed $createdAt The value to use as filter.
|
||||||
|
* Values can be integers (unix timestamps), DateTime objects, or strings.
|
||||||
|
* Empty strings are treated as NULL.
|
||||||
|
* Use scalar values for equality.
|
||||||
|
* Use array values for in_array() equivalent.
|
||||||
|
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||||
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
|
*
|
||||||
|
* @return ChildExportCategoryQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByCreatedAt($createdAt = null, $comparison = null)
|
||||||
|
{
|
||||||
|
if (is_array($createdAt)) {
|
||||||
|
$useMinMax = false;
|
||||||
|
if (isset($createdAt['min'])) {
|
||||||
|
$this->addUsingAlias(ExportCategoryTableMap::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL);
|
||||||
|
$useMinMax = true;
|
||||||
|
}
|
||||||
|
if (isset($createdAt['max'])) {
|
||||||
|
$this->addUsingAlias(ExportCategoryTableMap::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL);
|
||||||
|
$useMinMax = true;
|
||||||
|
}
|
||||||
|
if ($useMinMax) {
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
if (null === $comparison) {
|
||||||
|
$comparison = Criteria::IN;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->addUsingAlias(ExportCategoryTableMap::CREATED_AT, $createdAt, $comparison);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query on the updated_at column
|
||||||
|
*
|
||||||
|
* Example usage:
|
||||||
|
* <code>
|
||||||
|
* $query->filterByUpdatedAt('2011-03-14'); // WHERE updated_at = '2011-03-14'
|
||||||
|
* $query->filterByUpdatedAt('now'); // WHERE updated_at = '2011-03-14'
|
||||||
|
* $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13'
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @param mixed $updatedAt The value to use as filter.
|
||||||
|
* Values can be integers (unix timestamps), DateTime objects, or strings.
|
||||||
|
* Empty strings are treated as NULL.
|
||||||
|
* Use scalar values for equality.
|
||||||
|
* Use array values for in_array() equivalent.
|
||||||
|
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||||
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
|
*
|
||||||
|
* @return ChildExportCategoryQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByUpdatedAt($updatedAt = null, $comparison = null)
|
||||||
|
{
|
||||||
|
if (is_array($updatedAt)) {
|
||||||
|
$useMinMax = false;
|
||||||
|
if (isset($updatedAt['min'])) {
|
||||||
|
$this->addUsingAlias(ExportCategoryTableMap::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);
|
||||||
|
$useMinMax = true;
|
||||||
|
}
|
||||||
|
if (isset($updatedAt['max'])) {
|
||||||
|
$this->addUsingAlias(ExportCategoryTableMap::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);
|
||||||
|
$useMinMax = true;
|
||||||
|
}
|
||||||
|
if ($useMinMax) {
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
if (null === $comparison) {
|
||||||
|
$comparison = Criteria::IN;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->addUsingAlias(ExportCategoryTableMap::UPDATED_AT, $updatedAt, $comparison);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query by a related \Thelia\Model\Export object
|
||||||
|
*
|
||||||
|
* @param \Thelia\Model\Export|ObjectCollection $export the related object to use as filter
|
||||||
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
|
*
|
||||||
|
* @return ChildExportCategoryQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByExport($export, $comparison = null)
|
||||||
|
{
|
||||||
|
if ($export instanceof \Thelia\Model\Export) {
|
||||||
|
return $this
|
||||||
|
->addUsingAlias(ExportCategoryTableMap::ID, $export->getExportCategoryId(), $comparison);
|
||||||
|
} elseif ($export instanceof ObjectCollection) {
|
||||||
|
return $this
|
||||||
|
->useExportQuery()
|
||||||
|
->filterByPrimaryKeys($export->getPrimaryKeys())
|
||||||
|
->endUse();
|
||||||
|
} else {
|
||||||
|
throw new PropelException('filterByExport() only accepts arguments of type \Thelia\Model\Export or Collection');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a JOIN clause to the query using the Export relation
|
||||||
|
*
|
||||||
|
* @param string $relationAlias optional alias for the relation
|
||||||
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||||
|
*
|
||||||
|
* @return ChildExportCategoryQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function joinExport($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||||
|
{
|
||||||
|
$tableMap = $this->getTableMap();
|
||||||
|
$relationMap = $tableMap->getRelation('Export');
|
||||||
|
|
||||||
|
// create a ModelJoin object for this join
|
||||||
|
$join = new ModelJoin();
|
||||||
|
$join->setJoinType($joinType);
|
||||||
|
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
|
||||||
|
if ($previousJoin = $this->getPreviousJoin()) {
|
||||||
|
$join->setPreviousJoin($previousJoin);
|
||||||
|
}
|
||||||
|
|
||||||
|
// add the ModelJoin to the current object
|
||||||
|
if ($relationAlias) {
|
||||||
|
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||||
|
$this->addJoinObject($join, $relationAlias);
|
||||||
|
} else {
|
||||||
|
$this->addJoinObject($join, 'Export');
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use the Export relation Export object
|
||||||
|
*
|
||||||
|
* @see useQuery()
|
||||||
|
*
|
||||||
|
* @param string $relationAlias optional alias for the relation,
|
||||||
|
* to be used as main alias in the secondary query
|
||||||
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||||
|
*
|
||||||
|
* @return \Thelia\Model\ExportQuery A secondary query class using the current class as primary query
|
||||||
|
*/
|
||||||
|
public function useExportQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||||
|
{
|
||||||
|
return $this
|
||||||
|
->joinExport($relationAlias, $joinType)
|
||||||
|
->useQuery($relationAlias ? $relationAlias : 'Export', '\Thelia\Model\ExportQuery');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query by a related \Thelia\Model\ExportCategoryI18n object
|
||||||
|
*
|
||||||
|
* @param \Thelia\Model\ExportCategoryI18n|ObjectCollection $exportCategoryI18n the related object to use as filter
|
||||||
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
|
*
|
||||||
|
* @return ChildExportCategoryQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByExportCategoryI18n($exportCategoryI18n, $comparison = null)
|
||||||
|
{
|
||||||
|
if ($exportCategoryI18n instanceof \Thelia\Model\ExportCategoryI18n) {
|
||||||
|
return $this
|
||||||
|
->addUsingAlias(ExportCategoryTableMap::ID, $exportCategoryI18n->getId(), $comparison);
|
||||||
|
} elseif ($exportCategoryI18n instanceof ObjectCollection) {
|
||||||
|
return $this
|
||||||
|
->useExportCategoryI18nQuery()
|
||||||
|
->filterByPrimaryKeys($exportCategoryI18n->getPrimaryKeys())
|
||||||
|
->endUse();
|
||||||
|
} else {
|
||||||
|
throw new PropelException('filterByExportCategoryI18n() only accepts arguments of type \Thelia\Model\ExportCategoryI18n or Collection');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a JOIN clause to the query using the ExportCategoryI18n relation
|
||||||
|
*
|
||||||
|
* @param string $relationAlias optional alias for the relation
|
||||||
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||||
|
*
|
||||||
|
* @return ChildExportCategoryQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function joinExportCategoryI18n($relationAlias = null, $joinType = 'LEFT JOIN')
|
||||||
|
{
|
||||||
|
$tableMap = $this->getTableMap();
|
||||||
|
$relationMap = $tableMap->getRelation('ExportCategoryI18n');
|
||||||
|
|
||||||
|
// create a ModelJoin object for this join
|
||||||
|
$join = new ModelJoin();
|
||||||
|
$join->setJoinType($joinType);
|
||||||
|
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
|
||||||
|
if ($previousJoin = $this->getPreviousJoin()) {
|
||||||
|
$join->setPreviousJoin($previousJoin);
|
||||||
|
}
|
||||||
|
|
||||||
|
// add the ModelJoin to the current object
|
||||||
|
if ($relationAlias) {
|
||||||
|
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||||
|
$this->addJoinObject($join, $relationAlias);
|
||||||
|
} else {
|
||||||
|
$this->addJoinObject($join, 'ExportCategoryI18n');
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use the ExportCategoryI18n relation ExportCategoryI18n object
|
||||||
|
*
|
||||||
|
* @see useQuery()
|
||||||
|
*
|
||||||
|
* @param string $relationAlias optional alias for the relation,
|
||||||
|
* to be used as main alias in the secondary query
|
||||||
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||||
|
*
|
||||||
|
* @return \Thelia\Model\ExportCategoryI18nQuery A secondary query class using the current class as primary query
|
||||||
|
*/
|
||||||
|
public function useExportCategoryI18nQuery($relationAlias = null, $joinType = 'LEFT JOIN')
|
||||||
|
{
|
||||||
|
return $this
|
||||||
|
->joinExportCategoryI18n($relationAlias, $joinType)
|
||||||
|
->useQuery($relationAlias ? $relationAlias : 'ExportCategoryI18n', '\Thelia\Model\ExportCategoryI18nQuery');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Exclude object from result
|
||||||
|
*
|
||||||
|
* @param ChildExportCategory $exportCategory Object to remove from the list of results
|
||||||
|
*
|
||||||
|
* @return ChildExportCategoryQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function prune($exportCategory = null)
|
||||||
|
{
|
||||||
|
if ($exportCategory) {
|
||||||
|
$this->addUsingAlias(ExportCategoryTableMap::ID, $exportCategory->getId(), Criteria::NOT_EQUAL);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deletes all rows from the export_category table.
|
||||||
|
*
|
||||||
|
* @param ConnectionInterface $con the connection to use
|
||||||
|
* @return int The number of affected rows (if supported by underlying database driver).
|
||||||
|
*/
|
||||||
|
public function doDeleteAll(ConnectionInterface $con = null)
|
||||||
|
{
|
||||||
|
if (null === $con) {
|
||||||
|
$con = Propel::getServiceContainer()->getWriteConnection(ExportCategoryTableMap::DATABASE_NAME);
|
||||||
|
}
|
||||||
|
$affectedRows = 0; // initialize var to track total num of affected rows
|
||||||
|
try {
|
||||||
|
// use transaction because $criteria could contain info
|
||||||
|
// for more than one table or we could emulating ON DELETE CASCADE, etc.
|
||||||
|
$con->beginTransaction();
|
||||||
|
$affectedRows += parent::doDeleteAll($con);
|
||||||
|
// Because this db requires some delete cascade/set null emulation, we have to
|
||||||
|
// clear the cached instance *after* the emulation has happened (since
|
||||||
|
// instances get re-added by the select statement contained therein).
|
||||||
|
ExportCategoryTableMap::clearInstancePool();
|
||||||
|
ExportCategoryTableMap::clearRelatedInstancePool();
|
||||||
|
|
||||||
|
$con->commit();
|
||||||
|
} catch (PropelException $e) {
|
||||||
|
$con->rollBack();
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $affectedRows;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Performs a DELETE on the database, given a ChildExportCategory or Criteria object OR a primary key value.
|
||||||
|
*
|
||||||
|
* @param mixed $values Criteria or ChildExportCategory object or primary key or array of primary keys
|
||||||
|
* which is used to create the DELETE statement
|
||||||
|
* @param ConnectionInterface $con the connection to use
|
||||||
|
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
|
||||||
|
* if supported by native driver or if emulated using Propel.
|
||||||
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
|
* rethrown wrapped into a PropelException.
|
||||||
|
*/
|
||||||
|
public function delete(ConnectionInterface $con = null)
|
||||||
|
{
|
||||||
|
if (null === $con) {
|
||||||
|
$con = Propel::getServiceContainer()->getWriteConnection(ExportCategoryTableMap::DATABASE_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
$criteria = $this;
|
||||||
|
|
||||||
|
// Set the correct dbName
|
||||||
|
$criteria->setDbName(ExportCategoryTableMap::DATABASE_NAME);
|
||||||
|
|
||||||
|
$affectedRows = 0; // initialize var to track total num of affected rows
|
||||||
|
|
||||||
|
try {
|
||||||
|
// use transaction because $criteria could contain info
|
||||||
|
// for more than one table or we could emulating ON DELETE CASCADE, etc.
|
||||||
|
$con->beginTransaction();
|
||||||
|
|
||||||
|
|
||||||
|
ExportCategoryTableMap::removeInstanceFromPool($criteria);
|
||||||
|
|
||||||
|
$affectedRows += ModelCriteria::delete($con);
|
||||||
|
ExportCategoryTableMap::clearRelatedInstancePool();
|
||||||
|
$con->commit();
|
||||||
|
|
||||||
|
return $affectedRows;
|
||||||
|
} catch (PropelException $e) {
|
||||||
|
$con->rollBack();
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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 ChildExportCategoryQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
||||||
|
{
|
||||||
|
$relationName = $relationAlias ? $relationAlias : 'ExportCategoryI18n';
|
||||||
|
|
||||||
|
return $this
|
||||||
|
->joinExportCategoryI18n($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 ChildExportCategoryQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN)
|
||||||
|
{
|
||||||
|
$this
|
||||||
|
->joinI18n($locale, null, $joinType)
|
||||||
|
->with('ExportCategoryI18n');
|
||||||
|
$this->with['ExportCategoryI18n']->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 ChildExportCategoryI18nQuery 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 : 'ExportCategoryI18n', '\Thelia\Model\ExportCategoryI18nQuery');
|
||||||
|
}
|
||||||
|
|
||||||
|
// timestampable behavior
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter by the latest updated
|
||||||
|
*
|
||||||
|
* @param int $nbDays Maximum age of the latest update in days
|
||||||
|
*
|
||||||
|
* @return ChildExportCategoryQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function recentlyUpdated($nbDays = 7)
|
||||||
|
{
|
||||||
|
return $this->addUsingAlias(ExportCategoryTableMap::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter by the latest created
|
||||||
|
*
|
||||||
|
* @param int $nbDays Maximum age of in days
|
||||||
|
*
|
||||||
|
* @return ChildExportCategoryQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function recentlyCreated($nbDays = 7)
|
||||||
|
{
|
||||||
|
return $this->addUsingAlias(ExportCategoryTableMap::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Order by update date desc
|
||||||
|
*
|
||||||
|
* @return ChildExportCategoryQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function lastUpdatedFirst()
|
||||||
|
{
|
||||||
|
return $this->addDescendingOrderByColumn(ExportCategoryTableMap::UPDATED_AT);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Order by update date asc
|
||||||
|
*
|
||||||
|
* @return ChildExportCategoryQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function firstUpdatedFirst()
|
||||||
|
{
|
||||||
|
return $this->addAscendingOrderByColumn(ExportCategoryTableMap::UPDATED_AT);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Order by create date desc
|
||||||
|
*
|
||||||
|
* @return ChildExportCategoryQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function lastCreatedFirst()
|
||||||
|
{
|
||||||
|
return $this->addDescendingOrderByColumn(ExportCategoryTableMap::CREATED_AT);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Order by create date asc
|
||||||
|
*
|
||||||
|
* @return ChildExportCategoryQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function firstCreatedFirst()
|
||||||
|
{
|
||||||
|
return $this->addAscendingOrderByColumn(ExportCategoryTableMap::CREATED_AT);
|
||||||
|
}
|
||||||
|
|
||||||
|
} // ExportCategoryQuery
|
||||||
1326
core/lib/Thelia/Model/Base/ExportI18n.php
Normal file
1326
core/lib/Thelia/Model/Base/ExportI18n.php
Normal file
File diff suppressed because it is too large
Load Diff
541
core/lib/Thelia/Model/Base/ExportI18nQuery.php
Normal file
541
core/lib/Thelia/Model/Base/ExportI18nQuery.php
Normal file
@@ -0,0 +1,541 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Thelia\Model\Base;
|
||||||
|
|
||||||
|
use \Exception;
|
||||||
|
use \PDO;
|
||||||
|
use Propel\Runtime\Propel;
|
||||||
|
use Propel\Runtime\ActiveQuery\Criteria;
|
||||||
|
use Propel\Runtime\ActiveQuery\ModelCriteria;
|
||||||
|
use Propel\Runtime\ActiveQuery\ModelJoin;
|
||||||
|
use Propel\Runtime\Collection\Collection;
|
||||||
|
use Propel\Runtime\Collection\ObjectCollection;
|
||||||
|
use Propel\Runtime\Connection\ConnectionInterface;
|
||||||
|
use Propel\Runtime\Exception\PropelException;
|
||||||
|
use Thelia\Model\ExportI18n as ChildExportI18n;
|
||||||
|
use Thelia\Model\ExportI18nQuery as ChildExportI18nQuery;
|
||||||
|
use Thelia\Model\Map\ExportI18nTableMap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Base class that represents a query for the 'export_i18n' table.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @method ChildExportI18nQuery orderById($order = Criteria::ASC) Order by the id column
|
||||||
|
* @method ChildExportI18nQuery orderByLocale($order = Criteria::ASC) Order by the locale column
|
||||||
|
* @method ChildExportI18nQuery orderByTitle($order = Criteria::ASC) Order by the title column
|
||||||
|
* @method ChildExportI18nQuery orderByDescription($order = Criteria::ASC) Order by the description column
|
||||||
|
*
|
||||||
|
* @method ChildExportI18nQuery groupById() Group by the id column
|
||||||
|
* @method ChildExportI18nQuery groupByLocale() Group by the locale column
|
||||||
|
* @method ChildExportI18nQuery groupByTitle() Group by the title column
|
||||||
|
* @method ChildExportI18nQuery groupByDescription() Group by the description column
|
||||||
|
*
|
||||||
|
* @method ChildExportI18nQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
|
||||||
|
* @method ChildExportI18nQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
||||||
|
* @method ChildExportI18nQuery innerJoin($relation) Adds a INNER JOIN clause to the query
|
||||||
|
*
|
||||||
|
* @method ChildExportI18nQuery leftJoinExport($relationAlias = null) Adds a LEFT JOIN clause to the query using the Export relation
|
||||||
|
* @method ChildExportI18nQuery rightJoinExport($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Export relation
|
||||||
|
* @method ChildExportI18nQuery innerJoinExport($relationAlias = null) Adds a INNER JOIN clause to the query using the Export relation
|
||||||
|
*
|
||||||
|
* @method ChildExportI18n findOne(ConnectionInterface $con = null) Return the first ChildExportI18n matching the query
|
||||||
|
* @method ChildExportI18n findOneOrCreate(ConnectionInterface $con = null) Return the first ChildExportI18n matching the query, or a new ChildExportI18n object populated from the query conditions when no match is found
|
||||||
|
*
|
||||||
|
* @method ChildExportI18n findOneById(int $id) Return the first ChildExportI18n filtered by the id column
|
||||||
|
* @method ChildExportI18n findOneByLocale(string $locale) Return the first ChildExportI18n filtered by the locale column
|
||||||
|
* @method ChildExportI18n findOneByTitle(string $title) Return the first ChildExportI18n filtered by the title column
|
||||||
|
* @method ChildExportI18n findOneByDescription(string $description) Return the first ChildExportI18n filtered by the description column
|
||||||
|
*
|
||||||
|
* @method array findById(int $id) Return ChildExportI18n objects filtered by the id column
|
||||||
|
* @method array findByLocale(string $locale) Return ChildExportI18n objects filtered by the locale column
|
||||||
|
* @method array findByTitle(string $title) Return ChildExportI18n objects filtered by the title column
|
||||||
|
* @method array findByDescription(string $description) Return ChildExportI18n objects filtered by the description column
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
abstract class ExportI18nQuery extends ModelCriteria
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initializes internal state of \Thelia\Model\Base\ExportI18nQuery object.
|
||||||
|
*
|
||||||
|
* @param string $dbName The database name
|
||||||
|
* @param string $modelName The phpName of a model, e.g. 'Book'
|
||||||
|
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
|
||||||
|
*/
|
||||||
|
public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\ExportI18n', $modelAlias = null)
|
||||||
|
{
|
||||||
|
parent::__construct($dbName, $modelName, $modelAlias);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a new ChildExportI18nQuery object.
|
||||||
|
*
|
||||||
|
* @param string $modelAlias The alias of a model in the query
|
||||||
|
* @param Criteria $criteria Optional Criteria to build the query from
|
||||||
|
*
|
||||||
|
* @return ChildExportI18nQuery
|
||||||
|
*/
|
||||||
|
public static function create($modelAlias = null, $criteria = null)
|
||||||
|
{
|
||||||
|
if ($criteria instanceof \Thelia\Model\ExportI18nQuery) {
|
||||||
|
return $criteria;
|
||||||
|
}
|
||||||
|
$query = new \Thelia\Model\ExportI18nQuery();
|
||||||
|
if (null !== $modelAlias) {
|
||||||
|
$query->setModelAlias($modelAlias);
|
||||||
|
}
|
||||||
|
if ($criteria instanceof Criteria) {
|
||||||
|
$query->mergeWith($criteria);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $query;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find object by primary key.
|
||||||
|
* Propel uses the instance pool to skip the database if the object exists.
|
||||||
|
* Go fast if the query is untouched.
|
||||||
|
*
|
||||||
|
* <code>
|
||||||
|
* $obj = $c->findPk(array(12, 34), $con);
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @param array[$id, $locale] $key Primary key to use for the query
|
||||||
|
* @param ConnectionInterface $con an optional connection object
|
||||||
|
*
|
||||||
|
* @return ChildExportI18n|array|mixed the result, formatted by the current formatter
|
||||||
|
*/
|
||||||
|
public function findPk($key, $con = null)
|
||||||
|
{
|
||||||
|
if ($key === null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
if ((null !== ($obj = ExportI18nTableMap::getInstanceFromPool(serialize(array((string) $key[0], (string) $key[1]))))) && !$this->formatter) {
|
||||||
|
// the object is already in the instance pool
|
||||||
|
return $obj;
|
||||||
|
}
|
||||||
|
if ($con === null) {
|
||||||
|
$con = Propel::getServiceContainer()->getReadConnection(ExportI18nTableMap::DATABASE_NAME);
|
||||||
|
}
|
||||||
|
$this->basePreSelect($con);
|
||||||
|
if ($this->formatter || $this->modelAlias || $this->with || $this->select
|
||||||
|
|| $this->selectColumns || $this->asColumns || $this->selectModifiers
|
||||||
|
|| $this->map || $this->having || $this->joins) {
|
||||||
|
return $this->findPkComplex($key, $con);
|
||||||
|
} else {
|
||||||
|
return $this->findPkSimple($key, $con);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find object by primary key using raw SQL to go fast.
|
||||||
|
* Bypass doSelect() and the object formatter by using generated code.
|
||||||
|
*
|
||||||
|
* @param mixed $key Primary key to use for the query
|
||||||
|
* @param ConnectionInterface $con A connection object
|
||||||
|
*
|
||||||
|
* @return ChildExportI18n A model object, or null if the key is not found
|
||||||
|
*/
|
||||||
|
protected function findPkSimple($key, $con)
|
||||||
|
{
|
||||||
|
$sql = 'SELECT `ID`, `LOCALE`, `TITLE`, `DESCRIPTION` FROM `export_i18n` WHERE `ID` = :p0 AND `LOCALE` = :p1';
|
||||||
|
try {
|
||||||
|
$stmt = $con->prepare($sql);
|
||||||
|
$stmt->bindValue(':p0', $key[0], PDO::PARAM_INT);
|
||||||
|
$stmt->bindValue(':p1', $key[1], PDO::PARAM_STR);
|
||||||
|
$stmt->execute();
|
||||||
|
} catch (Exception $e) {
|
||||||
|
Propel::log($e->getMessage(), Propel::LOG_ERR);
|
||||||
|
throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), 0, $e);
|
||||||
|
}
|
||||||
|
$obj = null;
|
||||||
|
if ($row = $stmt->fetch(\PDO::FETCH_NUM)) {
|
||||||
|
$obj = new ChildExportI18n();
|
||||||
|
$obj->hydrate($row);
|
||||||
|
ExportI18nTableMap::addInstanceToPool($obj, serialize(array((string) $key[0], (string) $key[1])));
|
||||||
|
}
|
||||||
|
$stmt->closeCursor();
|
||||||
|
|
||||||
|
return $obj;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find object by primary key.
|
||||||
|
*
|
||||||
|
* @param mixed $key Primary key to use for the query
|
||||||
|
* @param ConnectionInterface $con A connection object
|
||||||
|
*
|
||||||
|
* @return ChildExportI18n|array|mixed the result, formatted by the current formatter
|
||||||
|
*/
|
||||||
|
protected function findPkComplex($key, $con)
|
||||||
|
{
|
||||||
|
// As the query uses a PK condition, no limit(1) is necessary.
|
||||||
|
$criteria = $this->isKeepQuery() ? clone $this : $this;
|
||||||
|
$dataFetcher = $criteria
|
||||||
|
->filterByPrimaryKey($key)
|
||||||
|
->doSelect($con);
|
||||||
|
|
||||||
|
return $criteria->getFormatter()->init($criteria)->formatOne($dataFetcher);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find objects by primary key
|
||||||
|
* <code>
|
||||||
|
* $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con);
|
||||||
|
* </code>
|
||||||
|
* @param array $keys Primary keys to use for the query
|
||||||
|
* @param ConnectionInterface $con an optional connection object
|
||||||
|
*
|
||||||
|
* @return ObjectCollection|array|mixed the list of results, formatted by the current formatter
|
||||||
|
*/
|
||||||
|
public function findPks($keys, $con = null)
|
||||||
|
{
|
||||||
|
if (null === $con) {
|
||||||
|
$con = Propel::getServiceContainer()->getReadConnection($this->getDbName());
|
||||||
|
}
|
||||||
|
$this->basePreSelect($con);
|
||||||
|
$criteria = $this->isKeepQuery() ? clone $this : $this;
|
||||||
|
$dataFetcher = $criteria
|
||||||
|
->filterByPrimaryKeys($keys)
|
||||||
|
->doSelect($con);
|
||||||
|
|
||||||
|
return $criteria->getFormatter()->init($criteria)->format($dataFetcher);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query by primary key
|
||||||
|
*
|
||||||
|
* @param mixed $key Primary key to use for the query
|
||||||
|
*
|
||||||
|
* @return ChildExportI18nQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByPrimaryKey($key)
|
||||||
|
{
|
||||||
|
$this->addUsingAlias(ExportI18nTableMap::ID, $key[0], Criteria::EQUAL);
|
||||||
|
$this->addUsingAlias(ExportI18nTableMap::LOCALE, $key[1], Criteria::EQUAL);
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query by a list of primary keys
|
||||||
|
*
|
||||||
|
* @param array $keys The list of primary key to use for the query
|
||||||
|
*
|
||||||
|
* @return ChildExportI18nQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByPrimaryKeys($keys)
|
||||||
|
{
|
||||||
|
if (empty($keys)) {
|
||||||
|
return $this->add(null, '1<>1', Criteria::CUSTOM);
|
||||||
|
}
|
||||||
|
foreach ($keys as $key) {
|
||||||
|
$cton0 = $this->getNewCriterion(ExportI18nTableMap::ID, $key[0], Criteria::EQUAL);
|
||||||
|
$cton1 = $this->getNewCriterion(ExportI18nTableMap::LOCALE, $key[1], Criteria::EQUAL);
|
||||||
|
$cton0->addAnd($cton1);
|
||||||
|
$this->addOr($cton0);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query on the id column
|
||||||
|
*
|
||||||
|
* Example usage:
|
||||||
|
* <code>
|
||||||
|
* $query->filterById(1234); // WHERE id = 1234
|
||||||
|
* $query->filterById(array(12, 34)); // WHERE id IN (12, 34)
|
||||||
|
* $query->filterById(array('min' => 12)); // WHERE id > 12
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @see filterByExport()
|
||||||
|
*
|
||||||
|
* @param mixed $id The value to use as filter.
|
||||||
|
* Use scalar values for equality.
|
||||||
|
* Use array values for in_array() equivalent.
|
||||||
|
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||||
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
|
*
|
||||||
|
* @return ChildExportI18nQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterById($id = null, $comparison = null)
|
||||||
|
{
|
||||||
|
if (is_array($id)) {
|
||||||
|
$useMinMax = false;
|
||||||
|
if (isset($id['min'])) {
|
||||||
|
$this->addUsingAlias(ExportI18nTableMap::ID, $id['min'], Criteria::GREATER_EQUAL);
|
||||||
|
$useMinMax = true;
|
||||||
|
}
|
||||||
|
if (isset($id['max'])) {
|
||||||
|
$this->addUsingAlias(ExportI18nTableMap::ID, $id['max'], Criteria::LESS_EQUAL);
|
||||||
|
$useMinMax = true;
|
||||||
|
}
|
||||||
|
if ($useMinMax) {
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
if (null === $comparison) {
|
||||||
|
$comparison = Criteria::IN;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->addUsingAlias(ExportI18nTableMap::ID, $id, $comparison);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query on the locale column
|
||||||
|
*
|
||||||
|
* Example usage:
|
||||||
|
* <code>
|
||||||
|
* $query->filterByLocale('fooValue'); // WHERE locale = 'fooValue'
|
||||||
|
* $query->filterByLocale('%fooValue%'); // WHERE locale LIKE '%fooValue%'
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @param string $locale 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 ChildExportI18nQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByLocale($locale = null, $comparison = null)
|
||||||
|
{
|
||||||
|
if (null === $comparison) {
|
||||||
|
if (is_array($locale)) {
|
||||||
|
$comparison = Criteria::IN;
|
||||||
|
} elseif (preg_match('/[\%\*]/', $locale)) {
|
||||||
|
$locale = str_replace('*', '%', $locale);
|
||||||
|
$comparison = Criteria::LIKE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->addUsingAlias(ExportI18nTableMap::LOCALE, $locale, $comparison);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query on the title column
|
||||||
|
*
|
||||||
|
* Example usage:
|
||||||
|
* <code>
|
||||||
|
* $query->filterByTitle('fooValue'); // WHERE title = 'fooValue'
|
||||||
|
* $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%'
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @param string $title 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 ChildExportI18nQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByTitle($title = null, $comparison = null)
|
||||||
|
{
|
||||||
|
if (null === $comparison) {
|
||||||
|
if (is_array($title)) {
|
||||||
|
$comparison = Criteria::IN;
|
||||||
|
} elseif (preg_match('/[\%\*]/', $title)) {
|
||||||
|
$title = str_replace('*', '%', $title);
|
||||||
|
$comparison = Criteria::LIKE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->addUsingAlias(ExportI18nTableMap::TITLE, $title, $comparison);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query on the description column
|
||||||
|
*
|
||||||
|
* Example usage:
|
||||||
|
* <code>
|
||||||
|
* $query->filterByDescription('fooValue'); // WHERE description = 'fooValue'
|
||||||
|
* $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%'
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @param string $description 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 ChildExportI18nQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByDescription($description = null, $comparison = null)
|
||||||
|
{
|
||||||
|
if (null === $comparison) {
|
||||||
|
if (is_array($description)) {
|
||||||
|
$comparison = Criteria::IN;
|
||||||
|
} elseif (preg_match('/[\%\*]/', $description)) {
|
||||||
|
$description = str_replace('*', '%', $description);
|
||||||
|
$comparison = Criteria::LIKE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->addUsingAlias(ExportI18nTableMap::DESCRIPTION, $description, $comparison);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query by a related \Thelia\Model\Export object
|
||||||
|
*
|
||||||
|
* @param \Thelia\Model\Export|ObjectCollection $export The related object(s) to use as filter
|
||||||
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
|
*
|
||||||
|
* @return ChildExportI18nQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByExport($export, $comparison = null)
|
||||||
|
{
|
||||||
|
if ($export instanceof \Thelia\Model\Export) {
|
||||||
|
return $this
|
||||||
|
->addUsingAlias(ExportI18nTableMap::ID, $export->getId(), $comparison);
|
||||||
|
} elseif ($export instanceof ObjectCollection) {
|
||||||
|
if (null === $comparison) {
|
||||||
|
$comparison = Criteria::IN;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this
|
||||||
|
->addUsingAlias(ExportI18nTableMap::ID, $export->toKeyValue('PrimaryKey', 'Id'), $comparison);
|
||||||
|
} else {
|
||||||
|
throw new PropelException('filterByExport() only accepts arguments of type \Thelia\Model\Export or Collection');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a JOIN clause to the query using the Export relation
|
||||||
|
*
|
||||||
|
* @param string $relationAlias optional alias for the relation
|
||||||
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||||
|
*
|
||||||
|
* @return ChildExportI18nQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function joinExport($relationAlias = null, $joinType = 'LEFT JOIN')
|
||||||
|
{
|
||||||
|
$tableMap = $this->getTableMap();
|
||||||
|
$relationMap = $tableMap->getRelation('Export');
|
||||||
|
|
||||||
|
// create a ModelJoin object for this join
|
||||||
|
$join = new ModelJoin();
|
||||||
|
$join->setJoinType($joinType);
|
||||||
|
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
|
||||||
|
if ($previousJoin = $this->getPreviousJoin()) {
|
||||||
|
$join->setPreviousJoin($previousJoin);
|
||||||
|
}
|
||||||
|
|
||||||
|
// add the ModelJoin to the current object
|
||||||
|
if ($relationAlias) {
|
||||||
|
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||||
|
$this->addJoinObject($join, $relationAlias);
|
||||||
|
} else {
|
||||||
|
$this->addJoinObject($join, 'Export');
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use the Export relation Export object
|
||||||
|
*
|
||||||
|
* @see useQuery()
|
||||||
|
*
|
||||||
|
* @param string $relationAlias optional alias for the relation,
|
||||||
|
* to be used as main alias in the secondary query
|
||||||
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||||
|
*
|
||||||
|
* @return \Thelia\Model\ExportQuery A secondary query class using the current class as primary query
|
||||||
|
*/
|
||||||
|
public function useExportQuery($relationAlias = null, $joinType = 'LEFT JOIN')
|
||||||
|
{
|
||||||
|
return $this
|
||||||
|
->joinExport($relationAlias, $joinType)
|
||||||
|
->useQuery($relationAlias ? $relationAlias : 'Export', '\Thelia\Model\ExportQuery');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Exclude object from result
|
||||||
|
*
|
||||||
|
* @param ChildExportI18n $exportI18n Object to remove from the list of results
|
||||||
|
*
|
||||||
|
* @return ChildExportI18nQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function prune($exportI18n = null)
|
||||||
|
{
|
||||||
|
if ($exportI18n) {
|
||||||
|
$this->addCond('pruneCond0', $this->getAliasedColName(ExportI18nTableMap::ID), $exportI18n->getId(), Criteria::NOT_EQUAL);
|
||||||
|
$this->addCond('pruneCond1', $this->getAliasedColName(ExportI18nTableMap::LOCALE), $exportI18n->getLocale(), Criteria::NOT_EQUAL);
|
||||||
|
$this->combine(array('pruneCond0', 'pruneCond1'), Criteria::LOGICAL_OR);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deletes all rows from the export_i18n table.
|
||||||
|
*
|
||||||
|
* @param ConnectionInterface $con the connection to use
|
||||||
|
* @return int The number of affected rows (if supported by underlying database driver).
|
||||||
|
*/
|
||||||
|
public function doDeleteAll(ConnectionInterface $con = null)
|
||||||
|
{
|
||||||
|
if (null === $con) {
|
||||||
|
$con = Propel::getServiceContainer()->getWriteConnection(ExportI18nTableMap::DATABASE_NAME);
|
||||||
|
}
|
||||||
|
$affectedRows = 0; // initialize var to track total num of affected rows
|
||||||
|
try {
|
||||||
|
// use transaction because $criteria could contain info
|
||||||
|
// for more than one table or we could emulating ON DELETE CASCADE, etc.
|
||||||
|
$con->beginTransaction();
|
||||||
|
$affectedRows += parent::doDeleteAll($con);
|
||||||
|
// Because this db requires some delete cascade/set null emulation, we have to
|
||||||
|
// clear the cached instance *after* the emulation has happened (since
|
||||||
|
// instances get re-added by the select statement contained therein).
|
||||||
|
ExportI18nTableMap::clearInstancePool();
|
||||||
|
ExportI18nTableMap::clearRelatedInstancePool();
|
||||||
|
|
||||||
|
$con->commit();
|
||||||
|
} catch (PropelException $e) {
|
||||||
|
$con->rollBack();
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $affectedRows;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Performs a DELETE on the database, given a ChildExportI18n or Criteria object OR a primary key value.
|
||||||
|
*
|
||||||
|
* @param mixed $values Criteria or ChildExportI18n object or primary key or array of primary keys
|
||||||
|
* which is used to create the DELETE statement
|
||||||
|
* @param ConnectionInterface $con the connection to use
|
||||||
|
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
|
||||||
|
* if supported by native driver or if emulated using Propel.
|
||||||
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
|
* rethrown wrapped into a PropelException.
|
||||||
|
*/
|
||||||
|
public function delete(ConnectionInterface $con = null)
|
||||||
|
{
|
||||||
|
if (null === $con) {
|
||||||
|
$con = Propel::getServiceContainer()->getWriteConnection(ExportI18nTableMap::DATABASE_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
$criteria = $this;
|
||||||
|
|
||||||
|
// Set the correct dbName
|
||||||
|
$criteria->setDbName(ExportI18nTableMap::DATABASE_NAME);
|
||||||
|
|
||||||
|
$affectedRows = 0; // initialize var to track total num of affected rows
|
||||||
|
|
||||||
|
try {
|
||||||
|
// use transaction because $criteria could contain info
|
||||||
|
// for more than one table or we could emulating ON DELETE CASCADE, etc.
|
||||||
|
$con->beginTransaction();
|
||||||
|
|
||||||
|
|
||||||
|
ExportI18nTableMap::removeInstanceFromPool($criteria);
|
||||||
|
|
||||||
|
$affectedRows += ModelCriteria::delete($con);
|
||||||
|
ExportI18nTableMap::clearRelatedInstancePool();
|
||||||
|
$con->commit();
|
||||||
|
|
||||||
|
return $affectedRows;
|
||||||
|
} catch (PropelException $e) {
|
||||||
|
$con->rollBack();
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} // ExportI18nQuery
|
||||||
813
core/lib/Thelia/Model/Base/ExportQuery.php
Normal file
813
core/lib/Thelia/Model/Base/ExportQuery.php
Normal file
@@ -0,0 +1,813 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Thelia\Model\Base;
|
||||||
|
|
||||||
|
use \Exception;
|
||||||
|
use \PDO;
|
||||||
|
use Propel\Runtime\Propel;
|
||||||
|
use Propel\Runtime\ActiveQuery\Criteria;
|
||||||
|
use Propel\Runtime\ActiveQuery\ModelCriteria;
|
||||||
|
use Propel\Runtime\ActiveQuery\ModelJoin;
|
||||||
|
use Propel\Runtime\Collection\Collection;
|
||||||
|
use Propel\Runtime\Collection\ObjectCollection;
|
||||||
|
use Propel\Runtime\Connection\ConnectionInterface;
|
||||||
|
use Propel\Runtime\Exception\PropelException;
|
||||||
|
use Thelia\Model\Export as ChildExport;
|
||||||
|
use Thelia\Model\ExportI18nQuery as ChildExportI18nQuery;
|
||||||
|
use Thelia\Model\ExportQuery as ChildExportQuery;
|
||||||
|
use Thelia\Model\Map\ExportTableMap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Base class that represents a query for the 'export' table.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @method ChildExportQuery orderById($order = Criteria::ASC) Order by the id 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 orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
|
||||||
|
* @method ChildExportQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
|
||||||
|
*
|
||||||
|
* @method ChildExportQuery groupById() Group by the id column
|
||||||
|
* @method ChildExportQuery groupByExportCategoryId() Group by the export_category_id column
|
||||||
|
* @method ChildExportQuery groupByPosition() Group by the position column
|
||||||
|
* @method ChildExportQuery groupByCreatedAt() Group by the created_at column
|
||||||
|
* @method ChildExportQuery groupByUpdatedAt() Group by the updated_at column
|
||||||
|
*
|
||||||
|
* @method ChildExportQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
|
||||||
|
* @method ChildExportQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
||||||
|
* @method ChildExportQuery innerJoin($relation) Adds a INNER JOIN clause to the query
|
||||||
|
*
|
||||||
|
* @method ChildExportQuery leftJoinExportCategory($relationAlias = null) Adds a LEFT JOIN clause to the query using the ExportCategory relation
|
||||||
|
* @method ChildExportQuery rightJoinExportCategory($relationAlias = null) Adds a RIGHT JOIN clause to the query using the ExportCategory relation
|
||||||
|
* @method ChildExportQuery innerJoinExportCategory($relationAlias = null) Adds a INNER JOIN clause to the query using the ExportCategory relation
|
||||||
|
*
|
||||||
|
* @method ChildExportQuery leftJoinExportI18n($relationAlias = null) Adds a LEFT JOIN clause to the query using the ExportI18n relation
|
||||||
|
* @method ChildExportQuery rightJoinExportI18n($relationAlias = null) Adds a RIGHT JOIN clause to the query using the ExportI18n relation
|
||||||
|
* @method ChildExportQuery innerJoinExportI18n($relationAlias = null) Adds a INNER JOIN clause to the query using the ExportI18n relation
|
||||||
|
*
|
||||||
|
* @method ChildExport findOne(ConnectionInterface $con = null) Return the first ChildExport matching the query
|
||||||
|
* @method ChildExport findOneOrCreate(ConnectionInterface $con = null) Return the first ChildExport matching the query, or a new ChildExport object populated from the query conditions when no match is found
|
||||||
|
*
|
||||||
|
* @method ChildExport findOneById(int $id) Return the first ChildExport filtered by the id 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 findOneByCreatedAt(string $created_at) Return the first ChildExport filtered by the created_at column
|
||||||
|
* @method ChildExport findOneByUpdatedAt(string $updated_at) Return the first ChildExport filtered by the updated_at column
|
||||||
|
*
|
||||||
|
* @method array findById(int $id) Return ChildExport objects filtered by the id column
|
||||||
|
* @method array 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 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
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
abstract class ExportQuery extends ModelCriteria
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initializes internal state of \Thelia\Model\Base\ExportQuery object.
|
||||||
|
*
|
||||||
|
* @param string $dbName The database name
|
||||||
|
* @param string $modelName The phpName of a model, e.g. 'Book'
|
||||||
|
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
|
||||||
|
*/
|
||||||
|
public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\Export', $modelAlias = null)
|
||||||
|
{
|
||||||
|
parent::__construct($dbName, $modelName, $modelAlias);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a new ChildExportQuery object.
|
||||||
|
*
|
||||||
|
* @param string $modelAlias The alias of a model in the query
|
||||||
|
* @param Criteria $criteria Optional Criteria to build the query from
|
||||||
|
*
|
||||||
|
* @return ChildExportQuery
|
||||||
|
*/
|
||||||
|
public static function create($modelAlias = null, $criteria = null)
|
||||||
|
{
|
||||||
|
if ($criteria instanceof \Thelia\Model\ExportQuery) {
|
||||||
|
return $criteria;
|
||||||
|
}
|
||||||
|
$query = new \Thelia\Model\ExportQuery();
|
||||||
|
if (null !== $modelAlias) {
|
||||||
|
$query->setModelAlias($modelAlias);
|
||||||
|
}
|
||||||
|
if ($criteria instanceof Criteria) {
|
||||||
|
$query->mergeWith($criteria);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $query;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find object by primary key.
|
||||||
|
* Propel uses the instance pool to skip the database if the object exists.
|
||||||
|
* Go fast if the query is untouched.
|
||||||
|
*
|
||||||
|
* <code>
|
||||||
|
* $obj = $c->findPk(12, $con);
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @param mixed $key Primary key to use for the query
|
||||||
|
* @param ConnectionInterface $con an optional connection object
|
||||||
|
*
|
||||||
|
* @return ChildExport|array|mixed the result, formatted by the current formatter
|
||||||
|
*/
|
||||||
|
public function findPk($key, $con = null)
|
||||||
|
{
|
||||||
|
if ($key === null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
if ((null !== ($obj = ExportTableMap::getInstanceFromPool((string) $key))) && !$this->formatter) {
|
||||||
|
// the object is already in the instance pool
|
||||||
|
return $obj;
|
||||||
|
}
|
||||||
|
if ($con === null) {
|
||||||
|
$con = Propel::getServiceContainer()->getReadConnection(ExportTableMap::DATABASE_NAME);
|
||||||
|
}
|
||||||
|
$this->basePreSelect($con);
|
||||||
|
if ($this->formatter || $this->modelAlias || $this->with || $this->select
|
||||||
|
|| $this->selectColumns || $this->asColumns || $this->selectModifiers
|
||||||
|
|| $this->map || $this->having || $this->joins) {
|
||||||
|
return $this->findPkComplex($key, $con);
|
||||||
|
} else {
|
||||||
|
return $this->findPkSimple($key, $con);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find object by primary key using raw SQL to go fast.
|
||||||
|
* Bypass doSelect() and the object formatter by using generated code.
|
||||||
|
*
|
||||||
|
* @param mixed $key Primary key to use for the query
|
||||||
|
* @param ConnectionInterface $con A connection object
|
||||||
|
*
|
||||||
|
* @return ChildExport A model object, or null if the key is not found
|
||||||
|
*/
|
||||||
|
protected function findPkSimple($key, $con)
|
||||||
|
{
|
||||||
|
$sql = 'SELECT `ID`, `EXPORT_CATEGORY_ID`, `POSITION`, `CREATED_AT`, `UPDATED_AT` FROM `export` WHERE `ID` = :p0';
|
||||||
|
try {
|
||||||
|
$stmt = $con->prepare($sql);
|
||||||
|
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
|
||||||
|
$stmt->execute();
|
||||||
|
} catch (Exception $e) {
|
||||||
|
Propel::log($e->getMessage(), Propel::LOG_ERR);
|
||||||
|
throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), 0, $e);
|
||||||
|
}
|
||||||
|
$obj = null;
|
||||||
|
if ($row = $stmt->fetch(\PDO::FETCH_NUM)) {
|
||||||
|
$obj = new ChildExport();
|
||||||
|
$obj->hydrate($row);
|
||||||
|
ExportTableMap::addInstanceToPool($obj, (string) $key);
|
||||||
|
}
|
||||||
|
$stmt->closeCursor();
|
||||||
|
|
||||||
|
return $obj;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find object by primary key.
|
||||||
|
*
|
||||||
|
* @param mixed $key Primary key to use for the query
|
||||||
|
* @param ConnectionInterface $con A connection object
|
||||||
|
*
|
||||||
|
* @return ChildExport|array|mixed the result, formatted by the current formatter
|
||||||
|
*/
|
||||||
|
protected function findPkComplex($key, $con)
|
||||||
|
{
|
||||||
|
// As the query uses a PK condition, no limit(1) is necessary.
|
||||||
|
$criteria = $this->isKeepQuery() ? clone $this : $this;
|
||||||
|
$dataFetcher = $criteria
|
||||||
|
->filterByPrimaryKey($key)
|
||||||
|
->doSelect($con);
|
||||||
|
|
||||||
|
return $criteria->getFormatter()->init($criteria)->formatOne($dataFetcher);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find objects by primary key
|
||||||
|
* <code>
|
||||||
|
* $objs = $c->findPks(array(12, 56, 832), $con);
|
||||||
|
* </code>
|
||||||
|
* @param array $keys Primary keys to use for the query
|
||||||
|
* @param ConnectionInterface $con an optional connection object
|
||||||
|
*
|
||||||
|
* @return ObjectCollection|array|mixed the list of results, formatted by the current formatter
|
||||||
|
*/
|
||||||
|
public function findPks($keys, $con = null)
|
||||||
|
{
|
||||||
|
if (null === $con) {
|
||||||
|
$con = Propel::getServiceContainer()->getReadConnection($this->getDbName());
|
||||||
|
}
|
||||||
|
$this->basePreSelect($con);
|
||||||
|
$criteria = $this->isKeepQuery() ? clone $this : $this;
|
||||||
|
$dataFetcher = $criteria
|
||||||
|
->filterByPrimaryKeys($keys)
|
||||||
|
->doSelect($con);
|
||||||
|
|
||||||
|
return $criteria->getFormatter()->init($criteria)->format($dataFetcher);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query by primary key
|
||||||
|
*
|
||||||
|
* @param mixed $key Primary key to use for the query
|
||||||
|
*
|
||||||
|
* @return ChildExportQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByPrimaryKey($key)
|
||||||
|
{
|
||||||
|
|
||||||
|
return $this->addUsingAlias(ExportTableMap::ID, $key, Criteria::EQUAL);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query by a list of primary keys
|
||||||
|
*
|
||||||
|
* @param array $keys The list of primary key to use for the query
|
||||||
|
*
|
||||||
|
* @return ChildExportQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByPrimaryKeys($keys)
|
||||||
|
{
|
||||||
|
|
||||||
|
return $this->addUsingAlias(ExportTableMap::ID, $keys, Criteria::IN);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query on the id column
|
||||||
|
*
|
||||||
|
* Example usage:
|
||||||
|
* <code>
|
||||||
|
* $query->filterById(1234); // WHERE id = 1234
|
||||||
|
* $query->filterById(array(12, 34)); // WHERE id IN (12, 34)
|
||||||
|
* $query->filterById(array('min' => 12)); // WHERE id > 12
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @param mixed $id The value to use as filter.
|
||||||
|
* Use scalar values for equality.
|
||||||
|
* Use array values for in_array() equivalent.
|
||||||
|
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||||
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
|
*
|
||||||
|
* @return ChildExportQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterById($id = null, $comparison = null)
|
||||||
|
{
|
||||||
|
if (is_array($id)) {
|
||||||
|
$useMinMax = false;
|
||||||
|
if (isset($id['min'])) {
|
||||||
|
$this->addUsingAlias(ExportTableMap::ID, $id['min'], Criteria::GREATER_EQUAL);
|
||||||
|
$useMinMax = true;
|
||||||
|
}
|
||||||
|
if (isset($id['max'])) {
|
||||||
|
$this->addUsingAlias(ExportTableMap::ID, $id['max'], Criteria::LESS_EQUAL);
|
||||||
|
$useMinMax = true;
|
||||||
|
}
|
||||||
|
if ($useMinMax) {
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
if (null === $comparison) {
|
||||||
|
$comparison = Criteria::IN;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->addUsingAlias(ExportTableMap::ID, $id, $comparison);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query on the export_category_id column
|
||||||
|
*
|
||||||
|
* Example usage:
|
||||||
|
* <code>
|
||||||
|
* $query->filterByExportCategoryId(1234); // WHERE export_category_id = 1234
|
||||||
|
* $query->filterByExportCategoryId(array(12, 34)); // WHERE export_category_id IN (12, 34)
|
||||||
|
* $query->filterByExportCategoryId(array('min' => 12)); // WHERE export_category_id > 12
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @see filterByExportCategory()
|
||||||
|
*
|
||||||
|
* @param mixed $exportCategoryId 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 filterByExportCategoryId($exportCategoryId = null, $comparison = null)
|
||||||
|
{
|
||||||
|
if (is_array($exportCategoryId)) {
|
||||||
|
$useMinMax = false;
|
||||||
|
if (isset($exportCategoryId['min'])) {
|
||||||
|
$this->addUsingAlias(ExportTableMap::EXPORT_CATEGORY_ID, $exportCategoryId['min'], Criteria::GREATER_EQUAL);
|
||||||
|
$useMinMax = true;
|
||||||
|
}
|
||||||
|
if (isset($exportCategoryId['max'])) {
|
||||||
|
$this->addUsingAlias(ExportTableMap::EXPORT_CATEGORY_ID, $exportCategoryId['max'], Criteria::LESS_EQUAL);
|
||||||
|
$useMinMax = true;
|
||||||
|
}
|
||||||
|
if ($useMinMax) {
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
if (null === $comparison) {
|
||||||
|
$comparison = Criteria::IN;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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 created_at column
|
||||||
|
*
|
||||||
|
* Example usage:
|
||||||
|
* <code>
|
||||||
|
* $query->filterByCreatedAt('2011-03-14'); // WHERE created_at = '2011-03-14'
|
||||||
|
* $query->filterByCreatedAt('now'); // WHERE created_at = '2011-03-14'
|
||||||
|
* $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13'
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @param mixed $createdAt The value to use as filter.
|
||||||
|
* Values can be integers (unix timestamps), DateTime objects, or strings.
|
||||||
|
* Empty strings are treated as NULL.
|
||||||
|
* Use scalar values for equality.
|
||||||
|
* Use array values for in_array() equivalent.
|
||||||
|
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||||
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
|
*
|
||||||
|
* @return ChildExportQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByCreatedAt($createdAt = null, $comparison = null)
|
||||||
|
{
|
||||||
|
if (is_array($createdAt)) {
|
||||||
|
$useMinMax = false;
|
||||||
|
if (isset($createdAt['min'])) {
|
||||||
|
$this->addUsingAlias(ExportTableMap::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL);
|
||||||
|
$useMinMax = true;
|
||||||
|
}
|
||||||
|
if (isset($createdAt['max'])) {
|
||||||
|
$this->addUsingAlias(ExportTableMap::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL);
|
||||||
|
$useMinMax = true;
|
||||||
|
}
|
||||||
|
if ($useMinMax) {
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
if (null === $comparison) {
|
||||||
|
$comparison = Criteria::IN;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->addUsingAlias(ExportTableMap::CREATED_AT, $createdAt, $comparison);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query on the updated_at column
|
||||||
|
*
|
||||||
|
* Example usage:
|
||||||
|
* <code>
|
||||||
|
* $query->filterByUpdatedAt('2011-03-14'); // WHERE updated_at = '2011-03-14'
|
||||||
|
* $query->filterByUpdatedAt('now'); // WHERE updated_at = '2011-03-14'
|
||||||
|
* $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13'
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @param mixed $updatedAt The value to use as filter.
|
||||||
|
* Values can be integers (unix timestamps), DateTime objects, or strings.
|
||||||
|
* Empty strings are treated as NULL.
|
||||||
|
* Use scalar values for equality.
|
||||||
|
* Use array values for in_array() equivalent.
|
||||||
|
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||||
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
|
*
|
||||||
|
* @return ChildExportQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByUpdatedAt($updatedAt = null, $comparison = null)
|
||||||
|
{
|
||||||
|
if (is_array($updatedAt)) {
|
||||||
|
$useMinMax = false;
|
||||||
|
if (isset($updatedAt['min'])) {
|
||||||
|
$this->addUsingAlias(ExportTableMap::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);
|
||||||
|
$useMinMax = true;
|
||||||
|
}
|
||||||
|
if (isset($updatedAt['max'])) {
|
||||||
|
$this->addUsingAlias(ExportTableMap::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);
|
||||||
|
$useMinMax = true;
|
||||||
|
}
|
||||||
|
if ($useMinMax) {
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
if (null === $comparison) {
|
||||||
|
$comparison = Criteria::IN;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->addUsingAlias(ExportTableMap::UPDATED_AT, $updatedAt, $comparison);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query by a related \Thelia\Model\ExportCategory object
|
||||||
|
*
|
||||||
|
* @param \Thelia\Model\ExportCategory|ObjectCollection $exportCategory The related object(s) to use as filter
|
||||||
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
|
*
|
||||||
|
* @return ChildExportQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByExportCategory($exportCategory, $comparison = null)
|
||||||
|
{
|
||||||
|
if ($exportCategory instanceof \Thelia\Model\ExportCategory) {
|
||||||
|
return $this
|
||||||
|
->addUsingAlias(ExportTableMap::EXPORT_CATEGORY_ID, $exportCategory->getId(), $comparison);
|
||||||
|
} elseif ($exportCategory instanceof ObjectCollection) {
|
||||||
|
if (null === $comparison) {
|
||||||
|
$comparison = Criteria::IN;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this
|
||||||
|
->addUsingAlias(ExportTableMap::EXPORT_CATEGORY_ID, $exportCategory->toKeyValue('PrimaryKey', 'Id'), $comparison);
|
||||||
|
} else {
|
||||||
|
throw new PropelException('filterByExportCategory() only accepts arguments of type \Thelia\Model\ExportCategory or Collection');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a JOIN clause to the query using the ExportCategory relation
|
||||||
|
*
|
||||||
|
* @param string $relationAlias optional alias for the relation
|
||||||
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||||
|
*
|
||||||
|
* @return ChildExportQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function joinExportCategory($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||||
|
{
|
||||||
|
$tableMap = $this->getTableMap();
|
||||||
|
$relationMap = $tableMap->getRelation('ExportCategory');
|
||||||
|
|
||||||
|
// create a ModelJoin object for this join
|
||||||
|
$join = new ModelJoin();
|
||||||
|
$join->setJoinType($joinType);
|
||||||
|
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
|
||||||
|
if ($previousJoin = $this->getPreviousJoin()) {
|
||||||
|
$join->setPreviousJoin($previousJoin);
|
||||||
|
}
|
||||||
|
|
||||||
|
// add the ModelJoin to the current object
|
||||||
|
if ($relationAlias) {
|
||||||
|
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||||
|
$this->addJoinObject($join, $relationAlias);
|
||||||
|
} else {
|
||||||
|
$this->addJoinObject($join, 'ExportCategory');
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use the ExportCategory relation ExportCategory object
|
||||||
|
*
|
||||||
|
* @see useQuery()
|
||||||
|
*
|
||||||
|
* @param string $relationAlias optional alias for the relation,
|
||||||
|
* to be used as main alias in the secondary query
|
||||||
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||||
|
*
|
||||||
|
* @return \Thelia\Model\ExportCategoryQuery A secondary query class using the current class as primary query
|
||||||
|
*/
|
||||||
|
public function useExportCategoryQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||||
|
{
|
||||||
|
return $this
|
||||||
|
->joinExportCategory($relationAlias, $joinType)
|
||||||
|
->useQuery($relationAlias ? $relationAlias : 'ExportCategory', '\Thelia\Model\ExportCategoryQuery');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query by a related \Thelia\Model\ExportI18n object
|
||||||
|
*
|
||||||
|
* @param \Thelia\Model\ExportI18n|ObjectCollection $exportI18n the related object to use as filter
|
||||||
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
|
*
|
||||||
|
* @return ChildExportQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByExportI18n($exportI18n, $comparison = null)
|
||||||
|
{
|
||||||
|
if ($exportI18n instanceof \Thelia\Model\ExportI18n) {
|
||||||
|
return $this
|
||||||
|
->addUsingAlias(ExportTableMap::ID, $exportI18n->getId(), $comparison);
|
||||||
|
} elseif ($exportI18n instanceof ObjectCollection) {
|
||||||
|
return $this
|
||||||
|
->useExportI18nQuery()
|
||||||
|
->filterByPrimaryKeys($exportI18n->getPrimaryKeys())
|
||||||
|
->endUse();
|
||||||
|
} else {
|
||||||
|
throw new PropelException('filterByExportI18n() only accepts arguments of type \Thelia\Model\ExportI18n or Collection');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a JOIN clause to the query using the ExportI18n relation
|
||||||
|
*
|
||||||
|
* @param string $relationAlias optional alias for the relation
|
||||||
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||||
|
*
|
||||||
|
* @return ChildExportQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function joinExportI18n($relationAlias = null, $joinType = 'LEFT JOIN')
|
||||||
|
{
|
||||||
|
$tableMap = $this->getTableMap();
|
||||||
|
$relationMap = $tableMap->getRelation('ExportI18n');
|
||||||
|
|
||||||
|
// create a ModelJoin object for this join
|
||||||
|
$join = new ModelJoin();
|
||||||
|
$join->setJoinType($joinType);
|
||||||
|
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
|
||||||
|
if ($previousJoin = $this->getPreviousJoin()) {
|
||||||
|
$join->setPreviousJoin($previousJoin);
|
||||||
|
}
|
||||||
|
|
||||||
|
// add the ModelJoin to the current object
|
||||||
|
if ($relationAlias) {
|
||||||
|
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||||
|
$this->addJoinObject($join, $relationAlias);
|
||||||
|
} else {
|
||||||
|
$this->addJoinObject($join, 'ExportI18n');
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use the ExportI18n relation ExportI18n object
|
||||||
|
*
|
||||||
|
* @see useQuery()
|
||||||
|
*
|
||||||
|
* @param string $relationAlias optional alias for the relation,
|
||||||
|
* to be used as main alias in the secondary query
|
||||||
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||||
|
*
|
||||||
|
* @return \Thelia\Model\ExportI18nQuery A secondary query class using the current class as primary query
|
||||||
|
*/
|
||||||
|
public function useExportI18nQuery($relationAlias = null, $joinType = 'LEFT JOIN')
|
||||||
|
{
|
||||||
|
return $this
|
||||||
|
->joinExportI18n($relationAlias, $joinType)
|
||||||
|
->useQuery($relationAlias ? $relationAlias : 'ExportI18n', '\Thelia\Model\ExportI18nQuery');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Exclude object from result
|
||||||
|
*
|
||||||
|
* @param ChildExport $export Object to remove from the list of results
|
||||||
|
*
|
||||||
|
* @return ChildExportQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function prune($export = null)
|
||||||
|
{
|
||||||
|
if ($export) {
|
||||||
|
$this->addUsingAlias(ExportTableMap::ID, $export->getId(), Criteria::NOT_EQUAL);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deletes all rows from the export table.
|
||||||
|
*
|
||||||
|
* @param ConnectionInterface $con the connection to use
|
||||||
|
* @return int The number of affected rows (if supported by underlying database driver).
|
||||||
|
*/
|
||||||
|
public function doDeleteAll(ConnectionInterface $con = null)
|
||||||
|
{
|
||||||
|
if (null === $con) {
|
||||||
|
$con = Propel::getServiceContainer()->getWriteConnection(ExportTableMap::DATABASE_NAME);
|
||||||
|
}
|
||||||
|
$affectedRows = 0; // initialize var to track total num of affected rows
|
||||||
|
try {
|
||||||
|
// use transaction because $criteria could contain info
|
||||||
|
// for more than one table or we could emulating ON DELETE CASCADE, etc.
|
||||||
|
$con->beginTransaction();
|
||||||
|
$affectedRows += parent::doDeleteAll($con);
|
||||||
|
// Because this db requires some delete cascade/set null emulation, we have to
|
||||||
|
// clear the cached instance *after* the emulation has happened (since
|
||||||
|
// instances get re-added by the select statement contained therein).
|
||||||
|
ExportTableMap::clearInstancePool();
|
||||||
|
ExportTableMap::clearRelatedInstancePool();
|
||||||
|
|
||||||
|
$con->commit();
|
||||||
|
} catch (PropelException $e) {
|
||||||
|
$con->rollBack();
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $affectedRows;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Performs a DELETE on the database, given a ChildExport or Criteria object OR a primary key value.
|
||||||
|
*
|
||||||
|
* @param mixed $values Criteria or ChildExport object or primary key or array of primary keys
|
||||||
|
* which is used to create the DELETE statement
|
||||||
|
* @param ConnectionInterface $con the connection to use
|
||||||
|
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
|
||||||
|
* if supported by native driver or if emulated using Propel.
|
||||||
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
|
* rethrown wrapped into a PropelException.
|
||||||
|
*/
|
||||||
|
public function delete(ConnectionInterface $con = null)
|
||||||
|
{
|
||||||
|
if (null === $con) {
|
||||||
|
$con = Propel::getServiceContainer()->getWriteConnection(ExportTableMap::DATABASE_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
$criteria = $this;
|
||||||
|
|
||||||
|
// Set the correct dbName
|
||||||
|
$criteria->setDbName(ExportTableMap::DATABASE_NAME);
|
||||||
|
|
||||||
|
$affectedRows = 0; // initialize var to track total num of affected rows
|
||||||
|
|
||||||
|
try {
|
||||||
|
// use transaction because $criteria could contain info
|
||||||
|
// for more than one table or we could emulating ON DELETE CASCADE, etc.
|
||||||
|
$con->beginTransaction();
|
||||||
|
|
||||||
|
|
||||||
|
ExportTableMap::removeInstanceFromPool($criteria);
|
||||||
|
|
||||||
|
$affectedRows += ModelCriteria::delete($con);
|
||||||
|
ExportTableMap::clearRelatedInstancePool();
|
||||||
|
$con->commit();
|
||||||
|
|
||||||
|
return $affectedRows;
|
||||||
|
} catch (PropelException $e) {
|
||||||
|
$con->rollBack();
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter by the latest updated
|
||||||
|
*
|
||||||
|
* @param int $nbDays Maximum age of the latest update in days
|
||||||
|
*
|
||||||
|
* @return ChildExportQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function recentlyUpdated($nbDays = 7)
|
||||||
|
{
|
||||||
|
return $this->addUsingAlias(ExportTableMap::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter by the latest created
|
||||||
|
*
|
||||||
|
* @param int $nbDays Maximum age of in days
|
||||||
|
*
|
||||||
|
* @return ChildExportQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function recentlyCreated($nbDays = 7)
|
||||||
|
{
|
||||||
|
return $this->addUsingAlias(ExportTableMap::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Order by update date desc
|
||||||
|
*
|
||||||
|
* @return ChildExportQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function lastUpdatedFirst()
|
||||||
|
{
|
||||||
|
return $this->addDescendingOrderByColumn(ExportTableMap::UPDATED_AT);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Order by update date asc
|
||||||
|
*
|
||||||
|
* @return ChildExportQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function firstUpdatedFirst()
|
||||||
|
{
|
||||||
|
return $this->addAscendingOrderByColumn(ExportTableMap::UPDATED_AT);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Order by create date desc
|
||||||
|
*
|
||||||
|
* @return ChildExportQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function lastCreatedFirst()
|
||||||
|
{
|
||||||
|
return $this->addDescendingOrderByColumn(ExportTableMap::CREATED_AT);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Order by create date asc
|
||||||
|
*
|
||||||
|
* @return ChildExportQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function firstCreatedFirst()
|
||||||
|
{
|
||||||
|
return $this->addAscendingOrderByColumn(ExportTableMap::CREATED_AT);
|
||||||
|
}
|
||||||
|
|
||||||
|
} // ExportQuery
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -14,17 +14,17 @@ use Propel\Runtime\Exception\BadMethodCallException;
|
|||||||
use Propel\Runtime\Exception\PropelException;
|
use Propel\Runtime\Exception\PropelException;
|
||||||
use Propel\Runtime\Map\TableMap;
|
use Propel\Runtime\Map\TableMap;
|
||||||
use Propel\Runtime\Parser\AbstractParser;
|
use Propel\Runtime\Parser\AbstractParser;
|
||||||
use Thelia\Model\ImportExportCategory as ChildImportExportCategory;
|
use Thelia\Model\ImportCategory as ChildImportCategory;
|
||||||
use Thelia\Model\ImportExportCategoryI18nQuery as ChildImportExportCategoryI18nQuery;
|
use Thelia\Model\ImportCategoryI18nQuery as ChildImportCategoryI18nQuery;
|
||||||
use Thelia\Model\ImportExportCategoryQuery as ChildImportExportCategoryQuery;
|
use Thelia\Model\ImportCategoryQuery as ChildImportCategoryQuery;
|
||||||
use Thelia\Model\Map\ImportExportCategoryI18nTableMap;
|
use Thelia\Model\Map\ImportCategoryI18nTableMap;
|
||||||
|
|
||||||
abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
abstract class ImportCategoryI18n implements ActiveRecordInterface
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* TableMap class name
|
* TableMap class name
|
||||||
*/
|
*/
|
||||||
const TABLE_MAP = '\\Thelia\\Model\\Map\\ImportExportCategoryI18nTableMap';
|
const TABLE_MAP = '\\Thelia\\Model\\Map\\ImportCategoryI18nTableMap';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -73,9 +73,9 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
|||||||
protected $title;
|
protected $title;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var ImportExportCategory
|
* @var ImportCategory
|
||||||
*/
|
*/
|
||||||
protected $aImportExportCategory;
|
protected $aImportCategory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flag to prevent endless save loop, if this object is referenced
|
* Flag to prevent endless save loop, if this object is referenced
|
||||||
@@ -97,7 +97,7 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes internal state of Thelia\Model\Base\ImportExportCategoryI18n object.
|
* Initializes internal state of Thelia\Model\Base\ImportCategoryI18n object.
|
||||||
* @see applyDefaults()
|
* @see applyDefaults()
|
||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
@@ -194,9 +194,9 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compares this with another <code>ImportExportCategoryI18n</code> instance. If
|
* Compares this with another <code>ImportCategoryI18n</code> instance. If
|
||||||
* <code>obj</code> is an instance of <code>ImportExportCategoryI18n</code>, delegates to
|
* <code>obj</code> is an instance of <code>ImportCategoryI18n</code>, delegates to
|
||||||
* <code>equals(ImportExportCategoryI18n)</code>. Otherwise, returns <code>false</code>.
|
* <code>equals(ImportCategoryI18n)</code>. Otherwise, returns <code>false</code>.
|
||||||
*
|
*
|
||||||
* @param mixed $obj The object to compare to.
|
* @param mixed $obj The object to compare to.
|
||||||
* @return boolean Whether equal to the object specified.
|
* @return boolean Whether equal to the object specified.
|
||||||
@@ -279,7 +279,7 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
|||||||
* @param string $name The virtual column name
|
* @param string $name The virtual column name
|
||||||
* @param mixed $value The value to give to the virtual column
|
* @param mixed $value The value to give to the virtual column
|
||||||
*
|
*
|
||||||
* @return ImportExportCategoryI18n The current object, for fluid interface
|
* @return ImportCategoryI18n The current object, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function setVirtualColumn($name, $value)
|
public function setVirtualColumn($name, $value)
|
||||||
{
|
{
|
||||||
@@ -311,7 +311,7 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
|||||||
* or a format name ('XML', 'YAML', 'JSON', 'CSV')
|
* or a format name ('XML', 'YAML', 'JSON', 'CSV')
|
||||||
* @param string $data The source data to import from
|
* @param string $data The source data to import from
|
||||||
*
|
*
|
||||||
* @return ImportExportCategoryI18n The current object, for fluid interface
|
* @return ImportCategoryI18n The current object, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function importFrom($parser, $data)
|
public function importFrom($parser, $data)
|
||||||
{
|
{
|
||||||
@@ -393,7 +393,7 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
|||||||
* Set the value of [id] column.
|
* Set the value of [id] column.
|
||||||
*
|
*
|
||||||
* @param int $v new value
|
* @param int $v new value
|
||||||
* @return \Thelia\Model\ImportExportCategoryI18n The current object (for fluent API support)
|
* @return \Thelia\Model\ImportCategoryI18n The current object (for fluent API support)
|
||||||
*/
|
*/
|
||||||
public function setId($v)
|
public function setId($v)
|
||||||
{
|
{
|
||||||
@@ -403,11 +403,11 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
|||||||
|
|
||||||
if ($this->id !== $v) {
|
if ($this->id !== $v) {
|
||||||
$this->id = $v;
|
$this->id = $v;
|
||||||
$this->modifiedColumns[ImportExportCategoryI18nTableMap::ID] = true;
|
$this->modifiedColumns[ImportCategoryI18nTableMap::ID] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->aImportExportCategory !== null && $this->aImportExportCategory->getId() !== $v) {
|
if ($this->aImportCategory !== null && $this->aImportCategory->getId() !== $v) {
|
||||||
$this->aImportExportCategory = null;
|
$this->aImportCategory = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -418,7 +418,7 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
|||||||
* Set the value of [locale] column.
|
* Set the value of [locale] column.
|
||||||
*
|
*
|
||||||
* @param string $v new value
|
* @param string $v new value
|
||||||
* @return \Thelia\Model\ImportExportCategoryI18n The current object (for fluent API support)
|
* @return \Thelia\Model\ImportCategoryI18n The current object (for fluent API support)
|
||||||
*/
|
*/
|
||||||
public function setLocale($v)
|
public function setLocale($v)
|
||||||
{
|
{
|
||||||
@@ -428,7 +428,7 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
|||||||
|
|
||||||
if ($this->locale !== $v) {
|
if ($this->locale !== $v) {
|
||||||
$this->locale = $v;
|
$this->locale = $v;
|
||||||
$this->modifiedColumns[ImportExportCategoryI18nTableMap::LOCALE] = true;
|
$this->modifiedColumns[ImportCategoryI18nTableMap::LOCALE] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -439,7 +439,7 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
|||||||
* Set the value of [title] column.
|
* Set the value of [title] column.
|
||||||
*
|
*
|
||||||
* @param string $v new value
|
* @param string $v new value
|
||||||
* @return \Thelia\Model\ImportExportCategoryI18n The current object (for fluent API support)
|
* @return \Thelia\Model\ImportCategoryI18n The current object (for fluent API support)
|
||||||
*/
|
*/
|
||||||
public function setTitle($v)
|
public function setTitle($v)
|
||||||
{
|
{
|
||||||
@@ -449,7 +449,7 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
|||||||
|
|
||||||
if ($this->title !== $v) {
|
if ($this->title !== $v) {
|
||||||
$this->title = $v;
|
$this->title = $v;
|
||||||
$this->modifiedColumns[ImportExportCategoryI18nTableMap::TITLE] = true;
|
$this->modifiedColumns[ImportCategoryI18nTableMap::TITLE] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -497,13 +497,13 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
|||||||
try {
|
try {
|
||||||
|
|
||||||
|
|
||||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : ImportExportCategoryI18nTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
|
$col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : ImportCategoryI18nTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
|
||||||
$this->id = (null !== $col) ? (int) $col : null;
|
$this->id = (null !== $col) ? (int) $col : null;
|
||||||
|
|
||||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : ImportExportCategoryI18nTableMap::translateFieldName('Locale', TableMap::TYPE_PHPNAME, $indexType)];
|
$col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : ImportCategoryI18nTableMap::translateFieldName('Locale', TableMap::TYPE_PHPNAME, $indexType)];
|
||||||
$this->locale = (null !== $col) ? (string) $col : null;
|
$this->locale = (null !== $col) ? (string) $col : null;
|
||||||
|
|
||||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : ImportExportCategoryI18nTableMap::translateFieldName('Title', TableMap::TYPE_PHPNAME, $indexType)];
|
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : ImportCategoryI18nTableMap::translateFieldName('Title', TableMap::TYPE_PHPNAME, $indexType)];
|
||||||
$this->title = (null !== $col) ? (string) $col : null;
|
$this->title = (null !== $col) ? (string) $col : null;
|
||||||
$this->resetModified();
|
$this->resetModified();
|
||||||
|
|
||||||
@@ -513,10 +513,10 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
|||||||
$this->ensureConsistency();
|
$this->ensureConsistency();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $startcol + 3; // 3 = ImportExportCategoryI18nTableMap::NUM_HYDRATE_COLUMNS.
|
return $startcol + 3; // 3 = ImportCategoryI18nTableMap::NUM_HYDRATE_COLUMNS.
|
||||||
|
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
throw new PropelException("Error populating \Thelia\Model\ImportExportCategoryI18n object", 0, $e);
|
throw new PropelException("Error populating \Thelia\Model\ImportCategoryI18n object", 0, $e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -535,8 +535,8 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
|||||||
*/
|
*/
|
||||||
public function ensureConsistency()
|
public function ensureConsistency()
|
||||||
{
|
{
|
||||||
if ($this->aImportExportCategory !== null && $this->id !== $this->aImportExportCategory->getId()) {
|
if ($this->aImportCategory !== null && $this->id !== $this->aImportCategory->getId()) {
|
||||||
$this->aImportExportCategory = null;
|
$this->aImportCategory = null;
|
||||||
}
|
}
|
||||||
} // ensureConsistency
|
} // ensureConsistency
|
||||||
|
|
||||||
@@ -561,13 +561,13 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($con === null) {
|
if ($con === null) {
|
||||||
$con = Propel::getServiceContainer()->getReadConnection(ImportExportCategoryI18nTableMap::DATABASE_NAME);
|
$con = Propel::getServiceContainer()->getReadConnection(ImportCategoryI18nTableMap::DATABASE_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
// We don't need to alter the object instance pool; we're just modifying this instance
|
// We don't need to alter the object instance pool; we're just modifying this instance
|
||||||
// already in the pool.
|
// already in the pool.
|
||||||
|
|
||||||
$dataFetcher = ChildImportExportCategoryI18nQuery::create(null, $this->buildPkeyCriteria())->setFormatter(ModelCriteria::FORMAT_STATEMENT)->find($con);
|
$dataFetcher = ChildImportCategoryI18nQuery::create(null, $this->buildPkeyCriteria())->setFormatter(ModelCriteria::FORMAT_STATEMENT)->find($con);
|
||||||
$row = $dataFetcher->fetch();
|
$row = $dataFetcher->fetch();
|
||||||
$dataFetcher->close();
|
$dataFetcher->close();
|
||||||
if (!$row) {
|
if (!$row) {
|
||||||
@@ -577,7 +577,7 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
|||||||
|
|
||||||
if ($deep) { // also de-associate any related objects?
|
if ($deep) { // also de-associate any related objects?
|
||||||
|
|
||||||
$this->aImportExportCategory = null;
|
$this->aImportCategory = null;
|
||||||
} // if (deep)
|
} // if (deep)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -587,8 +587,8 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
|||||||
* @param ConnectionInterface $con
|
* @param ConnectionInterface $con
|
||||||
* @return void
|
* @return void
|
||||||
* @throws PropelException
|
* @throws PropelException
|
||||||
* @see ImportExportCategoryI18n::setDeleted()
|
* @see ImportCategoryI18n::setDeleted()
|
||||||
* @see ImportExportCategoryI18n::isDeleted()
|
* @see ImportCategoryI18n::isDeleted()
|
||||||
*/
|
*/
|
||||||
public function delete(ConnectionInterface $con = null)
|
public function delete(ConnectionInterface $con = null)
|
||||||
{
|
{
|
||||||
@@ -597,12 +597,12 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($con === null) {
|
if ($con === null) {
|
||||||
$con = Propel::getServiceContainer()->getWriteConnection(ImportExportCategoryI18nTableMap::DATABASE_NAME);
|
$con = Propel::getServiceContainer()->getWriteConnection(ImportCategoryI18nTableMap::DATABASE_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
$con->beginTransaction();
|
$con->beginTransaction();
|
||||||
try {
|
try {
|
||||||
$deleteQuery = ChildImportExportCategoryI18nQuery::create()
|
$deleteQuery = ChildImportCategoryI18nQuery::create()
|
||||||
->filterByPrimaryKey($this->getPrimaryKey());
|
->filterByPrimaryKey($this->getPrimaryKey());
|
||||||
$ret = $this->preDelete($con);
|
$ret = $this->preDelete($con);
|
||||||
if ($ret) {
|
if ($ret) {
|
||||||
@@ -639,7 +639,7 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($con === null) {
|
if ($con === null) {
|
||||||
$con = Propel::getServiceContainer()->getWriteConnection(ImportExportCategoryI18nTableMap::DATABASE_NAME);
|
$con = Propel::getServiceContainer()->getWriteConnection(ImportCategoryI18nTableMap::DATABASE_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
$con->beginTransaction();
|
$con->beginTransaction();
|
||||||
@@ -659,7 +659,7 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
|||||||
$this->postUpdate($con);
|
$this->postUpdate($con);
|
||||||
}
|
}
|
||||||
$this->postSave($con);
|
$this->postSave($con);
|
||||||
ImportExportCategoryI18nTableMap::addInstanceToPool($this);
|
ImportCategoryI18nTableMap::addInstanceToPool($this);
|
||||||
} else {
|
} else {
|
||||||
$affectedRows = 0;
|
$affectedRows = 0;
|
||||||
}
|
}
|
||||||
@@ -694,11 +694,11 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
|||||||
// method. This object relates to these object(s) by a
|
// method. This object relates to these object(s) by a
|
||||||
// foreign key reference.
|
// foreign key reference.
|
||||||
|
|
||||||
if ($this->aImportExportCategory !== null) {
|
if ($this->aImportCategory !== null) {
|
||||||
if ($this->aImportExportCategory->isModified() || $this->aImportExportCategory->isNew()) {
|
if ($this->aImportCategory->isModified() || $this->aImportCategory->isNew()) {
|
||||||
$affectedRows += $this->aImportExportCategory->save($con);
|
$affectedRows += $this->aImportCategory->save($con);
|
||||||
}
|
}
|
||||||
$this->setImportExportCategory($this->aImportExportCategory);
|
$this->setImportCategory($this->aImportCategory);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->isNew() || $this->isModified()) {
|
if ($this->isNew() || $this->isModified()) {
|
||||||
@@ -734,18 +734,18 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
|||||||
|
|
||||||
|
|
||||||
// check the columns in natural order for more readable SQL queries
|
// check the columns in natural order for more readable SQL queries
|
||||||
if ($this->isColumnModified(ImportExportCategoryI18nTableMap::ID)) {
|
if ($this->isColumnModified(ImportCategoryI18nTableMap::ID)) {
|
||||||
$modifiedColumns[':p' . $index++] = '`ID`';
|
$modifiedColumns[':p' . $index++] = '`ID`';
|
||||||
}
|
}
|
||||||
if ($this->isColumnModified(ImportExportCategoryI18nTableMap::LOCALE)) {
|
if ($this->isColumnModified(ImportCategoryI18nTableMap::LOCALE)) {
|
||||||
$modifiedColumns[':p' . $index++] = '`LOCALE`';
|
$modifiedColumns[':p' . $index++] = '`LOCALE`';
|
||||||
}
|
}
|
||||||
if ($this->isColumnModified(ImportExportCategoryI18nTableMap::TITLE)) {
|
if ($this->isColumnModified(ImportCategoryI18nTableMap::TITLE)) {
|
||||||
$modifiedColumns[':p' . $index++] = '`TITLE`';
|
$modifiedColumns[':p' . $index++] = '`TITLE`';
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = sprintf(
|
$sql = sprintf(
|
||||||
'INSERT INTO `import_export_category_i18n` (%s) VALUES (%s)',
|
'INSERT INTO `import_category_i18n` (%s) VALUES (%s)',
|
||||||
implode(', ', $modifiedColumns),
|
implode(', ', $modifiedColumns),
|
||||||
implode(', ', array_keys($modifiedColumns))
|
implode(', ', array_keys($modifiedColumns))
|
||||||
);
|
);
|
||||||
@@ -802,7 +802,7 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
|||||||
*/
|
*/
|
||||||
public function getByName($name, $type = TableMap::TYPE_PHPNAME)
|
public function getByName($name, $type = TableMap::TYPE_PHPNAME)
|
||||||
{
|
{
|
||||||
$pos = ImportExportCategoryI18nTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM);
|
$pos = ImportCategoryI18nTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM);
|
||||||
$field = $this->getByPosition($pos);
|
$field = $this->getByPosition($pos);
|
||||||
|
|
||||||
return $field;
|
return $field;
|
||||||
@@ -850,11 +850,11 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
|||||||
*/
|
*/
|
||||||
public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false)
|
public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false)
|
||||||
{
|
{
|
||||||
if (isset($alreadyDumpedObjects['ImportExportCategoryI18n'][serialize($this->getPrimaryKey())])) {
|
if (isset($alreadyDumpedObjects['ImportCategoryI18n'][serialize($this->getPrimaryKey())])) {
|
||||||
return '*RECURSION*';
|
return '*RECURSION*';
|
||||||
}
|
}
|
||||||
$alreadyDumpedObjects['ImportExportCategoryI18n'][serialize($this->getPrimaryKey())] = true;
|
$alreadyDumpedObjects['ImportCategoryI18n'][serialize($this->getPrimaryKey())] = true;
|
||||||
$keys = ImportExportCategoryI18nTableMap::getFieldNames($keyType);
|
$keys = ImportCategoryI18nTableMap::getFieldNames($keyType);
|
||||||
$result = array(
|
$result = array(
|
||||||
$keys[0] => $this->getId(),
|
$keys[0] => $this->getId(),
|
||||||
$keys[1] => $this->getLocale(),
|
$keys[1] => $this->getLocale(),
|
||||||
@@ -866,8 +866,8 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($includeForeignObjects) {
|
if ($includeForeignObjects) {
|
||||||
if (null !== $this->aImportExportCategory) {
|
if (null !== $this->aImportCategory) {
|
||||||
$result['ImportExportCategory'] = $this->aImportExportCategory->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
|
$result['ImportCategory'] = $this->aImportCategory->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -887,7 +887,7 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
|||||||
*/
|
*/
|
||||||
public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME)
|
public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME)
|
||||||
{
|
{
|
||||||
$pos = ImportExportCategoryI18nTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM);
|
$pos = ImportCategoryI18nTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM);
|
||||||
|
|
||||||
return $this->setByPosition($pos, $value);
|
return $this->setByPosition($pos, $value);
|
||||||
}
|
}
|
||||||
@@ -934,7 +934,7 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
|||||||
*/
|
*/
|
||||||
public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME)
|
public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME)
|
||||||
{
|
{
|
||||||
$keys = ImportExportCategoryI18nTableMap::getFieldNames($keyType);
|
$keys = ImportCategoryI18nTableMap::getFieldNames($keyType);
|
||||||
|
|
||||||
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->setLocale($arr[$keys[1]]);
|
if (array_key_exists($keys[1], $arr)) $this->setLocale($arr[$keys[1]]);
|
||||||
@@ -948,11 +948,11 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
|||||||
*/
|
*/
|
||||||
public function buildCriteria()
|
public function buildCriteria()
|
||||||
{
|
{
|
||||||
$criteria = new Criteria(ImportExportCategoryI18nTableMap::DATABASE_NAME);
|
$criteria = new Criteria(ImportCategoryI18nTableMap::DATABASE_NAME);
|
||||||
|
|
||||||
if ($this->isColumnModified(ImportExportCategoryI18nTableMap::ID)) $criteria->add(ImportExportCategoryI18nTableMap::ID, $this->id);
|
if ($this->isColumnModified(ImportCategoryI18nTableMap::ID)) $criteria->add(ImportCategoryI18nTableMap::ID, $this->id);
|
||||||
if ($this->isColumnModified(ImportExportCategoryI18nTableMap::LOCALE)) $criteria->add(ImportExportCategoryI18nTableMap::LOCALE, $this->locale);
|
if ($this->isColumnModified(ImportCategoryI18nTableMap::LOCALE)) $criteria->add(ImportCategoryI18nTableMap::LOCALE, $this->locale);
|
||||||
if ($this->isColumnModified(ImportExportCategoryI18nTableMap::TITLE)) $criteria->add(ImportExportCategoryI18nTableMap::TITLE, $this->title);
|
if ($this->isColumnModified(ImportCategoryI18nTableMap::TITLE)) $criteria->add(ImportCategoryI18nTableMap::TITLE, $this->title);
|
||||||
|
|
||||||
return $criteria;
|
return $criteria;
|
||||||
}
|
}
|
||||||
@@ -967,9 +967,9 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
|||||||
*/
|
*/
|
||||||
public function buildPkeyCriteria()
|
public function buildPkeyCriteria()
|
||||||
{
|
{
|
||||||
$criteria = new Criteria(ImportExportCategoryI18nTableMap::DATABASE_NAME);
|
$criteria = new Criteria(ImportCategoryI18nTableMap::DATABASE_NAME);
|
||||||
$criteria->add(ImportExportCategoryI18nTableMap::ID, $this->id);
|
$criteria->add(ImportCategoryI18nTableMap::ID, $this->id);
|
||||||
$criteria->add(ImportExportCategoryI18nTableMap::LOCALE, $this->locale);
|
$criteria->add(ImportCategoryI18nTableMap::LOCALE, $this->locale);
|
||||||
|
|
||||||
return $criteria;
|
return $criteria;
|
||||||
}
|
}
|
||||||
@@ -1016,7 +1016,7 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
|||||||
* If desired, this method can also make copies of all associated (fkey referrers)
|
* If desired, this method can also make copies of all associated (fkey referrers)
|
||||||
* objects.
|
* objects.
|
||||||
*
|
*
|
||||||
* @param object $copyObj An object of \Thelia\Model\ImportExportCategoryI18n (or compatible) type.
|
* @param object $copyObj An object of \Thelia\Model\ImportCategoryI18n (or compatible) type.
|
||||||
* @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
|
* @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
|
||||||
* @param boolean $makeNew Whether to reset autoincrement PKs and make the object new.
|
* @param boolean $makeNew Whether to reset autoincrement PKs and make the object new.
|
||||||
* @throws PropelException
|
* @throws PropelException
|
||||||
@@ -1040,7 +1040,7 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
|||||||
* objects.
|
* objects.
|
||||||
*
|
*
|
||||||
* @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
|
* @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
|
||||||
* @return \Thelia\Model\ImportExportCategoryI18n Clone of current object.
|
* @return \Thelia\Model\ImportCategoryI18n Clone of current object.
|
||||||
* @throws PropelException
|
* @throws PropelException
|
||||||
*/
|
*/
|
||||||
public function copy($deepCopy = false)
|
public function copy($deepCopy = false)
|
||||||
@@ -1054,13 +1054,13 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Declares an association between this object and a ChildImportExportCategory object.
|
* Declares an association between this object and a ChildImportCategory object.
|
||||||
*
|
*
|
||||||
* @param ChildImportExportCategory $v
|
* @param ChildImportCategory $v
|
||||||
* @return \Thelia\Model\ImportExportCategoryI18n The current object (for fluent API support)
|
* @return \Thelia\Model\ImportCategoryI18n The current object (for fluent API support)
|
||||||
* @throws PropelException
|
* @throws PropelException
|
||||||
*/
|
*/
|
||||||
public function setImportExportCategory(ChildImportExportCategory $v = null)
|
public function setImportCategory(ChildImportCategory $v = null)
|
||||||
{
|
{
|
||||||
if ($v === null) {
|
if ($v === null) {
|
||||||
$this->setId(NULL);
|
$this->setId(NULL);
|
||||||
@@ -1068,12 +1068,12 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
|||||||
$this->setId($v->getId());
|
$this->setId($v->getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->aImportExportCategory = $v;
|
$this->aImportCategory = $v;
|
||||||
|
|
||||||
// Add binding for other direction of this n:n relationship.
|
// Add binding for other direction of this n:n relationship.
|
||||||
// If this object has already been added to the ChildImportExportCategory object, it will not be re-added.
|
// If this object has already been added to the ChildImportCategory object, it will not be re-added.
|
||||||
if ($v !== null) {
|
if ($v !== null) {
|
||||||
$v->addImportExportCategoryI18n($this);
|
$v->addImportCategoryI18n($this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1082,26 +1082,26 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the associated ChildImportExportCategory object
|
* Get the associated ChildImportCategory object
|
||||||
*
|
*
|
||||||
* @param ConnectionInterface $con Optional Connection object.
|
* @param ConnectionInterface $con Optional Connection object.
|
||||||
* @return ChildImportExportCategory The associated ChildImportExportCategory object.
|
* @return ChildImportCategory The associated ChildImportCategory object.
|
||||||
* @throws PropelException
|
* @throws PropelException
|
||||||
*/
|
*/
|
||||||
public function getImportExportCategory(ConnectionInterface $con = null)
|
public function getImportCategory(ConnectionInterface $con = null)
|
||||||
{
|
{
|
||||||
if ($this->aImportExportCategory === null && ($this->id !== null)) {
|
if ($this->aImportCategory === null && ($this->id !== null)) {
|
||||||
$this->aImportExportCategory = ChildImportExportCategoryQuery::create()->findPk($this->id, $con);
|
$this->aImportCategory = ChildImportCategoryQuery::create()->findPk($this->id, $con);
|
||||||
/* The following can be used additionally to
|
/* The following can be used additionally to
|
||||||
guarantee the related object contains a reference
|
guarantee the related object contains a reference
|
||||||
to this object. This level of coupling may, however, be
|
to this object. This level of coupling may, however, be
|
||||||
undesirable since it could result in an only partially populated collection
|
undesirable since it could result in an only partially populated collection
|
||||||
in the referenced object.
|
in the referenced object.
|
||||||
$this->aImportExportCategory->addImportExportCategoryI18ns($this);
|
$this->aImportCategory->addImportCategoryI18ns($this);
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->aImportExportCategory;
|
return $this->aImportCategory;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1134,7 +1134,7 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
|||||||
if ($deep) {
|
if ($deep) {
|
||||||
} // if ($deep)
|
} // if ($deep)
|
||||||
|
|
||||||
$this->aImportExportCategory = null;
|
$this->aImportCategory = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1144,7 +1144,7 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
|||||||
*/
|
*/
|
||||||
public function __toString()
|
public function __toString()
|
||||||
{
|
{
|
||||||
return (string) $this->exportTo(ImportExportCategoryI18nTableMap::DEFAULT_STRING_FORMAT);
|
return (string) $this->exportTo(ImportCategoryI18nTableMap::DEFAULT_STRING_FORMAT);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -12,72 +12,72 @@ use Propel\Runtime\Collection\Collection;
|
|||||||
use Propel\Runtime\Collection\ObjectCollection;
|
use Propel\Runtime\Collection\ObjectCollection;
|
||||||
use Propel\Runtime\Connection\ConnectionInterface;
|
use Propel\Runtime\Connection\ConnectionInterface;
|
||||||
use Propel\Runtime\Exception\PropelException;
|
use Propel\Runtime\Exception\PropelException;
|
||||||
use Thelia\Model\ImportExportCategoryI18n as ChildImportExportCategoryI18n;
|
use Thelia\Model\ImportCategoryI18n as ChildImportCategoryI18n;
|
||||||
use Thelia\Model\ImportExportCategoryI18nQuery as ChildImportExportCategoryI18nQuery;
|
use Thelia\Model\ImportCategoryI18nQuery as ChildImportCategoryI18nQuery;
|
||||||
use Thelia\Model\Map\ImportExportCategoryI18nTableMap;
|
use Thelia\Model\Map\ImportCategoryI18nTableMap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base class that represents a query for the 'import_export_category_i18n' table.
|
* Base class that represents a query for the 'import_category_i18n' table.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @method ChildImportExportCategoryI18nQuery orderById($order = Criteria::ASC) Order by the id column
|
* @method ChildImportCategoryI18nQuery orderById($order = Criteria::ASC) Order by the id column
|
||||||
* @method ChildImportExportCategoryI18nQuery orderByLocale($order = Criteria::ASC) Order by the locale column
|
* @method ChildImportCategoryI18nQuery orderByLocale($order = Criteria::ASC) Order by the locale column
|
||||||
* @method ChildImportExportCategoryI18nQuery orderByTitle($order = Criteria::ASC) Order by the title column
|
* @method ChildImportCategoryI18nQuery orderByTitle($order = Criteria::ASC) Order by the title column
|
||||||
*
|
*
|
||||||
* @method ChildImportExportCategoryI18nQuery groupById() Group by the id column
|
* @method ChildImportCategoryI18nQuery groupById() Group by the id column
|
||||||
* @method ChildImportExportCategoryI18nQuery groupByLocale() Group by the locale column
|
* @method ChildImportCategoryI18nQuery groupByLocale() Group by the locale column
|
||||||
* @method ChildImportExportCategoryI18nQuery groupByTitle() Group by the title column
|
* @method ChildImportCategoryI18nQuery groupByTitle() Group by the title column
|
||||||
*
|
*
|
||||||
* @method ChildImportExportCategoryI18nQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
|
* @method ChildImportCategoryI18nQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
|
||||||
* @method ChildImportExportCategoryI18nQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
* @method ChildImportCategoryI18nQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
||||||
* @method ChildImportExportCategoryI18nQuery innerJoin($relation) Adds a INNER JOIN clause to the query
|
* @method ChildImportCategoryI18nQuery innerJoin($relation) Adds a INNER JOIN clause to the query
|
||||||
*
|
*
|
||||||
* @method ChildImportExportCategoryI18nQuery leftJoinImportExportCategory($relationAlias = null) Adds a LEFT JOIN clause to the query using the ImportExportCategory relation
|
* @method ChildImportCategoryI18nQuery leftJoinImportCategory($relationAlias = null) Adds a LEFT JOIN clause to the query using the ImportCategory relation
|
||||||
* @method ChildImportExportCategoryI18nQuery rightJoinImportExportCategory($relationAlias = null) Adds a RIGHT JOIN clause to the query using the ImportExportCategory relation
|
* @method ChildImportCategoryI18nQuery rightJoinImportCategory($relationAlias = null) Adds a RIGHT JOIN clause to the query using the ImportCategory relation
|
||||||
* @method ChildImportExportCategoryI18nQuery innerJoinImportExportCategory($relationAlias = null) Adds a INNER JOIN clause to the query using the ImportExportCategory relation
|
* @method ChildImportCategoryI18nQuery innerJoinImportCategory($relationAlias = null) Adds a INNER JOIN clause to the query using the ImportCategory relation
|
||||||
*
|
*
|
||||||
* @method ChildImportExportCategoryI18n findOne(ConnectionInterface $con = null) Return the first ChildImportExportCategoryI18n matching the query
|
* @method ChildImportCategoryI18n findOne(ConnectionInterface $con = null) Return the first ChildImportCategoryI18n matching the query
|
||||||
* @method ChildImportExportCategoryI18n findOneOrCreate(ConnectionInterface $con = null) Return the first ChildImportExportCategoryI18n matching the query, or a new ChildImportExportCategoryI18n object populated from the query conditions when no match is found
|
* @method ChildImportCategoryI18n findOneOrCreate(ConnectionInterface $con = null) Return the first ChildImportCategoryI18n matching the query, or a new ChildImportCategoryI18n object populated from the query conditions when no match is found
|
||||||
*
|
*
|
||||||
* @method ChildImportExportCategoryI18n findOneById(int $id) Return the first ChildImportExportCategoryI18n filtered by the id column
|
* @method ChildImportCategoryI18n findOneById(int $id) Return the first ChildImportCategoryI18n filtered by the id column
|
||||||
* @method ChildImportExportCategoryI18n findOneByLocale(string $locale) Return the first ChildImportExportCategoryI18n filtered by the locale column
|
* @method ChildImportCategoryI18n findOneByLocale(string $locale) Return the first ChildImportCategoryI18n filtered by the locale column
|
||||||
* @method ChildImportExportCategoryI18n findOneByTitle(string $title) Return the first ChildImportExportCategoryI18n filtered by the title column
|
* @method ChildImportCategoryI18n findOneByTitle(string $title) Return the first ChildImportCategoryI18n filtered by the title column
|
||||||
*
|
*
|
||||||
* @method array findById(int $id) Return ChildImportExportCategoryI18n objects filtered by the id column
|
* @method array findById(int $id) Return ChildImportCategoryI18n objects filtered by the id column
|
||||||
* @method array findByLocale(string $locale) Return ChildImportExportCategoryI18n objects filtered by the locale column
|
* @method array findByLocale(string $locale) Return ChildImportCategoryI18n objects filtered by the locale column
|
||||||
* @method array findByTitle(string $title) Return ChildImportExportCategoryI18n objects filtered by the title column
|
* @method array findByTitle(string $title) Return ChildImportCategoryI18n objects filtered by the title column
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
abstract class ImportExportCategoryI18nQuery extends ModelCriteria
|
abstract class ImportCategoryI18nQuery extends ModelCriteria
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes internal state of \Thelia\Model\Base\ImportExportCategoryI18nQuery object.
|
* Initializes internal state of \Thelia\Model\Base\ImportCategoryI18nQuery object.
|
||||||
*
|
*
|
||||||
* @param string $dbName The database name
|
* @param string $dbName The database name
|
||||||
* @param string $modelName The phpName of a model, e.g. 'Book'
|
* @param string $modelName The phpName of a model, e.g. 'Book'
|
||||||
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
|
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
|
||||||
*/
|
*/
|
||||||
public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\ImportExportCategoryI18n', $modelAlias = null)
|
public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\ImportCategoryI18n', $modelAlias = null)
|
||||||
{
|
{
|
||||||
parent::__construct($dbName, $modelName, $modelAlias);
|
parent::__construct($dbName, $modelName, $modelAlias);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a new ChildImportExportCategoryI18nQuery object.
|
* Returns a new ChildImportCategoryI18nQuery object.
|
||||||
*
|
*
|
||||||
* @param string $modelAlias The alias of a model in the query
|
* @param string $modelAlias The alias of a model in the query
|
||||||
* @param Criteria $criteria Optional Criteria to build the query from
|
* @param Criteria $criteria Optional Criteria to build the query from
|
||||||
*
|
*
|
||||||
* @return ChildImportExportCategoryI18nQuery
|
* @return ChildImportCategoryI18nQuery
|
||||||
*/
|
*/
|
||||||
public static function create($modelAlias = null, $criteria = null)
|
public static function create($modelAlias = null, $criteria = null)
|
||||||
{
|
{
|
||||||
if ($criteria instanceof \Thelia\Model\ImportExportCategoryI18nQuery) {
|
if ($criteria instanceof \Thelia\Model\ImportCategoryI18nQuery) {
|
||||||
return $criteria;
|
return $criteria;
|
||||||
}
|
}
|
||||||
$query = new \Thelia\Model\ImportExportCategoryI18nQuery();
|
$query = new \Thelia\Model\ImportCategoryI18nQuery();
|
||||||
if (null !== $modelAlias) {
|
if (null !== $modelAlias) {
|
||||||
$query->setModelAlias($modelAlias);
|
$query->setModelAlias($modelAlias);
|
||||||
}
|
}
|
||||||
@@ -100,19 +100,19 @@ abstract class ImportExportCategoryI18nQuery extends ModelCriteria
|
|||||||
* @param array[$id, $locale] $key Primary key to use for the query
|
* @param array[$id, $locale] $key Primary key to use for the query
|
||||||
* @param ConnectionInterface $con an optional connection object
|
* @param ConnectionInterface $con an optional connection object
|
||||||
*
|
*
|
||||||
* @return ChildImportExportCategoryI18n|array|mixed the result, formatted by the current formatter
|
* @return ChildImportCategoryI18n|array|mixed the result, formatted by the current formatter
|
||||||
*/
|
*/
|
||||||
public function findPk($key, $con = null)
|
public function findPk($key, $con = null)
|
||||||
{
|
{
|
||||||
if ($key === null) {
|
if ($key === null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if ((null !== ($obj = ImportExportCategoryI18nTableMap::getInstanceFromPool(serialize(array((string) $key[0], (string) $key[1]))))) && !$this->formatter) {
|
if ((null !== ($obj = ImportCategoryI18nTableMap::getInstanceFromPool(serialize(array((string) $key[0], (string) $key[1]))))) && !$this->formatter) {
|
||||||
// the object is already in the instance pool
|
// the object is already in the instance pool
|
||||||
return $obj;
|
return $obj;
|
||||||
}
|
}
|
||||||
if ($con === null) {
|
if ($con === null) {
|
||||||
$con = Propel::getServiceContainer()->getReadConnection(ImportExportCategoryI18nTableMap::DATABASE_NAME);
|
$con = Propel::getServiceContainer()->getReadConnection(ImportCategoryI18nTableMap::DATABASE_NAME);
|
||||||
}
|
}
|
||||||
$this->basePreSelect($con);
|
$this->basePreSelect($con);
|
||||||
if ($this->formatter || $this->modelAlias || $this->with || $this->select
|
if ($this->formatter || $this->modelAlias || $this->with || $this->select
|
||||||
@@ -131,11 +131,11 @@ abstract class ImportExportCategoryI18nQuery extends ModelCriteria
|
|||||||
* @param mixed $key Primary key to use for the query
|
* @param mixed $key Primary key to use for the query
|
||||||
* @param ConnectionInterface $con A connection object
|
* @param ConnectionInterface $con A connection object
|
||||||
*
|
*
|
||||||
* @return ChildImportExportCategoryI18n A model object, or null if the key is not found
|
* @return ChildImportCategoryI18n A model object, or null if the key is not found
|
||||||
*/
|
*/
|
||||||
protected function findPkSimple($key, $con)
|
protected function findPkSimple($key, $con)
|
||||||
{
|
{
|
||||||
$sql = 'SELECT `ID`, `LOCALE`, `TITLE` FROM `import_export_category_i18n` WHERE `ID` = :p0 AND `LOCALE` = :p1';
|
$sql = 'SELECT `ID`, `LOCALE`, `TITLE` FROM `import_category_i18n` WHERE `ID` = :p0 AND `LOCALE` = :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);
|
||||||
@@ -147,9 +147,9 @@ abstract class ImportExportCategoryI18nQuery extends ModelCriteria
|
|||||||
}
|
}
|
||||||
$obj = null;
|
$obj = null;
|
||||||
if ($row = $stmt->fetch(\PDO::FETCH_NUM)) {
|
if ($row = $stmt->fetch(\PDO::FETCH_NUM)) {
|
||||||
$obj = new ChildImportExportCategoryI18n();
|
$obj = new ChildImportCategoryI18n();
|
||||||
$obj->hydrate($row);
|
$obj->hydrate($row);
|
||||||
ImportExportCategoryI18nTableMap::addInstanceToPool($obj, serialize(array((string) $key[0], (string) $key[1])));
|
ImportCategoryI18nTableMap::addInstanceToPool($obj, serialize(array((string) $key[0], (string) $key[1])));
|
||||||
}
|
}
|
||||||
$stmt->closeCursor();
|
$stmt->closeCursor();
|
||||||
|
|
||||||
@@ -162,7 +162,7 @@ abstract class ImportExportCategoryI18nQuery extends ModelCriteria
|
|||||||
* @param mixed $key Primary key to use for the query
|
* @param mixed $key Primary key to use for the query
|
||||||
* @param ConnectionInterface $con A connection object
|
* @param ConnectionInterface $con A connection object
|
||||||
*
|
*
|
||||||
* @return ChildImportExportCategoryI18n|array|mixed the result, formatted by the current formatter
|
* @return ChildImportCategoryI18n|array|mixed the result, formatted by the current formatter
|
||||||
*/
|
*/
|
||||||
protected function findPkComplex($key, $con)
|
protected function findPkComplex($key, $con)
|
||||||
{
|
{
|
||||||
@@ -204,12 +204,12 @@ abstract class ImportExportCategoryI18nQuery extends ModelCriteria
|
|||||||
*
|
*
|
||||||
* @param mixed $key Primary key to use for the query
|
* @param mixed $key Primary key to use for the query
|
||||||
*
|
*
|
||||||
* @return ChildImportExportCategoryI18nQuery The current query, for fluid interface
|
* @return ChildImportCategoryI18nQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function filterByPrimaryKey($key)
|
public function filterByPrimaryKey($key)
|
||||||
{
|
{
|
||||||
$this->addUsingAlias(ImportExportCategoryI18nTableMap::ID, $key[0], Criteria::EQUAL);
|
$this->addUsingAlias(ImportCategoryI18nTableMap::ID, $key[0], Criteria::EQUAL);
|
||||||
$this->addUsingAlias(ImportExportCategoryI18nTableMap::LOCALE, $key[1], Criteria::EQUAL);
|
$this->addUsingAlias(ImportCategoryI18nTableMap::LOCALE, $key[1], Criteria::EQUAL);
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
@@ -219,7 +219,7 @@ abstract class ImportExportCategoryI18nQuery extends ModelCriteria
|
|||||||
*
|
*
|
||||||
* @param array $keys The list of primary key to use for the query
|
* @param array $keys The list of primary key to use for the query
|
||||||
*
|
*
|
||||||
* @return ChildImportExportCategoryI18nQuery The current query, for fluid interface
|
* @return ChildImportCategoryI18nQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function filterByPrimaryKeys($keys)
|
public function filterByPrimaryKeys($keys)
|
||||||
{
|
{
|
||||||
@@ -227,8 +227,8 @@ abstract class ImportExportCategoryI18nQuery extends ModelCriteria
|
|||||||
return $this->add(null, '1<>1', Criteria::CUSTOM);
|
return $this->add(null, '1<>1', Criteria::CUSTOM);
|
||||||
}
|
}
|
||||||
foreach ($keys as $key) {
|
foreach ($keys as $key) {
|
||||||
$cton0 = $this->getNewCriterion(ImportExportCategoryI18nTableMap::ID, $key[0], Criteria::EQUAL);
|
$cton0 = $this->getNewCriterion(ImportCategoryI18nTableMap::ID, $key[0], Criteria::EQUAL);
|
||||||
$cton1 = $this->getNewCriterion(ImportExportCategoryI18nTableMap::LOCALE, $key[1], Criteria::EQUAL);
|
$cton1 = $this->getNewCriterion(ImportCategoryI18nTableMap::LOCALE, $key[1], Criteria::EQUAL);
|
||||||
$cton0->addAnd($cton1);
|
$cton0->addAnd($cton1);
|
||||||
$this->addOr($cton0);
|
$this->addOr($cton0);
|
||||||
}
|
}
|
||||||
@@ -246,7 +246,7 @@ abstract class ImportExportCategoryI18nQuery extends ModelCriteria
|
|||||||
* $query->filterById(array('min' => 12)); // WHERE id > 12
|
* $query->filterById(array('min' => 12)); // WHERE id > 12
|
||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
* @see filterByImportExportCategory()
|
* @see filterByImportCategory()
|
||||||
*
|
*
|
||||||
* @param mixed $id The value to use as filter.
|
* @param mixed $id The value to use as filter.
|
||||||
* Use scalar values for equality.
|
* Use scalar values for equality.
|
||||||
@@ -254,18 +254,18 @@ abstract class ImportExportCategoryI18nQuery extends ModelCriteria
|
|||||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
*
|
*
|
||||||
* @return ChildImportExportCategoryI18nQuery The current query, for fluid interface
|
* @return ChildImportCategoryI18nQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function filterById($id = null, $comparison = null)
|
public function filterById($id = null, $comparison = null)
|
||||||
{
|
{
|
||||||
if (is_array($id)) {
|
if (is_array($id)) {
|
||||||
$useMinMax = false;
|
$useMinMax = false;
|
||||||
if (isset($id['min'])) {
|
if (isset($id['min'])) {
|
||||||
$this->addUsingAlias(ImportExportCategoryI18nTableMap::ID, $id['min'], Criteria::GREATER_EQUAL);
|
$this->addUsingAlias(ImportCategoryI18nTableMap::ID, $id['min'], Criteria::GREATER_EQUAL);
|
||||||
$useMinMax = true;
|
$useMinMax = true;
|
||||||
}
|
}
|
||||||
if (isset($id['max'])) {
|
if (isset($id['max'])) {
|
||||||
$this->addUsingAlias(ImportExportCategoryI18nTableMap::ID, $id['max'], Criteria::LESS_EQUAL);
|
$this->addUsingAlias(ImportCategoryI18nTableMap::ID, $id['max'], Criteria::LESS_EQUAL);
|
||||||
$useMinMax = true;
|
$useMinMax = true;
|
||||||
}
|
}
|
||||||
if ($useMinMax) {
|
if ($useMinMax) {
|
||||||
@@ -276,7 +276,7 @@ abstract class ImportExportCategoryI18nQuery extends ModelCriteria
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->addUsingAlias(ImportExportCategoryI18nTableMap::ID, $id, $comparison);
|
return $this->addUsingAlias(ImportCategoryI18nTableMap::ID, $id, $comparison);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -292,7 +292,7 @@ abstract class ImportExportCategoryI18nQuery extends ModelCriteria
|
|||||||
* Accepts wildcards (* and % trigger a LIKE)
|
* Accepts wildcards (* and % trigger a LIKE)
|
||||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
*
|
*
|
||||||
* @return ChildImportExportCategoryI18nQuery The current query, for fluid interface
|
* @return ChildImportCategoryI18nQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function filterByLocale($locale = null, $comparison = null)
|
public function filterByLocale($locale = null, $comparison = null)
|
||||||
{
|
{
|
||||||
@@ -305,7 +305,7 @@ abstract class ImportExportCategoryI18nQuery extends ModelCriteria
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->addUsingAlias(ImportExportCategoryI18nTableMap::LOCALE, $locale, $comparison);
|
return $this->addUsingAlias(ImportCategoryI18nTableMap::LOCALE, $locale, $comparison);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -321,7 +321,7 @@ abstract class ImportExportCategoryI18nQuery extends ModelCriteria
|
|||||||
* Accepts wildcards (* and % trigger a LIKE)
|
* Accepts wildcards (* and % trigger a LIKE)
|
||||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
*
|
*
|
||||||
* @return ChildImportExportCategoryI18nQuery The current query, for fluid interface
|
* @return ChildImportCategoryI18nQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function filterByTitle($title = null, $comparison = null)
|
public function filterByTitle($title = null, $comparison = null)
|
||||||
{
|
{
|
||||||
@@ -334,46 +334,46 @@ abstract class ImportExportCategoryI18nQuery extends ModelCriteria
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->addUsingAlias(ImportExportCategoryI18nTableMap::TITLE, $title, $comparison);
|
return $this->addUsingAlias(ImportCategoryI18nTableMap::TITLE, $title, $comparison);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the query by a related \Thelia\Model\ImportExportCategory object
|
* Filter the query by a related \Thelia\Model\ImportCategory object
|
||||||
*
|
*
|
||||||
* @param \Thelia\Model\ImportExportCategory|ObjectCollection $importExportCategory The related object(s) to use as filter
|
* @param \Thelia\Model\ImportCategory|ObjectCollection $importCategory The related object(s) to use as filter
|
||||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
*
|
*
|
||||||
* @return ChildImportExportCategoryI18nQuery The current query, for fluid interface
|
* @return ChildImportCategoryI18nQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function filterByImportExportCategory($importExportCategory, $comparison = null)
|
public function filterByImportCategory($importCategory, $comparison = null)
|
||||||
{
|
{
|
||||||
if ($importExportCategory instanceof \Thelia\Model\ImportExportCategory) {
|
if ($importCategory instanceof \Thelia\Model\ImportCategory) {
|
||||||
return $this
|
return $this
|
||||||
->addUsingAlias(ImportExportCategoryI18nTableMap::ID, $importExportCategory->getId(), $comparison);
|
->addUsingAlias(ImportCategoryI18nTableMap::ID, $importCategory->getId(), $comparison);
|
||||||
} elseif ($importExportCategory instanceof ObjectCollection) {
|
} elseif ($importCategory instanceof ObjectCollection) {
|
||||||
if (null === $comparison) {
|
if (null === $comparison) {
|
||||||
$comparison = Criteria::IN;
|
$comparison = Criteria::IN;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this
|
return $this
|
||||||
->addUsingAlias(ImportExportCategoryI18nTableMap::ID, $importExportCategory->toKeyValue('PrimaryKey', 'Id'), $comparison);
|
->addUsingAlias(ImportCategoryI18nTableMap::ID, $importCategory->toKeyValue('PrimaryKey', 'Id'), $comparison);
|
||||||
} else {
|
} else {
|
||||||
throw new PropelException('filterByImportExportCategory() only accepts arguments of type \Thelia\Model\ImportExportCategory or Collection');
|
throw new PropelException('filterByImportCategory() only accepts arguments of type \Thelia\Model\ImportCategory or Collection');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a JOIN clause to the query using the ImportExportCategory relation
|
* Adds a JOIN clause to the query using the ImportCategory relation
|
||||||
*
|
*
|
||||||
* @param string $relationAlias optional alias for the relation
|
* @param string $relationAlias optional alias for the relation
|
||||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||||
*
|
*
|
||||||
* @return ChildImportExportCategoryI18nQuery The current query, for fluid interface
|
* @return ChildImportCategoryI18nQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function joinImportExportCategory($relationAlias = null, $joinType = 'LEFT JOIN')
|
public function joinImportCategory($relationAlias = null, $joinType = 'LEFT JOIN')
|
||||||
{
|
{
|
||||||
$tableMap = $this->getTableMap();
|
$tableMap = $this->getTableMap();
|
||||||
$relationMap = $tableMap->getRelation('ImportExportCategory');
|
$relationMap = $tableMap->getRelation('ImportCategory');
|
||||||
|
|
||||||
// create a ModelJoin object for this join
|
// create a ModelJoin object for this join
|
||||||
$join = new ModelJoin();
|
$join = new ModelJoin();
|
||||||
@@ -388,14 +388,14 @@ abstract class ImportExportCategoryI18nQuery extends ModelCriteria
|
|||||||
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||||
$this->addJoinObject($join, $relationAlias);
|
$this->addJoinObject($join, $relationAlias);
|
||||||
} else {
|
} else {
|
||||||
$this->addJoinObject($join, 'ImportExportCategory');
|
$this->addJoinObject($join, 'ImportCategory');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Use the ImportExportCategory relation ImportExportCategory object
|
* Use the ImportCategory relation ImportCategory object
|
||||||
*
|
*
|
||||||
* @see useQuery()
|
* @see useQuery()
|
||||||
*
|
*
|
||||||
@@ -403,27 +403,27 @@ abstract class ImportExportCategoryI18nQuery extends ModelCriteria
|
|||||||
* to be used as main alias in the secondary query
|
* to be used as main alias in the secondary query
|
||||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||||
*
|
*
|
||||||
* @return \Thelia\Model\ImportExportCategoryQuery A secondary query class using the current class as primary query
|
* @return \Thelia\Model\ImportCategoryQuery A secondary query class using the current class as primary query
|
||||||
*/
|
*/
|
||||||
public function useImportExportCategoryQuery($relationAlias = null, $joinType = 'LEFT JOIN')
|
public function useImportCategoryQuery($relationAlias = null, $joinType = 'LEFT JOIN')
|
||||||
{
|
{
|
||||||
return $this
|
return $this
|
||||||
->joinImportExportCategory($relationAlias, $joinType)
|
->joinImportCategory($relationAlias, $joinType)
|
||||||
->useQuery($relationAlias ? $relationAlias : 'ImportExportCategory', '\Thelia\Model\ImportExportCategoryQuery');
|
->useQuery($relationAlias ? $relationAlias : 'ImportCategory', '\Thelia\Model\ImportCategoryQuery');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Exclude object from result
|
* Exclude object from result
|
||||||
*
|
*
|
||||||
* @param ChildImportExportCategoryI18n $importExportCategoryI18n Object to remove from the list of results
|
* @param ChildImportCategoryI18n $importCategoryI18n Object to remove from the list of results
|
||||||
*
|
*
|
||||||
* @return ChildImportExportCategoryI18nQuery The current query, for fluid interface
|
* @return ChildImportCategoryI18nQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function prune($importExportCategoryI18n = null)
|
public function prune($importCategoryI18n = null)
|
||||||
{
|
{
|
||||||
if ($importExportCategoryI18n) {
|
if ($importCategoryI18n) {
|
||||||
$this->addCond('pruneCond0', $this->getAliasedColName(ImportExportCategoryI18nTableMap::ID), $importExportCategoryI18n->getId(), Criteria::NOT_EQUAL);
|
$this->addCond('pruneCond0', $this->getAliasedColName(ImportCategoryI18nTableMap::ID), $importCategoryI18n->getId(), Criteria::NOT_EQUAL);
|
||||||
$this->addCond('pruneCond1', $this->getAliasedColName(ImportExportCategoryI18nTableMap::LOCALE), $importExportCategoryI18n->getLocale(), Criteria::NOT_EQUAL);
|
$this->addCond('pruneCond1', $this->getAliasedColName(ImportCategoryI18nTableMap::LOCALE), $importCategoryI18n->getLocale(), Criteria::NOT_EQUAL);
|
||||||
$this->combine(array('pruneCond0', 'pruneCond1'), Criteria::LOGICAL_OR);
|
$this->combine(array('pruneCond0', 'pruneCond1'), Criteria::LOGICAL_OR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -431,7 +431,7 @@ abstract class ImportExportCategoryI18nQuery extends ModelCriteria
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deletes all rows from the import_export_category_i18n table.
|
* Deletes all rows from the import_category_i18n table.
|
||||||
*
|
*
|
||||||
* @param ConnectionInterface $con the connection to use
|
* @param ConnectionInterface $con the connection to use
|
||||||
* @return int The number of affected rows (if supported by underlying database driver).
|
* @return int The number of affected rows (if supported by underlying database driver).
|
||||||
@@ -439,7 +439,7 @@ abstract class ImportExportCategoryI18nQuery extends ModelCriteria
|
|||||||
public function doDeleteAll(ConnectionInterface $con = null)
|
public function doDeleteAll(ConnectionInterface $con = null)
|
||||||
{
|
{
|
||||||
if (null === $con) {
|
if (null === $con) {
|
||||||
$con = Propel::getServiceContainer()->getWriteConnection(ImportExportCategoryI18nTableMap::DATABASE_NAME);
|
$con = Propel::getServiceContainer()->getWriteConnection(ImportCategoryI18nTableMap::DATABASE_NAME);
|
||||||
}
|
}
|
||||||
$affectedRows = 0; // initialize var to track total num of affected rows
|
$affectedRows = 0; // initialize var to track total num of affected rows
|
||||||
try {
|
try {
|
||||||
@@ -450,8 +450,8 @@ abstract class ImportExportCategoryI18nQuery extends ModelCriteria
|
|||||||
// Because this db requires some delete cascade/set null emulation, we have to
|
// Because this db requires some delete cascade/set null emulation, we have to
|
||||||
// clear the cached instance *after* the emulation has happened (since
|
// clear the cached instance *after* the emulation has happened (since
|
||||||
// instances get re-added by the select statement contained therein).
|
// instances get re-added by the select statement contained therein).
|
||||||
ImportExportCategoryI18nTableMap::clearInstancePool();
|
ImportCategoryI18nTableMap::clearInstancePool();
|
||||||
ImportExportCategoryI18nTableMap::clearRelatedInstancePool();
|
ImportCategoryI18nTableMap::clearRelatedInstancePool();
|
||||||
|
|
||||||
$con->commit();
|
$con->commit();
|
||||||
} catch (PropelException $e) {
|
} catch (PropelException $e) {
|
||||||
@@ -463,9 +463,9 @@ abstract class ImportExportCategoryI18nQuery extends ModelCriteria
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Performs a DELETE on the database, given a ChildImportExportCategoryI18n or Criteria object OR a primary key value.
|
* Performs a DELETE on the database, given a ChildImportCategoryI18n or Criteria object OR a primary key value.
|
||||||
*
|
*
|
||||||
* @param mixed $values Criteria or ChildImportExportCategoryI18n object or primary key or array of primary keys
|
* @param mixed $values Criteria or ChildImportCategoryI18n object or primary key or array of primary keys
|
||||||
* which is used to create the DELETE statement
|
* which is used to create the DELETE statement
|
||||||
* @param ConnectionInterface $con the connection to use
|
* @param ConnectionInterface $con the connection to use
|
||||||
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
|
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
|
||||||
@@ -476,13 +476,13 @@ abstract class ImportExportCategoryI18nQuery extends ModelCriteria
|
|||||||
public function delete(ConnectionInterface $con = null)
|
public function delete(ConnectionInterface $con = null)
|
||||||
{
|
{
|
||||||
if (null === $con) {
|
if (null === $con) {
|
||||||
$con = Propel::getServiceContainer()->getWriteConnection(ImportExportCategoryI18nTableMap::DATABASE_NAME);
|
$con = Propel::getServiceContainer()->getWriteConnection(ImportCategoryI18nTableMap::DATABASE_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
$criteria = $this;
|
$criteria = $this;
|
||||||
|
|
||||||
// Set the correct dbName
|
// Set the correct dbName
|
||||||
$criteria->setDbName(ImportExportCategoryI18nTableMap::DATABASE_NAME);
|
$criteria->setDbName(ImportCategoryI18nTableMap::DATABASE_NAME);
|
||||||
|
|
||||||
$affectedRows = 0; // initialize var to track total num of affected rows
|
$affectedRows = 0; // initialize var to track total num of affected rows
|
||||||
|
|
||||||
@@ -492,10 +492,10 @@ abstract class ImportExportCategoryI18nQuery extends ModelCriteria
|
|||||||
$con->beginTransaction();
|
$con->beginTransaction();
|
||||||
|
|
||||||
|
|
||||||
ImportExportCategoryI18nTableMap::removeInstanceFromPool($criteria);
|
ImportCategoryI18nTableMap::removeInstanceFromPool($criteria);
|
||||||
|
|
||||||
$affectedRows += ModelCriteria::delete($con);
|
$affectedRows += ModelCriteria::delete($con);
|
||||||
ImportExportCategoryI18nTableMap::clearRelatedInstancePool();
|
ImportCategoryI18nTableMap::clearRelatedInstancePool();
|
||||||
$con->commit();
|
$con->commit();
|
||||||
|
|
||||||
return $affectedRows;
|
return $affectedRows;
|
||||||
@@ -505,4 +505,4 @@ abstract class ImportExportCategoryI18nQuery extends ModelCriteria
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} // ImportExportCategoryI18nQuery
|
} // ImportCategoryI18nQuery
|
||||||
@@ -12,81 +12,81 @@ use Propel\Runtime\Collection\Collection;
|
|||||||
use Propel\Runtime\Collection\ObjectCollection;
|
use Propel\Runtime\Collection\ObjectCollection;
|
||||||
use Propel\Runtime\Connection\ConnectionInterface;
|
use Propel\Runtime\Connection\ConnectionInterface;
|
||||||
use Propel\Runtime\Exception\PropelException;
|
use Propel\Runtime\Exception\PropelException;
|
||||||
use Thelia\Model\ImportExportCategory as ChildImportExportCategory;
|
use Thelia\Model\ImportCategory as ChildImportCategory;
|
||||||
use Thelia\Model\ImportExportCategoryI18nQuery as ChildImportExportCategoryI18nQuery;
|
use Thelia\Model\ImportCategoryI18nQuery as ChildImportCategoryI18nQuery;
|
||||||
use Thelia\Model\ImportExportCategoryQuery as ChildImportExportCategoryQuery;
|
use Thelia\Model\ImportCategoryQuery as ChildImportCategoryQuery;
|
||||||
use Thelia\Model\Map\ImportExportCategoryTableMap;
|
use Thelia\Model\Map\ImportCategoryTableMap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base class that represents a query for the 'import_export_category' table.
|
* Base class that represents a query for the 'import_category' table.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @method ChildImportExportCategoryQuery orderById($order = Criteria::ASC) Order by the id column
|
* @method ChildImportCategoryQuery orderById($order = Criteria::ASC) Order by the id column
|
||||||
* @method ChildImportExportCategoryQuery orderByPosition($order = Criteria::ASC) Order by the position column
|
* @method ChildImportCategoryQuery orderByPosition($order = Criteria::ASC) Order by the position column
|
||||||
* @method ChildImportExportCategoryQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
|
* @method ChildImportCategoryQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
|
||||||
* @method ChildImportExportCategoryQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
|
* @method ChildImportCategoryQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
|
||||||
*
|
*
|
||||||
* @method ChildImportExportCategoryQuery groupById() Group by the id column
|
* @method ChildImportCategoryQuery groupById() Group by the id column
|
||||||
* @method ChildImportExportCategoryQuery groupByPosition() Group by the position column
|
* @method ChildImportCategoryQuery groupByPosition() Group by the position column
|
||||||
* @method ChildImportExportCategoryQuery groupByCreatedAt() Group by the created_at column
|
* @method ChildImportCategoryQuery groupByCreatedAt() Group by the created_at column
|
||||||
* @method ChildImportExportCategoryQuery groupByUpdatedAt() Group by the updated_at column
|
* @method ChildImportCategoryQuery groupByUpdatedAt() Group by the updated_at column
|
||||||
*
|
*
|
||||||
* @method ChildImportExportCategoryQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
|
* @method ChildImportCategoryQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
|
||||||
* @method ChildImportExportCategoryQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
* @method ChildImportCategoryQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
||||||
* @method ChildImportExportCategoryQuery innerJoin($relation) Adds a INNER JOIN clause to the query
|
* @method ChildImportCategoryQuery innerJoin($relation) Adds a INNER JOIN clause to the query
|
||||||
*
|
*
|
||||||
* @method ChildImportExportCategoryQuery leftJoinImportExportType($relationAlias = null) Adds a LEFT JOIN clause to the query using the ImportExportType relation
|
* @method ChildImportCategoryQuery leftJoinImport($relationAlias = null) Adds a LEFT JOIN clause to the query using the Import relation
|
||||||
* @method ChildImportExportCategoryQuery rightJoinImportExportType($relationAlias = null) Adds a RIGHT JOIN clause to the query using the ImportExportType relation
|
* @method ChildImportCategoryQuery rightJoinImport($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Import relation
|
||||||
* @method ChildImportExportCategoryQuery innerJoinImportExportType($relationAlias = null) Adds a INNER JOIN clause to the query using the ImportExportType relation
|
* @method ChildImportCategoryQuery innerJoinImport($relationAlias = null) Adds a INNER JOIN clause to the query using the Import relation
|
||||||
*
|
*
|
||||||
* @method ChildImportExportCategoryQuery leftJoinImportExportCategoryI18n($relationAlias = null) Adds a LEFT JOIN clause to the query using the ImportExportCategoryI18n relation
|
* @method ChildImportCategoryQuery leftJoinImportCategoryI18n($relationAlias = null) Adds a LEFT JOIN clause to the query using the ImportCategoryI18n relation
|
||||||
* @method ChildImportExportCategoryQuery rightJoinImportExportCategoryI18n($relationAlias = null) Adds a RIGHT JOIN clause to the query using the ImportExportCategoryI18n relation
|
* @method ChildImportCategoryQuery rightJoinImportCategoryI18n($relationAlias = null) Adds a RIGHT JOIN clause to the query using the ImportCategoryI18n relation
|
||||||
* @method ChildImportExportCategoryQuery innerJoinImportExportCategoryI18n($relationAlias = null) Adds a INNER JOIN clause to the query using the ImportExportCategoryI18n relation
|
* @method ChildImportCategoryQuery innerJoinImportCategoryI18n($relationAlias = null) Adds a INNER JOIN clause to the query using the ImportCategoryI18n relation
|
||||||
*
|
*
|
||||||
* @method ChildImportExportCategory findOne(ConnectionInterface $con = null) Return the first ChildImportExportCategory matching the query
|
* @method ChildImportCategory findOne(ConnectionInterface $con = null) Return the first ChildImportCategory matching the query
|
||||||
* @method ChildImportExportCategory findOneOrCreate(ConnectionInterface $con = null) Return the first ChildImportExportCategory matching the query, or a new ChildImportExportCategory object populated from the query conditions when no match is found
|
* @method ChildImportCategory findOneOrCreate(ConnectionInterface $con = null) Return the first ChildImportCategory matching the query, or a new ChildImportCategory object populated from the query conditions when no match is found
|
||||||
*
|
*
|
||||||
* @method ChildImportExportCategory findOneById(int $id) Return the first ChildImportExportCategory filtered by the id column
|
* @method ChildImportCategory findOneById(int $id) Return the first ChildImportCategory filtered by the id column
|
||||||
* @method ChildImportExportCategory findOneByPosition(int $position) Return the first ChildImportExportCategory filtered by the position column
|
* @method ChildImportCategory findOneByPosition(int $position) Return the first ChildImportCategory filtered by the position column
|
||||||
* @method ChildImportExportCategory findOneByCreatedAt(string $created_at) Return the first ChildImportExportCategory filtered by the created_at column
|
* @method ChildImportCategory findOneByCreatedAt(string $created_at) Return the first ChildImportCategory filtered by the created_at column
|
||||||
* @method ChildImportExportCategory findOneByUpdatedAt(string $updated_at) Return the first ChildImportExportCategory filtered by the updated_at column
|
* @method ChildImportCategory findOneByUpdatedAt(string $updated_at) Return the first ChildImportCategory filtered by the updated_at column
|
||||||
*
|
*
|
||||||
* @method array findById(int $id) Return ChildImportExportCategory objects filtered by the id column
|
* @method array findById(int $id) Return ChildImportCategory objects filtered by the id column
|
||||||
* @method array findByPosition(int $position) Return ChildImportExportCategory objects filtered by the position column
|
* @method array findByPosition(int $position) Return ChildImportCategory objects filtered by the position column
|
||||||
* @method array findByCreatedAt(string $created_at) Return ChildImportExportCategory objects filtered by the created_at column
|
* @method array findByCreatedAt(string $created_at) Return ChildImportCategory objects filtered by the created_at column
|
||||||
* @method array findByUpdatedAt(string $updated_at) Return ChildImportExportCategory objects filtered by the updated_at column
|
* @method array findByUpdatedAt(string $updated_at) Return ChildImportCategory objects filtered by the updated_at column
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
abstract class ImportExportCategoryQuery extends ModelCriteria
|
abstract class ImportCategoryQuery extends ModelCriteria
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes internal state of \Thelia\Model\Base\ImportExportCategoryQuery object.
|
* Initializes internal state of \Thelia\Model\Base\ImportCategoryQuery object.
|
||||||
*
|
*
|
||||||
* @param string $dbName The database name
|
* @param string $dbName The database name
|
||||||
* @param string $modelName The phpName of a model, e.g. 'Book'
|
* @param string $modelName The phpName of a model, e.g. 'Book'
|
||||||
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
|
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
|
||||||
*/
|
*/
|
||||||
public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\ImportExportCategory', $modelAlias = null)
|
public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\ImportCategory', $modelAlias = null)
|
||||||
{
|
{
|
||||||
parent::__construct($dbName, $modelName, $modelAlias);
|
parent::__construct($dbName, $modelName, $modelAlias);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a new ChildImportExportCategoryQuery object.
|
* Returns a new ChildImportCategoryQuery object.
|
||||||
*
|
*
|
||||||
* @param string $modelAlias The alias of a model in the query
|
* @param string $modelAlias The alias of a model in the query
|
||||||
* @param Criteria $criteria Optional Criteria to build the query from
|
* @param Criteria $criteria Optional Criteria to build the query from
|
||||||
*
|
*
|
||||||
* @return ChildImportExportCategoryQuery
|
* @return ChildImportCategoryQuery
|
||||||
*/
|
*/
|
||||||
public static function create($modelAlias = null, $criteria = null)
|
public static function create($modelAlias = null, $criteria = null)
|
||||||
{
|
{
|
||||||
if ($criteria instanceof \Thelia\Model\ImportExportCategoryQuery) {
|
if ($criteria instanceof \Thelia\Model\ImportCategoryQuery) {
|
||||||
return $criteria;
|
return $criteria;
|
||||||
}
|
}
|
||||||
$query = new \Thelia\Model\ImportExportCategoryQuery();
|
$query = new \Thelia\Model\ImportCategoryQuery();
|
||||||
if (null !== $modelAlias) {
|
if (null !== $modelAlias) {
|
||||||
$query->setModelAlias($modelAlias);
|
$query->setModelAlias($modelAlias);
|
||||||
}
|
}
|
||||||
@@ -109,19 +109,19 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
|||||||
* @param mixed $key Primary key to use for the query
|
* @param mixed $key Primary key to use for the query
|
||||||
* @param ConnectionInterface $con an optional connection object
|
* @param ConnectionInterface $con an optional connection object
|
||||||
*
|
*
|
||||||
* @return ChildImportExportCategory|array|mixed the result, formatted by the current formatter
|
* @return ChildImportCategory|array|mixed the result, formatted by the current formatter
|
||||||
*/
|
*/
|
||||||
public function findPk($key, $con = null)
|
public function findPk($key, $con = null)
|
||||||
{
|
{
|
||||||
if ($key === null) {
|
if ($key === null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if ((null !== ($obj = ImportExportCategoryTableMap::getInstanceFromPool((string) $key))) && !$this->formatter) {
|
if ((null !== ($obj = ImportCategoryTableMap::getInstanceFromPool((string) $key))) && !$this->formatter) {
|
||||||
// the object is already in the instance pool
|
// the object is already in the instance pool
|
||||||
return $obj;
|
return $obj;
|
||||||
}
|
}
|
||||||
if ($con === null) {
|
if ($con === null) {
|
||||||
$con = Propel::getServiceContainer()->getReadConnection(ImportExportCategoryTableMap::DATABASE_NAME);
|
$con = Propel::getServiceContainer()->getReadConnection(ImportCategoryTableMap::DATABASE_NAME);
|
||||||
}
|
}
|
||||||
$this->basePreSelect($con);
|
$this->basePreSelect($con);
|
||||||
if ($this->formatter || $this->modelAlias || $this->with || $this->select
|
if ($this->formatter || $this->modelAlias || $this->with || $this->select
|
||||||
@@ -140,11 +140,11 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
|||||||
* @param mixed $key Primary key to use for the query
|
* @param mixed $key Primary key to use for the query
|
||||||
* @param ConnectionInterface $con A connection object
|
* @param ConnectionInterface $con A connection object
|
||||||
*
|
*
|
||||||
* @return ChildImportExportCategory A model object, or null if the key is not found
|
* @return ChildImportCategory A model object, or null if the key is not found
|
||||||
*/
|
*/
|
||||||
protected function findPkSimple($key, $con)
|
protected function findPkSimple($key, $con)
|
||||||
{
|
{
|
||||||
$sql = 'SELECT `ID`, `POSITION`, `CREATED_AT`, `UPDATED_AT` FROM `import_export_category` WHERE `ID` = :p0';
|
$sql = 'SELECT `ID`, `POSITION`, `CREATED_AT`, `UPDATED_AT` FROM `import_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);
|
||||||
@@ -155,9 +155,9 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
|||||||
}
|
}
|
||||||
$obj = null;
|
$obj = null;
|
||||||
if ($row = $stmt->fetch(\PDO::FETCH_NUM)) {
|
if ($row = $stmt->fetch(\PDO::FETCH_NUM)) {
|
||||||
$obj = new ChildImportExportCategory();
|
$obj = new ChildImportCategory();
|
||||||
$obj->hydrate($row);
|
$obj->hydrate($row);
|
||||||
ImportExportCategoryTableMap::addInstanceToPool($obj, (string) $key);
|
ImportCategoryTableMap::addInstanceToPool($obj, (string) $key);
|
||||||
}
|
}
|
||||||
$stmt->closeCursor();
|
$stmt->closeCursor();
|
||||||
|
|
||||||
@@ -170,7 +170,7 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
|||||||
* @param mixed $key Primary key to use for the query
|
* @param mixed $key Primary key to use for the query
|
||||||
* @param ConnectionInterface $con A connection object
|
* @param ConnectionInterface $con A connection object
|
||||||
*
|
*
|
||||||
* @return ChildImportExportCategory|array|mixed the result, formatted by the current formatter
|
* @return ChildImportCategory|array|mixed the result, formatted by the current formatter
|
||||||
*/
|
*/
|
||||||
protected function findPkComplex($key, $con)
|
protected function findPkComplex($key, $con)
|
||||||
{
|
{
|
||||||
@@ -212,12 +212,12 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
|||||||
*
|
*
|
||||||
* @param mixed $key Primary key to use for the query
|
* @param mixed $key Primary key to use for the query
|
||||||
*
|
*
|
||||||
* @return ChildImportExportCategoryQuery The current query, for fluid interface
|
* @return ChildImportCategoryQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function filterByPrimaryKey($key)
|
public function filterByPrimaryKey($key)
|
||||||
{
|
{
|
||||||
|
|
||||||
return $this->addUsingAlias(ImportExportCategoryTableMap::ID, $key, Criteria::EQUAL);
|
return $this->addUsingAlias(ImportCategoryTableMap::ID, $key, Criteria::EQUAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -225,12 +225,12 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
|||||||
*
|
*
|
||||||
* @param array $keys The list of primary key to use for the query
|
* @param array $keys The list of primary key to use for the query
|
||||||
*
|
*
|
||||||
* @return ChildImportExportCategoryQuery The current query, for fluid interface
|
* @return ChildImportCategoryQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function filterByPrimaryKeys($keys)
|
public function filterByPrimaryKeys($keys)
|
||||||
{
|
{
|
||||||
|
|
||||||
return $this->addUsingAlias(ImportExportCategoryTableMap::ID, $keys, Criteria::IN);
|
return $this->addUsingAlias(ImportCategoryTableMap::ID, $keys, Criteria::IN);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -249,18 +249,18 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
|||||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
*
|
*
|
||||||
* @return ChildImportExportCategoryQuery The current query, for fluid interface
|
* @return ChildImportCategoryQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function filterById($id = null, $comparison = null)
|
public function filterById($id = null, $comparison = null)
|
||||||
{
|
{
|
||||||
if (is_array($id)) {
|
if (is_array($id)) {
|
||||||
$useMinMax = false;
|
$useMinMax = false;
|
||||||
if (isset($id['min'])) {
|
if (isset($id['min'])) {
|
||||||
$this->addUsingAlias(ImportExportCategoryTableMap::ID, $id['min'], Criteria::GREATER_EQUAL);
|
$this->addUsingAlias(ImportCategoryTableMap::ID, $id['min'], Criteria::GREATER_EQUAL);
|
||||||
$useMinMax = true;
|
$useMinMax = true;
|
||||||
}
|
}
|
||||||
if (isset($id['max'])) {
|
if (isset($id['max'])) {
|
||||||
$this->addUsingAlias(ImportExportCategoryTableMap::ID, $id['max'], Criteria::LESS_EQUAL);
|
$this->addUsingAlias(ImportCategoryTableMap::ID, $id['max'], Criteria::LESS_EQUAL);
|
||||||
$useMinMax = true;
|
$useMinMax = true;
|
||||||
}
|
}
|
||||||
if ($useMinMax) {
|
if ($useMinMax) {
|
||||||
@@ -271,7 +271,7 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->addUsingAlias(ImportExportCategoryTableMap::ID, $id, $comparison);
|
return $this->addUsingAlias(ImportCategoryTableMap::ID, $id, $comparison);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -290,18 +290,18 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
|||||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
*
|
*
|
||||||
* @return ChildImportExportCategoryQuery The current query, for fluid interface
|
* @return ChildImportCategoryQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function filterByPosition($position = null, $comparison = null)
|
public function filterByPosition($position = null, $comparison = null)
|
||||||
{
|
{
|
||||||
if (is_array($position)) {
|
if (is_array($position)) {
|
||||||
$useMinMax = false;
|
$useMinMax = false;
|
||||||
if (isset($position['min'])) {
|
if (isset($position['min'])) {
|
||||||
$this->addUsingAlias(ImportExportCategoryTableMap::POSITION, $position['min'], Criteria::GREATER_EQUAL);
|
$this->addUsingAlias(ImportCategoryTableMap::POSITION, $position['min'], Criteria::GREATER_EQUAL);
|
||||||
$useMinMax = true;
|
$useMinMax = true;
|
||||||
}
|
}
|
||||||
if (isset($position['max'])) {
|
if (isset($position['max'])) {
|
||||||
$this->addUsingAlias(ImportExportCategoryTableMap::POSITION, $position['max'], Criteria::LESS_EQUAL);
|
$this->addUsingAlias(ImportCategoryTableMap::POSITION, $position['max'], Criteria::LESS_EQUAL);
|
||||||
$useMinMax = true;
|
$useMinMax = true;
|
||||||
}
|
}
|
||||||
if ($useMinMax) {
|
if ($useMinMax) {
|
||||||
@@ -312,7 +312,7 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->addUsingAlias(ImportExportCategoryTableMap::POSITION, $position, $comparison);
|
return $this->addUsingAlias(ImportCategoryTableMap::POSITION, $position, $comparison);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -333,18 +333,18 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
|||||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
*
|
*
|
||||||
* @return ChildImportExportCategoryQuery The current query, for fluid interface
|
* @return ChildImportCategoryQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function filterByCreatedAt($createdAt = null, $comparison = null)
|
public function filterByCreatedAt($createdAt = null, $comparison = null)
|
||||||
{
|
{
|
||||||
if (is_array($createdAt)) {
|
if (is_array($createdAt)) {
|
||||||
$useMinMax = false;
|
$useMinMax = false;
|
||||||
if (isset($createdAt['min'])) {
|
if (isset($createdAt['min'])) {
|
||||||
$this->addUsingAlias(ImportExportCategoryTableMap::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL);
|
$this->addUsingAlias(ImportCategoryTableMap::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL);
|
||||||
$useMinMax = true;
|
$useMinMax = true;
|
||||||
}
|
}
|
||||||
if (isset($createdAt['max'])) {
|
if (isset($createdAt['max'])) {
|
||||||
$this->addUsingAlias(ImportExportCategoryTableMap::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL);
|
$this->addUsingAlias(ImportCategoryTableMap::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL);
|
||||||
$useMinMax = true;
|
$useMinMax = true;
|
||||||
}
|
}
|
||||||
if ($useMinMax) {
|
if ($useMinMax) {
|
||||||
@@ -355,7 +355,7 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->addUsingAlias(ImportExportCategoryTableMap::CREATED_AT, $createdAt, $comparison);
|
return $this->addUsingAlias(ImportCategoryTableMap::CREATED_AT, $createdAt, $comparison);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -376,18 +376,18 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
|||||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
*
|
*
|
||||||
* @return ChildImportExportCategoryQuery The current query, for fluid interface
|
* @return ChildImportCategoryQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function filterByUpdatedAt($updatedAt = null, $comparison = null)
|
public function filterByUpdatedAt($updatedAt = null, $comparison = null)
|
||||||
{
|
{
|
||||||
if (is_array($updatedAt)) {
|
if (is_array($updatedAt)) {
|
||||||
$useMinMax = false;
|
$useMinMax = false;
|
||||||
if (isset($updatedAt['min'])) {
|
if (isset($updatedAt['min'])) {
|
||||||
$this->addUsingAlias(ImportExportCategoryTableMap::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);
|
$this->addUsingAlias(ImportCategoryTableMap::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);
|
||||||
$useMinMax = true;
|
$useMinMax = true;
|
||||||
}
|
}
|
||||||
if (isset($updatedAt['max'])) {
|
if (isset($updatedAt['max'])) {
|
||||||
$this->addUsingAlias(ImportExportCategoryTableMap::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);
|
$this->addUsingAlias(ImportCategoryTableMap::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);
|
||||||
$useMinMax = true;
|
$useMinMax = true;
|
||||||
}
|
}
|
||||||
if ($useMinMax) {
|
if ($useMinMax) {
|
||||||
@@ -398,44 +398,44 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->addUsingAlias(ImportExportCategoryTableMap::UPDATED_AT, $updatedAt, $comparison);
|
return $this->addUsingAlias(ImportCategoryTableMap::UPDATED_AT, $updatedAt, $comparison);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the query by a related \Thelia\Model\ImportExportType object
|
* Filter the query by a related \Thelia\Model\Import object
|
||||||
*
|
*
|
||||||
* @param \Thelia\Model\ImportExportType|ObjectCollection $importExportType the related object to use as filter
|
* @param \Thelia\Model\Import|ObjectCollection $import the related object to use as filter
|
||||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
*
|
*
|
||||||
* @return ChildImportExportCategoryQuery The current query, for fluid interface
|
* @return ChildImportCategoryQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function filterByImportExportType($importExportType, $comparison = null)
|
public function filterByImport($import, $comparison = null)
|
||||||
{
|
{
|
||||||
if ($importExportType instanceof \Thelia\Model\ImportExportType) {
|
if ($import instanceof \Thelia\Model\Import) {
|
||||||
return $this
|
return $this
|
||||||
->addUsingAlias(ImportExportCategoryTableMap::ID, $importExportType->getImportExportCategoryId(), $comparison);
|
->addUsingAlias(ImportCategoryTableMap::ID, $import->getImportCategoryId(), $comparison);
|
||||||
} elseif ($importExportType instanceof ObjectCollection) {
|
} elseif ($import instanceof ObjectCollection) {
|
||||||
return $this
|
return $this
|
||||||
->useImportExportTypeQuery()
|
->useImportQuery()
|
||||||
->filterByPrimaryKeys($importExportType->getPrimaryKeys())
|
->filterByPrimaryKeys($import->getPrimaryKeys())
|
||||||
->endUse();
|
->endUse();
|
||||||
} else {
|
} else {
|
||||||
throw new PropelException('filterByImportExportType() only accepts arguments of type \Thelia\Model\ImportExportType or Collection');
|
throw new PropelException('filterByImport() only accepts arguments of type \Thelia\Model\Import or Collection');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a JOIN clause to the query using the ImportExportType relation
|
* Adds a JOIN clause to the query using the Import relation
|
||||||
*
|
*
|
||||||
* @param string $relationAlias optional alias for the relation
|
* @param string $relationAlias optional alias for the relation
|
||||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||||
*
|
*
|
||||||
* @return ChildImportExportCategoryQuery The current query, for fluid interface
|
* @return ChildImportCategoryQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function joinImportExportType($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
public function joinImport($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||||
{
|
{
|
||||||
$tableMap = $this->getTableMap();
|
$tableMap = $this->getTableMap();
|
||||||
$relationMap = $tableMap->getRelation('ImportExportType');
|
$relationMap = $tableMap->getRelation('Import');
|
||||||
|
|
||||||
// create a ModelJoin object for this join
|
// create a ModelJoin object for this join
|
||||||
$join = new ModelJoin();
|
$join = new ModelJoin();
|
||||||
@@ -450,14 +450,14 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
|||||||
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||||
$this->addJoinObject($join, $relationAlias);
|
$this->addJoinObject($join, $relationAlias);
|
||||||
} else {
|
} else {
|
||||||
$this->addJoinObject($join, 'ImportExportType');
|
$this->addJoinObject($join, 'Import');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Use the ImportExportType relation ImportExportType object
|
* Use the Import relation Import object
|
||||||
*
|
*
|
||||||
* @see useQuery()
|
* @see useQuery()
|
||||||
*
|
*
|
||||||
@@ -465,50 +465,50 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
|||||||
* to be used as main alias in the secondary query
|
* to be used as main alias in the secondary query
|
||||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||||
*
|
*
|
||||||
* @return \Thelia\Model\ImportExportTypeQuery A secondary query class using the current class as primary query
|
* @return \Thelia\Model\ImportQuery A secondary query class using the current class as primary query
|
||||||
*/
|
*/
|
||||||
public function useImportExportTypeQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
public function useImportQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||||
{
|
{
|
||||||
return $this
|
return $this
|
||||||
->joinImportExportType($relationAlias, $joinType)
|
->joinImport($relationAlias, $joinType)
|
||||||
->useQuery($relationAlias ? $relationAlias : 'ImportExportType', '\Thelia\Model\ImportExportTypeQuery');
|
->useQuery($relationAlias ? $relationAlias : 'Import', '\Thelia\Model\ImportQuery');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the query by a related \Thelia\Model\ImportExportCategoryI18n object
|
* Filter the query by a related \Thelia\Model\ImportCategoryI18n object
|
||||||
*
|
*
|
||||||
* @param \Thelia\Model\ImportExportCategoryI18n|ObjectCollection $importExportCategoryI18n the related object to use as filter
|
* @param \Thelia\Model\ImportCategoryI18n|ObjectCollection $importCategoryI18n the related object to use as filter
|
||||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
*
|
*
|
||||||
* @return ChildImportExportCategoryQuery The current query, for fluid interface
|
* @return ChildImportCategoryQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function filterByImportExportCategoryI18n($importExportCategoryI18n, $comparison = null)
|
public function filterByImportCategoryI18n($importCategoryI18n, $comparison = null)
|
||||||
{
|
{
|
||||||
if ($importExportCategoryI18n instanceof \Thelia\Model\ImportExportCategoryI18n) {
|
if ($importCategoryI18n instanceof \Thelia\Model\ImportCategoryI18n) {
|
||||||
return $this
|
return $this
|
||||||
->addUsingAlias(ImportExportCategoryTableMap::ID, $importExportCategoryI18n->getId(), $comparison);
|
->addUsingAlias(ImportCategoryTableMap::ID, $importCategoryI18n->getId(), $comparison);
|
||||||
} elseif ($importExportCategoryI18n instanceof ObjectCollection) {
|
} elseif ($importCategoryI18n instanceof ObjectCollection) {
|
||||||
return $this
|
return $this
|
||||||
->useImportExportCategoryI18nQuery()
|
->useImportCategoryI18nQuery()
|
||||||
->filterByPrimaryKeys($importExportCategoryI18n->getPrimaryKeys())
|
->filterByPrimaryKeys($importCategoryI18n->getPrimaryKeys())
|
||||||
->endUse();
|
->endUse();
|
||||||
} else {
|
} else {
|
||||||
throw new PropelException('filterByImportExportCategoryI18n() only accepts arguments of type \Thelia\Model\ImportExportCategoryI18n or Collection');
|
throw new PropelException('filterByImportCategoryI18n() only accepts arguments of type \Thelia\Model\ImportCategoryI18n or Collection');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a JOIN clause to the query using the ImportExportCategoryI18n relation
|
* Adds a JOIN clause to the query using the ImportCategoryI18n relation
|
||||||
*
|
*
|
||||||
* @param string $relationAlias optional alias for the relation
|
* @param string $relationAlias optional alias for the relation
|
||||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||||
*
|
*
|
||||||
* @return ChildImportExportCategoryQuery The current query, for fluid interface
|
* @return ChildImportCategoryQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function joinImportExportCategoryI18n($relationAlias = null, $joinType = 'LEFT JOIN')
|
public function joinImportCategoryI18n($relationAlias = null, $joinType = 'LEFT JOIN')
|
||||||
{
|
{
|
||||||
$tableMap = $this->getTableMap();
|
$tableMap = $this->getTableMap();
|
||||||
$relationMap = $tableMap->getRelation('ImportExportCategoryI18n');
|
$relationMap = $tableMap->getRelation('ImportCategoryI18n');
|
||||||
|
|
||||||
// create a ModelJoin object for this join
|
// create a ModelJoin object for this join
|
||||||
$join = new ModelJoin();
|
$join = new ModelJoin();
|
||||||
@@ -523,14 +523,14 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
|||||||
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||||
$this->addJoinObject($join, $relationAlias);
|
$this->addJoinObject($join, $relationAlias);
|
||||||
} else {
|
} else {
|
||||||
$this->addJoinObject($join, 'ImportExportCategoryI18n');
|
$this->addJoinObject($join, 'ImportCategoryI18n');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Use the ImportExportCategoryI18n relation ImportExportCategoryI18n object
|
* Use the ImportCategoryI18n relation ImportCategoryI18n object
|
||||||
*
|
*
|
||||||
* @see useQuery()
|
* @see useQuery()
|
||||||
*
|
*
|
||||||
@@ -538,33 +538,33 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
|||||||
* to be used as main alias in the secondary query
|
* to be used as main alias in the secondary query
|
||||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||||
*
|
*
|
||||||
* @return \Thelia\Model\ImportExportCategoryI18nQuery A secondary query class using the current class as primary query
|
* @return \Thelia\Model\ImportCategoryI18nQuery A secondary query class using the current class as primary query
|
||||||
*/
|
*/
|
||||||
public function useImportExportCategoryI18nQuery($relationAlias = null, $joinType = 'LEFT JOIN')
|
public function useImportCategoryI18nQuery($relationAlias = null, $joinType = 'LEFT JOIN')
|
||||||
{
|
{
|
||||||
return $this
|
return $this
|
||||||
->joinImportExportCategoryI18n($relationAlias, $joinType)
|
->joinImportCategoryI18n($relationAlias, $joinType)
|
||||||
->useQuery($relationAlias ? $relationAlias : 'ImportExportCategoryI18n', '\Thelia\Model\ImportExportCategoryI18nQuery');
|
->useQuery($relationAlias ? $relationAlias : 'ImportCategoryI18n', '\Thelia\Model\ImportCategoryI18nQuery');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Exclude object from result
|
* Exclude object from result
|
||||||
*
|
*
|
||||||
* @param ChildImportExportCategory $importExportCategory Object to remove from the list of results
|
* @param ChildImportCategory $importCategory Object to remove from the list of results
|
||||||
*
|
*
|
||||||
* @return ChildImportExportCategoryQuery The current query, for fluid interface
|
* @return ChildImportCategoryQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function prune($importExportCategory = null)
|
public function prune($importCategory = null)
|
||||||
{
|
{
|
||||||
if ($importExportCategory) {
|
if ($importCategory) {
|
||||||
$this->addUsingAlias(ImportExportCategoryTableMap::ID, $importExportCategory->getId(), Criteria::NOT_EQUAL);
|
$this->addUsingAlias(ImportCategoryTableMap::ID, $importCategory->getId(), Criteria::NOT_EQUAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deletes all rows from the import_export_category table.
|
* Deletes all rows from the import_category table.
|
||||||
*
|
*
|
||||||
* @param ConnectionInterface $con the connection to use
|
* @param ConnectionInterface $con the connection to use
|
||||||
* @return int The number of affected rows (if supported by underlying database driver).
|
* @return int The number of affected rows (if supported by underlying database driver).
|
||||||
@@ -572,7 +572,7 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
|||||||
public function doDeleteAll(ConnectionInterface $con = null)
|
public function doDeleteAll(ConnectionInterface $con = null)
|
||||||
{
|
{
|
||||||
if (null === $con) {
|
if (null === $con) {
|
||||||
$con = Propel::getServiceContainer()->getWriteConnection(ImportExportCategoryTableMap::DATABASE_NAME);
|
$con = Propel::getServiceContainer()->getWriteConnection(ImportCategoryTableMap::DATABASE_NAME);
|
||||||
}
|
}
|
||||||
$affectedRows = 0; // initialize var to track total num of affected rows
|
$affectedRows = 0; // initialize var to track total num of affected rows
|
||||||
try {
|
try {
|
||||||
@@ -583,8 +583,8 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
|||||||
// Because this db requires some delete cascade/set null emulation, we have to
|
// Because this db requires some delete cascade/set null emulation, we have to
|
||||||
// clear the cached instance *after* the emulation has happened (since
|
// clear the cached instance *after* the emulation has happened (since
|
||||||
// instances get re-added by the select statement contained therein).
|
// instances get re-added by the select statement contained therein).
|
||||||
ImportExportCategoryTableMap::clearInstancePool();
|
ImportCategoryTableMap::clearInstancePool();
|
||||||
ImportExportCategoryTableMap::clearRelatedInstancePool();
|
ImportCategoryTableMap::clearRelatedInstancePool();
|
||||||
|
|
||||||
$con->commit();
|
$con->commit();
|
||||||
} catch (PropelException $e) {
|
} catch (PropelException $e) {
|
||||||
@@ -596,9 +596,9 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Performs a DELETE on the database, given a ChildImportExportCategory or Criteria object OR a primary key value.
|
* Performs a DELETE on the database, given a ChildImportCategory or Criteria object OR a primary key value.
|
||||||
*
|
*
|
||||||
* @param mixed $values Criteria or ChildImportExportCategory object or primary key or array of primary keys
|
* @param mixed $values Criteria or ChildImportCategory object or primary key or array of primary keys
|
||||||
* which is used to create the DELETE statement
|
* which is used to create the DELETE statement
|
||||||
* @param ConnectionInterface $con the connection to use
|
* @param ConnectionInterface $con the connection to use
|
||||||
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
|
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
|
||||||
@@ -609,13 +609,13 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
|||||||
public function delete(ConnectionInterface $con = null)
|
public function delete(ConnectionInterface $con = null)
|
||||||
{
|
{
|
||||||
if (null === $con) {
|
if (null === $con) {
|
||||||
$con = Propel::getServiceContainer()->getWriteConnection(ImportExportCategoryTableMap::DATABASE_NAME);
|
$con = Propel::getServiceContainer()->getWriteConnection(ImportCategoryTableMap::DATABASE_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
$criteria = $this;
|
$criteria = $this;
|
||||||
|
|
||||||
// Set the correct dbName
|
// Set the correct dbName
|
||||||
$criteria->setDbName(ImportExportCategoryTableMap::DATABASE_NAME);
|
$criteria->setDbName(ImportCategoryTableMap::DATABASE_NAME);
|
||||||
|
|
||||||
$affectedRows = 0; // initialize var to track total num of affected rows
|
$affectedRows = 0; // initialize var to track total num of affected rows
|
||||||
|
|
||||||
@@ -625,10 +625,10 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
|||||||
$con->beginTransaction();
|
$con->beginTransaction();
|
||||||
|
|
||||||
|
|
||||||
ImportExportCategoryTableMap::removeInstanceFromPool($criteria);
|
ImportCategoryTableMap::removeInstanceFromPool($criteria);
|
||||||
|
|
||||||
$affectedRows += ModelCriteria::delete($con);
|
$affectedRows += ModelCriteria::delete($con);
|
||||||
ImportExportCategoryTableMap::clearRelatedInstancePool();
|
ImportCategoryTableMap::clearRelatedInstancePool();
|
||||||
$con->commit();
|
$con->commit();
|
||||||
|
|
||||||
return $affectedRows;
|
return $affectedRows;
|
||||||
@@ -647,14 +647,14 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
|||||||
* @param string $relationAlias optional alias for the relation
|
* @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.
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join.
|
||||||
*
|
*
|
||||||
* @return ChildImportExportCategoryQuery The current query, for fluid interface
|
* @return ChildImportCategoryQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
||||||
{
|
{
|
||||||
$relationName = $relationAlias ? $relationAlias : 'ImportExportCategoryI18n';
|
$relationName = $relationAlias ? $relationAlias : 'ImportCategoryI18n';
|
||||||
|
|
||||||
return $this
|
return $this
|
||||||
->joinImportExportCategoryI18n($relationAlias, $joinType)
|
->joinImportCategoryI18n($relationAlias, $joinType)
|
||||||
->addJoinCondition($relationName, $relationName . '.Locale = ?', $locale);
|
->addJoinCondition($relationName, $relationName . '.Locale = ?', $locale);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -665,14 +665,14 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
|||||||
* @param string $locale Locale to use for the join condition, e.g. 'fr_FR'
|
* @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.
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join.
|
||||||
*
|
*
|
||||||
* @return ChildImportExportCategoryQuery The current query, for fluid interface
|
* @return ChildImportCategoryQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN)
|
public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN)
|
||||||
{
|
{
|
||||||
$this
|
$this
|
||||||
->joinI18n($locale, null, $joinType)
|
->joinI18n($locale, null, $joinType)
|
||||||
->with('ImportExportCategoryI18n');
|
->with('ImportCategoryI18n');
|
||||||
$this->with['ImportExportCategoryI18n']->setIsWithOneToMany(false);
|
$this->with['ImportCategoryI18n']->setIsWithOneToMany(false);
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
@@ -686,13 +686,13 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
|||||||
* @param string $relationAlias optional alias for the relation
|
* @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.
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join.
|
||||||
*
|
*
|
||||||
* @return ChildImportExportCategoryI18nQuery A secondary query class using the current class as primary query
|
* @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)
|
public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
||||||
{
|
{
|
||||||
return $this
|
return $this
|
||||||
->joinI18n($locale, $relationAlias, $joinType)
|
->joinI18n($locale, $relationAlias, $joinType)
|
||||||
->useQuery($relationAlias ? $relationAlias : 'ImportExportCategoryI18n', '\Thelia\Model\ImportExportCategoryI18nQuery');
|
->useQuery($relationAlias ? $relationAlias : 'ImportCategoryI18n', '\Thelia\Model\ImportCategoryI18nQuery');
|
||||||
}
|
}
|
||||||
|
|
||||||
// timestampable behavior
|
// timestampable behavior
|
||||||
@@ -702,11 +702,11 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
|||||||
*
|
*
|
||||||
* @param int $nbDays Maximum age of the latest update in days
|
* @param int $nbDays Maximum age of the latest update in days
|
||||||
*
|
*
|
||||||
* @return ChildImportExportCategoryQuery The current query, for fluid interface
|
* @return ChildImportCategoryQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function recentlyUpdated($nbDays = 7)
|
public function recentlyUpdated($nbDays = 7)
|
||||||
{
|
{
|
||||||
return $this->addUsingAlias(ImportExportCategoryTableMap::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
|
return $this->addUsingAlias(ImportCategoryTableMap::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -714,51 +714,51 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
|||||||
*
|
*
|
||||||
* @param int $nbDays Maximum age of in days
|
* @param int $nbDays Maximum age of in days
|
||||||
*
|
*
|
||||||
* @return ChildImportExportCategoryQuery The current query, for fluid interface
|
* @return ChildImportCategoryQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function recentlyCreated($nbDays = 7)
|
public function recentlyCreated($nbDays = 7)
|
||||||
{
|
{
|
||||||
return $this->addUsingAlias(ImportExportCategoryTableMap::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
|
return $this->addUsingAlias(ImportCategoryTableMap::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Order by update date desc
|
* Order by update date desc
|
||||||
*
|
*
|
||||||
* @return ChildImportExportCategoryQuery The current query, for fluid interface
|
* @return ChildImportCategoryQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function lastUpdatedFirst()
|
public function lastUpdatedFirst()
|
||||||
{
|
{
|
||||||
return $this->addDescendingOrderByColumn(ImportExportCategoryTableMap::UPDATED_AT);
|
return $this->addDescendingOrderByColumn(ImportCategoryTableMap::UPDATED_AT);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Order by update date asc
|
* Order by update date asc
|
||||||
*
|
*
|
||||||
* @return ChildImportExportCategoryQuery The current query, for fluid interface
|
* @return ChildImportCategoryQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function firstUpdatedFirst()
|
public function firstUpdatedFirst()
|
||||||
{
|
{
|
||||||
return $this->addAscendingOrderByColumn(ImportExportCategoryTableMap::UPDATED_AT);
|
return $this->addAscendingOrderByColumn(ImportCategoryTableMap::UPDATED_AT);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Order by create date desc
|
* Order by create date desc
|
||||||
*
|
*
|
||||||
* @return ChildImportExportCategoryQuery The current query, for fluid interface
|
* @return ChildImportCategoryQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function lastCreatedFirst()
|
public function lastCreatedFirst()
|
||||||
{
|
{
|
||||||
return $this->addDescendingOrderByColumn(ImportExportCategoryTableMap::CREATED_AT);
|
return $this->addDescendingOrderByColumn(ImportCategoryTableMap::CREATED_AT);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Order by create date asc
|
* Order by create date asc
|
||||||
*
|
*
|
||||||
* @return ChildImportExportCategoryQuery The current query, for fluid interface
|
* @return ChildImportCategoryQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function firstCreatedFirst()
|
public function firstCreatedFirst()
|
||||||
{
|
{
|
||||||
return $this->addAscendingOrderByColumn(ImportExportCategoryTableMap::CREATED_AT);
|
return $this->addAscendingOrderByColumn(ImportCategoryTableMap::CREATED_AT);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // ImportExportCategoryQuery
|
} // ImportCategoryQuery
|
||||||
@@ -14,17 +14,17 @@ use Propel\Runtime\Exception\BadMethodCallException;
|
|||||||
use Propel\Runtime\Exception\PropelException;
|
use Propel\Runtime\Exception\PropelException;
|
||||||
use Propel\Runtime\Map\TableMap;
|
use Propel\Runtime\Map\TableMap;
|
||||||
use Propel\Runtime\Parser\AbstractParser;
|
use Propel\Runtime\Parser\AbstractParser;
|
||||||
use Thelia\Model\ImportExportType as ChildImportExportType;
|
use Thelia\Model\Import as ChildImport;
|
||||||
use Thelia\Model\ImportExportTypeI18nQuery as ChildImportExportTypeI18nQuery;
|
use Thelia\Model\ImportI18nQuery as ChildImportI18nQuery;
|
||||||
use Thelia\Model\ImportExportTypeQuery as ChildImportExportTypeQuery;
|
use Thelia\Model\ImportQuery as ChildImportQuery;
|
||||||
use Thelia\Model\Map\ImportExportTypeI18nTableMap;
|
use Thelia\Model\Map\ImportI18nTableMap;
|
||||||
|
|
||||||
abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
abstract class ImportI18n implements ActiveRecordInterface
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* TableMap class name
|
* TableMap class name
|
||||||
*/
|
*/
|
||||||
const TABLE_MAP = '\\Thelia\\Model\\Map\\ImportExportTypeI18nTableMap';
|
const TABLE_MAP = '\\Thelia\\Model\\Map\\ImportI18nTableMap';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -79,9 +79,9 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
|||||||
protected $description;
|
protected $description;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var ImportExportType
|
* @var Import
|
||||||
*/
|
*/
|
||||||
protected $aImportExportType;
|
protected $aImport;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flag to prevent endless save loop, if this object is referenced
|
* Flag to prevent endless save loop, if this object is referenced
|
||||||
@@ -103,7 +103,7 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes internal state of Thelia\Model\Base\ImportExportTypeI18n object.
|
* Initializes internal state of Thelia\Model\Base\ImportI18n object.
|
||||||
* @see applyDefaults()
|
* @see applyDefaults()
|
||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
@@ -200,9 +200,9 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compares this with another <code>ImportExportTypeI18n</code> instance. If
|
* Compares this with another <code>ImportI18n</code> instance. If
|
||||||
* <code>obj</code> is an instance of <code>ImportExportTypeI18n</code>, delegates to
|
* <code>obj</code> is an instance of <code>ImportI18n</code>, delegates to
|
||||||
* <code>equals(ImportExportTypeI18n)</code>. Otherwise, returns <code>false</code>.
|
* <code>equals(ImportI18n)</code>. Otherwise, returns <code>false</code>.
|
||||||
*
|
*
|
||||||
* @param mixed $obj The object to compare to.
|
* @param mixed $obj The object to compare to.
|
||||||
* @return boolean Whether equal to the object specified.
|
* @return boolean Whether equal to the object specified.
|
||||||
@@ -285,7 +285,7 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
|||||||
* @param string $name The virtual column name
|
* @param string $name The virtual column name
|
||||||
* @param mixed $value The value to give to the virtual column
|
* @param mixed $value The value to give to the virtual column
|
||||||
*
|
*
|
||||||
* @return ImportExportTypeI18n The current object, for fluid interface
|
* @return ImportI18n The current object, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function setVirtualColumn($name, $value)
|
public function setVirtualColumn($name, $value)
|
||||||
{
|
{
|
||||||
@@ -317,7 +317,7 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
|||||||
* or a format name ('XML', 'YAML', 'JSON', 'CSV')
|
* or a format name ('XML', 'YAML', 'JSON', 'CSV')
|
||||||
* @param string $data The source data to import from
|
* @param string $data The source data to import from
|
||||||
*
|
*
|
||||||
* @return ImportExportTypeI18n The current object, for fluid interface
|
* @return ImportI18n The current object, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function importFrom($parser, $data)
|
public function importFrom($parser, $data)
|
||||||
{
|
{
|
||||||
@@ -410,7 +410,7 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
|||||||
* Set the value of [id] column.
|
* Set the value of [id] column.
|
||||||
*
|
*
|
||||||
* @param int $v new value
|
* @param int $v new value
|
||||||
* @return \Thelia\Model\ImportExportTypeI18n The current object (for fluent API support)
|
* @return \Thelia\Model\ImportI18n The current object (for fluent API support)
|
||||||
*/
|
*/
|
||||||
public function setId($v)
|
public function setId($v)
|
||||||
{
|
{
|
||||||
@@ -420,11 +420,11 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
|||||||
|
|
||||||
if ($this->id !== $v) {
|
if ($this->id !== $v) {
|
||||||
$this->id = $v;
|
$this->id = $v;
|
||||||
$this->modifiedColumns[ImportExportTypeI18nTableMap::ID] = true;
|
$this->modifiedColumns[ImportI18nTableMap::ID] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->aImportExportType !== null && $this->aImportExportType->getId() !== $v) {
|
if ($this->aImport !== null && $this->aImport->getId() !== $v) {
|
||||||
$this->aImportExportType = null;
|
$this->aImport = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -435,7 +435,7 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
|||||||
* Set the value of [locale] column.
|
* Set the value of [locale] column.
|
||||||
*
|
*
|
||||||
* @param string $v new value
|
* @param string $v new value
|
||||||
* @return \Thelia\Model\ImportExportTypeI18n The current object (for fluent API support)
|
* @return \Thelia\Model\ImportI18n The current object (for fluent API support)
|
||||||
*/
|
*/
|
||||||
public function setLocale($v)
|
public function setLocale($v)
|
||||||
{
|
{
|
||||||
@@ -445,7 +445,7 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
|||||||
|
|
||||||
if ($this->locale !== $v) {
|
if ($this->locale !== $v) {
|
||||||
$this->locale = $v;
|
$this->locale = $v;
|
||||||
$this->modifiedColumns[ImportExportTypeI18nTableMap::LOCALE] = true;
|
$this->modifiedColumns[ImportI18nTableMap::LOCALE] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -456,7 +456,7 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
|||||||
* Set the value of [title] column.
|
* Set the value of [title] column.
|
||||||
*
|
*
|
||||||
* @param string $v new value
|
* @param string $v new value
|
||||||
* @return \Thelia\Model\ImportExportTypeI18n The current object (for fluent API support)
|
* @return \Thelia\Model\ImportI18n The current object (for fluent API support)
|
||||||
*/
|
*/
|
||||||
public function setTitle($v)
|
public function setTitle($v)
|
||||||
{
|
{
|
||||||
@@ -466,7 +466,7 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
|||||||
|
|
||||||
if ($this->title !== $v) {
|
if ($this->title !== $v) {
|
||||||
$this->title = $v;
|
$this->title = $v;
|
||||||
$this->modifiedColumns[ImportExportTypeI18nTableMap::TITLE] = true;
|
$this->modifiedColumns[ImportI18nTableMap::TITLE] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -477,7 +477,7 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
|||||||
* Set the value of [description] column.
|
* Set the value of [description] column.
|
||||||
*
|
*
|
||||||
* @param string $v new value
|
* @param string $v new value
|
||||||
* @return \Thelia\Model\ImportExportTypeI18n The current object (for fluent API support)
|
* @return \Thelia\Model\ImportI18n The current object (for fluent API support)
|
||||||
*/
|
*/
|
||||||
public function setDescription($v)
|
public function setDescription($v)
|
||||||
{
|
{
|
||||||
@@ -487,7 +487,7 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
|||||||
|
|
||||||
if ($this->description !== $v) {
|
if ($this->description !== $v) {
|
||||||
$this->description = $v;
|
$this->description = $v;
|
||||||
$this->modifiedColumns[ImportExportTypeI18nTableMap::DESCRIPTION] = true;
|
$this->modifiedColumns[ImportI18nTableMap::DESCRIPTION] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -535,16 +535,16 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
|||||||
try {
|
try {
|
||||||
|
|
||||||
|
|
||||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : ImportExportTypeI18nTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
|
$col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : ImportI18nTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
|
||||||
$this->id = (null !== $col) ? (int) $col : null;
|
$this->id = (null !== $col) ? (int) $col : null;
|
||||||
|
|
||||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : ImportExportTypeI18nTableMap::translateFieldName('Locale', TableMap::TYPE_PHPNAME, $indexType)];
|
$col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : ImportI18nTableMap::translateFieldName('Locale', TableMap::TYPE_PHPNAME, $indexType)];
|
||||||
$this->locale = (null !== $col) ? (string) $col : null;
|
$this->locale = (null !== $col) ? (string) $col : null;
|
||||||
|
|
||||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : ImportExportTypeI18nTableMap::translateFieldName('Title', TableMap::TYPE_PHPNAME, $indexType)];
|
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : ImportI18nTableMap::translateFieldName('Title', TableMap::TYPE_PHPNAME, $indexType)];
|
||||||
$this->title = (null !== $col) ? (string) $col : null;
|
$this->title = (null !== $col) ? (string) $col : null;
|
||||||
|
|
||||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : ImportExportTypeI18nTableMap::translateFieldName('Description', TableMap::TYPE_PHPNAME, $indexType)];
|
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : ImportI18nTableMap::translateFieldName('Description', TableMap::TYPE_PHPNAME, $indexType)];
|
||||||
$this->description = (null !== $col) ? (string) $col : null;
|
$this->description = (null !== $col) ? (string) $col : null;
|
||||||
$this->resetModified();
|
$this->resetModified();
|
||||||
|
|
||||||
@@ -554,10 +554,10 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
|||||||
$this->ensureConsistency();
|
$this->ensureConsistency();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $startcol + 4; // 4 = ImportExportTypeI18nTableMap::NUM_HYDRATE_COLUMNS.
|
return $startcol + 4; // 4 = ImportI18nTableMap::NUM_HYDRATE_COLUMNS.
|
||||||
|
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
throw new PropelException("Error populating \Thelia\Model\ImportExportTypeI18n object", 0, $e);
|
throw new PropelException("Error populating \Thelia\Model\ImportI18n object", 0, $e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -576,8 +576,8 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
|||||||
*/
|
*/
|
||||||
public function ensureConsistency()
|
public function ensureConsistency()
|
||||||
{
|
{
|
||||||
if ($this->aImportExportType !== null && $this->id !== $this->aImportExportType->getId()) {
|
if ($this->aImport !== null && $this->id !== $this->aImport->getId()) {
|
||||||
$this->aImportExportType = null;
|
$this->aImport = null;
|
||||||
}
|
}
|
||||||
} // ensureConsistency
|
} // ensureConsistency
|
||||||
|
|
||||||
@@ -602,13 +602,13 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($con === null) {
|
if ($con === null) {
|
||||||
$con = Propel::getServiceContainer()->getReadConnection(ImportExportTypeI18nTableMap::DATABASE_NAME);
|
$con = Propel::getServiceContainer()->getReadConnection(ImportI18nTableMap::DATABASE_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
// We don't need to alter the object instance pool; we're just modifying this instance
|
// We don't need to alter the object instance pool; we're just modifying this instance
|
||||||
// already in the pool.
|
// already in the pool.
|
||||||
|
|
||||||
$dataFetcher = ChildImportExportTypeI18nQuery::create(null, $this->buildPkeyCriteria())->setFormatter(ModelCriteria::FORMAT_STATEMENT)->find($con);
|
$dataFetcher = ChildImportI18nQuery::create(null, $this->buildPkeyCriteria())->setFormatter(ModelCriteria::FORMAT_STATEMENT)->find($con);
|
||||||
$row = $dataFetcher->fetch();
|
$row = $dataFetcher->fetch();
|
||||||
$dataFetcher->close();
|
$dataFetcher->close();
|
||||||
if (!$row) {
|
if (!$row) {
|
||||||
@@ -618,7 +618,7 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
|||||||
|
|
||||||
if ($deep) { // also de-associate any related objects?
|
if ($deep) { // also de-associate any related objects?
|
||||||
|
|
||||||
$this->aImportExportType = null;
|
$this->aImport = null;
|
||||||
} // if (deep)
|
} // if (deep)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -628,8 +628,8 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
|||||||
* @param ConnectionInterface $con
|
* @param ConnectionInterface $con
|
||||||
* @return void
|
* @return void
|
||||||
* @throws PropelException
|
* @throws PropelException
|
||||||
* @see ImportExportTypeI18n::setDeleted()
|
* @see ImportI18n::setDeleted()
|
||||||
* @see ImportExportTypeI18n::isDeleted()
|
* @see ImportI18n::isDeleted()
|
||||||
*/
|
*/
|
||||||
public function delete(ConnectionInterface $con = null)
|
public function delete(ConnectionInterface $con = null)
|
||||||
{
|
{
|
||||||
@@ -638,12 +638,12 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($con === null) {
|
if ($con === null) {
|
||||||
$con = Propel::getServiceContainer()->getWriteConnection(ImportExportTypeI18nTableMap::DATABASE_NAME);
|
$con = Propel::getServiceContainer()->getWriteConnection(ImportI18nTableMap::DATABASE_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
$con->beginTransaction();
|
$con->beginTransaction();
|
||||||
try {
|
try {
|
||||||
$deleteQuery = ChildImportExportTypeI18nQuery::create()
|
$deleteQuery = ChildImportI18nQuery::create()
|
||||||
->filterByPrimaryKey($this->getPrimaryKey());
|
->filterByPrimaryKey($this->getPrimaryKey());
|
||||||
$ret = $this->preDelete($con);
|
$ret = $this->preDelete($con);
|
||||||
if ($ret) {
|
if ($ret) {
|
||||||
@@ -680,7 +680,7 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($con === null) {
|
if ($con === null) {
|
||||||
$con = Propel::getServiceContainer()->getWriteConnection(ImportExportTypeI18nTableMap::DATABASE_NAME);
|
$con = Propel::getServiceContainer()->getWriteConnection(ImportI18nTableMap::DATABASE_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
$con->beginTransaction();
|
$con->beginTransaction();
|
||||||
@@ -700,7 +700,7 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
|||||||
$this->postUpdate($con);
|
$this->postUpdate($con);
|
||||||
}
|
}
|
||||||
$this->postSave($con);
|
$this->postSave($con);
|
||||||
ImportExportTypeI18nTableMap::addInstanceToPool($this);
|
ImportI18nTableMap::addInstanceToPool($this);
|
||||||
} else {
|
} else {
|
||||||
$affectedRows = 0;
|
$affectedRows = 0;
|
||||||
}
|
}
|
||||||
@@ -735,11 +735,11 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
|||||||
// method. This object relates to these object(s) by a
|
// method. This object relates to these object(s) by a
|
||||||
// foreign key reference.
|
// foreign key reference.
|
||||||
|
|
||||||
if ($this->aImportExportType !== null) {
|
if ($this->aImport !== null) {
|
||||||
if ($this->aImportExportType->isModified() || $this->aImportExportType->isNew()) {
|
if ($this->aImport->isModified() || $this->aImport->isNew()) {
|
||||||
$affectedRows += $this->aImportExportType->save($con);
|
$affectedRows += $this->aImport->save($con);
|
||||||
}
|
}
|
||||||
$this->setImportExportType($this->aImportExportType);
|
$this->setImport($this->aImport);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->isNew() || $this->isModified()) {
|
if ($this->isNew() || $this->isModified()) {
|
||||||
@@ -775,21 +775,21 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
|||||||
|
|
||||||
|
|
||||||
// check the columns in natural order for more readable SQL queries
|
// check the columns in natural order for more readable SQL queries
|
||||||
if ($this->isColumnModified(ImportExportTypeI18nTableMap::ID)) {
|
if ($this->isColumnModified(ImportI18nTableMap::ID)) {
|
||||||
$modifiedColumns[':p' . $index++] = '`ID`';
|
$modifiedColumns[':p' . $index++] = '`ID`';
|
||||||
}
|
}
|
||||||
if ($this->isColumnModified(ImportExportTypeI18nTableMap::LOCALE)) {
|
if ($this->isColumnModified(ImportI18nTableMap::LOCALE)) {
|
||||||
$modifiedColumns[':p' . $index++] = '`LOCALE`';
|
$modifiedColumns[':p' . $index++] = '`LOCALE`';
|
||||||
}
|
}
|
||||||
if ($this->isColumnModified(ImportExportTypeI18nTableMap::TITLE)) {
|
if ($this->isColumnModified(ImportI18nTableMap::TITLE)) {
|
||||||
$modifiedColumns[':p' . $index++] = '`TITLE`';
|
$modifiedColumns[':p' . $index++] = '`TITLE`';
|
||||||
}
|
}
|
||||||
if ($this->isColumnModified(ImportExportTypeI18nTableMap::DESCRIPTION)) {
|
if ($this->isColumnModified(ImportI18nTableMap::DESCRIPTION)) {
|
||||||
$modifiedColumns[':p' . $index++] = '`DESCRIPTION`';
|
$modifiedColumns[':p' . $index++] = '`DESCRIPTION`';
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = sprintf(
|
$sql = sprintf(
|
||||||
'INSERT INTO `import_export_type_i18n` (%s) VALUES (%s)',
|
'INSERT INTO `import_i18n` (%s) VALUES (%s)',
|
||||||
implode(', ', $modifiedColumns),
|
implode(', ', $modifiedColumns),
|
||||||
implode(', ', array_keys($modifiedColumns))
|
implode(', ', array_keys($modifiedColumns))
|
||||||
);
|
);
|
||||||
@@ -849,7 +849,7 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
|||||||
*/
|
*/
|
||||||
public function getByName($name, $type = TableMap::TYPE_PHPNAME)
|
public function getByName($name, $type = TableMap::TYPE_PHPNAME)
|
||||||
{
|
{
|
||||||
$pos = ImportExportTypeI18nTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM);
|
$pos = ImportI18nTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM);
|
||||||
$field = $this->getByPosition($pos);
|
$field = $this->getByPosition($pos);
|
||||||
|
|
||||||
return $field;
|
return $field;
|
||||||
@@ -900,11 +900,11 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
|||||||
*/
|
*/
|
||||||
public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false)
|
public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false)
|
||||||
{
|
{
|
||||||
if (isset($alreadyDumpedObjects['ImportExportTypeI18n'][serialize($this->getPrimaryKey())])) {
|
if (isset($alreadyDumpedObjects['ImportI18n'][serialize($this->getPrimaryKey())])) {
|
||||||
return '*RECURSION*';
|
return '*RECURSION*';
|
||||||
}
|
}
|
||||||
$alreadyDumpedObjects['ImportExportTypeI18n'][serialize($this->getPrimaryKey())] = true;
|
$alreadyDumpedObjects['ImportI18n'][serialize($this->getPrimaryKey())] = true;
|
||||||
$keys = ImportExportTypeI18nTableMap::getFieldNames($keyType);
|
$keys = ImportI18nTableMap::getFieldNames($keyType);
|
||||||
$result = array(
|
$result = array(
|
||||||
$keys[0] => $this->getId(),
|
$keys[0] => $this->getId(),
|
||||||
$keys[1] => $this->getLocale(),
|
$keys[1] => $this->getLocale(),
|
||||||
@@ -917,8 +917,8 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($includeForeignObjects) {
|
if ($includeForeignObjects) {
|
||||||
if (null !== $this->aImportExportType) {
|
if (null !== $this->aImport) {
|
||||||
$result['ImportExportType'] = $this->aImportExportType->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
|
$result['Import'] = $this->aImport->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -938,7 +938,7 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
|||||||
*/
|
*/
|
||||||
public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME)
|
public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME)
|
||||||
{
|
{
|
||||||
$pos = ImportExportTypeI18nTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM);
|
$pos = ImportI18nTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM);
|
||||||
|
|
||||||
return $this->setByPosition($pos, $value);
|
return $this->setByPosition($pos, $value);
|
||||||
}
|
}
|
||||||
@@ -988,7 +988,7 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
|||||||
*/
|
*/
|
||||||
public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME)
|
public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME)
|
||||||
{
|
{
|
||||||
$keys = ImportExportTypeI18nTableMap::getFieldNames($keyType);
|
$keys = ImportI18nTableMap::getFieldNames($keyType);
|
||||||
|
|
||||||
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->setLocale($arr[$keys[1]]);
|
if (array_key_exists($keys[1], $arr)) $this->setLocale($arr[$keys[1]]);
|
||||||
@@ -1003,12 +1003,12 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
|||||||
*/
|
*/
|
||||||
public function buildCriteria()
|
public function buildCriteria()
|
||||||
{
|
{
|
||||||
$criteria = new Criteria(ImportExportTypeI18nTableMap::DATABASE_NAME);
|
$criteria = new Criteria(ImportI18nTableMap::DATABASE_NAME);
|
||||||
|
|
||||||
if ($this->isColumnModified(ImportExportTypeI18nTableMap::ID)) $criteria->add(ImportExportTypeI18nTableMap::ID, $this->id);
|
if ($this->isColumnModified(ImportI18nTableMap::ID)) $criteria->add(ImportI18nTableMap::ID, $this->id);
|
||||||
if ($this->isColumnModified(ImportExportTypeI18nTableMap::LOCALE)) $criteria->add(ImportExportTypeI18nTableMap::LOCALE, $this->locale);
|
if ($this->isColumnModified(ImportI18nTableMap::LOCALE)) $criteria->add(ImportI18nTableMap::LOCALE, $this->locale);
|
||||||
if ($this->isColumnModified(ImportExportTypeI18nTableMap::TITLE)) $criteria->add(ImportExportTypeI18nTableMap::TITLE, $this->title);
|
if ($this->isColumnModified(ImportI18nTableMap::TITLE)) $criteria->add(ImportI18nTableMap::TITLE, $this->title);
|
||||||
if ($this->isColumnModified(ImportExportTypeI18nTableMap::DESCRIPTION)) $criteria->add(ImportExportTypeI18nTableMap::DESCRIPTION, $this->description);
|
if ($this->isColumnModified(ImportI18nTableMap::DESCRIPTION)) $criteria->add(ImportI18nTableMap::DESCRIPTION, $this->description);
|
||||||
|
|
||||||
return $criteria;
|
return $criteria;
|
||||||
}
|
}
|
||||||
@@ -1023,9 +1023,9 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
|||||||
*/
|
*/
|
||||||
public function buildPkeyCriteria()
|
public function buildPkeyCriteria()
|
||||||
{
|
{
|
||||||
$criteria = new Criteria(ImportExportTypeI18nTableMap::DATABASE_NAME);
|
$criteria = new Criteria(ImportI18nTableMap::DATABASE_NAME);
|
||||||
$criteria->add(ImportExportTypeI18nTableMap::ID, $this->id);
|
$criteria->add(ImportI18nTableMap::ID, $this->id);
|
||||||
$criteria->add(ImportExportTypeI18nTableMap::LOCALE, $this->locale);
|
$criteria->add(ImportI18nTableMap::LOCALE, $this->locale);
|
||||||
|
|
||||||
return $criteria;
|
return $criteria;
|
||||||
}
|
}
|
||||||
@@ -1072,7 +1072,7 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
|||||||
* If desired, this method can also make copies of all associated (fkey referrers)
|
* If desired, this method can also make copies of all associated (fkey referrers)
|
||||||
* objects.
|
* objects.
|
||||||
*
|
*
|
||||||
* @param object $copyObj An object of \Thelia\Model\ImportExportTypeI18n (or compatible) type.
|
* @param object $copyObj An object of \Thelia\Model\ImportI18n (or compatible) type.
|
||||||
* @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
|
* @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
|
||||||
* @param boolean $makeNew Whether to reset autoincrement PKs and make the object new.
|
* @param boolean $makeNew Whether to reset autoincrement PKs and make the object new.
|
||||||
* @throws PropelException
|
* @throws PropelException
|
||||||
@@ -1097,7 +1097,7 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
|||||||
* objects.
|
* objects.
|
||||||
*
|
*
|
||||||
* @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
|
* @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
|
||||||
* @return \Thelia\Model\ImportExportTypeI18n Clone of current object.
|
* @return \Thelia\Model\ImportI18n Clone of current object.
|
||||||
* @throws PropelException
|
* @throws PropelException
|
||||||
*/
|
*/
|
||||||
public function copy($deepCopy = false)
|
public function copy($deepCopy = false)
|
||||||
@@ -1111,13 +1111,13 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Declares an association between this object and a ChildImportExportType object.
|
* Declares an association between this object and a ChildImport object.
|
||||||
*
|
*
|
||||||
* @param ChildImportExportType $v
|
* @param ChildImport $v
|
||||||
* @return \Thelia\Model\ImportExportTypeI18n The current object (for fluent API support)
|
* @return \Thelia\Model\ImportI18n The current object (for fluent API support)
|
||||||
* @throws PropelException
|
* @throws PropelException
|
||||||
*/
|
*/
|
||||||
public function setImportExportType(ChildImportExportType $v = null)
|
public function setImport(ChildImport $v = null)
|
||||||
{
|
{
|
||||||
if ($v === null) {
|
if ($v === null) {
|
||||||
$this->setId(NULL);
|
$this->setId(NULL);
|
||||||
@@ -1125,12 +1125,12 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
|||||||
$this->setId($v->getId());
|
$this->setId($v->getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->aImportExportType = $v;
|
$this->aImport = $v;
|
||||||
|
|
||||||
// Add binding for other direction of this n:n relationship.
|
// Add binding for other direction of this n:n relationship.
|
||||||
// If this object has already been added to the ChildImportExportType object, it will not be re-added.
|
// If this object has already been added to the ChildImport object, it will not be re-added.
|
||||||
if ($v !== null) {
|
if ($v !== null) {
|
||||||
$v->addImportExportTypeI18n($this);
|
$v->addImportI18n($this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1139,26 +1139,26 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the associated ChildImportExportType object
|
* Get the associated ChildImport object
|
||||||
*
|
*
|
||||||
* @param ConnectionInterface $con Optional Connection object.
|
* @param ConnectionInterface $con Optional Connection object.
|
||||||
* @return ChildImportExportType The associated ChildImportExportType object.
|
* @return ChildImport The associated ChildImport object.
|
||||||
* @throws PropelException
|
* @throws PropelException
|
||||||
*/
|
*/
|
||||||
public function getImportExportType(ConnectionInterface $con = null)
|
public function getImport(ConnectionInterface $con = null)
|
||||||
{
|
{
|
||||||
if ($this->aImportExportType === null && ($this->id !== null)) {
|
if ($this->aImport === null && ($this->id !== null)) {
|
||||||
$this->aImportExportType = ChildImportExportTypeQuery::create()->findPk($this->id, $con);
|
$this->aImport = ChildImportQuery::create()->findPk($this->id, $con);
|
||||||
/* The following can be used additionally to
|
/* The following can be used additionally to
|
||||||
guarantee the related object contains a reference
|
guarantee the related object contains a reference
|
||||||
to this object. This level of coupling may, however, be
|
to this object. This level of coupling may, however, be
|
||||||
undesirable since it could result in an only partially populated collection
|
undesirable since it could result in an only partially populated collection
|
||||||
in the referenced object.
|
in the referenced object.
|
||||||
$this->aImportExportType->addImportExportTypeI18ns($this);
|
$this->aImport->addImportI18ns($this);
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->aImportExportType;
|
return $this->aImport;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1192,7 +1192,7 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
|||||||
if ($deep) {
|
if ($deep) {
|
||||||
} // if ($deep)
|
} // if ($deep)
|
||||||
|
|
||||||
$this->aImportExportType = null;
|
$this->aImport = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1202,7 +1202,7 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
|||||||
*/
|
*/
|
||||||
public function __toString()
|
public function __toString()
|
||||||
{
|
{
|
||||||
return (string) $this->exportTo(ImportExportTypeI18nTableMap::DEFAULT_STRING_FORMAT);
|
return (string) $this->exportTo(ImportI18nTableMap::DEFAULT_STRING_FORMAT);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -12,76 +12,76 @@ use Propel\Runtime\Collection\Collection;
|
|||||||
use Propel\Runtime\Collection\ObjectCollection;
|
use Propel\Runtime\Collection\ObjectCollection;
|
||||||
use Propel\Runtime\Connection\ConnectionInterface;
|
use Propel\Runtime\Connection\ConnectionInterface;
|
||||||
use Propel\Runtime\Exception\PropelException;
|
use Propel\Runtime\Exception\PropelException;
|
||||||
use Thelia\Model\ImportExportTypeI18n as ChildImportExportTypeI18n;
|
use Thelia\Model\ImportI18n as ChildImportI18n;
|
||||||
use Thelia\Model\ImportExportTypeI18nQuery as ChildImportExportTypeI18nQuery;
|
use Thelia\Model\ImportI18nQuery as ChildImportI18nQuery;
|
||||||
use Thelia\Model\Map\ImportExportTypeI18nTableMap;
|
use Thelia\Model\Map\ImportI18nTableMap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base class that represents a query for the 'import_export_type_i18n' table.
|
* Base class that represents a query for the 'import_i18n' table.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @method ChildImportExportTypeI18nQuery orderById($order = Criteria::ASC) Order by the id column
|
* @method ChildImportI18nQuery orderById($order = Criteria::ASC) Order by the id column
|
||||||
* @method ChildImportExportTypeI18nQuery orderByLocale($order = Criteria::ASC) Order by the locale column
|
* @method ChildImportI18nQuery orderByLocale($order = Criteria::ASC) Order by the locale column
|
||||||
* @method ChildImportExportTypeI18nQuery orderByTitle($order = Criteria::ASC) Order by the title column
|
* @method ChildImportI18nQuery orderByTitle($order = Criteria::ASC) Order by the title column
|
||||||
* @method ChildImportExportTypeI18nQuery orderByDescription($order = Criteria::ASC) Order by the description column
|
* @method ChildImportI18nQuery orderByDescription($order = Criteria::ASC) Order by the description column
|
||||||
*
|
*
|
||||||
* @method ChildImportExportTypeI18nQuery groupById() Group by the id column
|
* @method ChildImportI18nQuery groupById() Group by the id column
|
||||||
* @method ChildImportExportTypeI18nQuery groupByLocale() Group by the locale column
|
* @method ChildImportI18nQuery groupByLocale() Group by the locale column
|
||||||
* @method ChildImportExportTypeI18nQuery groupByTitle() Group by the title column
|
* @method ChildImportI18nQuery groupByTitle() Group by the title column
|
||||||
* @method ChildImportExportTypeI18nQuery groupByDescription() Group by the description column
|
* @method ChildImportI18nQuery groupByDescription() Group by the description column
|
||||||
*
|
*
|
||||||
* @method ChildImportExportTypeI18nQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
|
* @method ChildImportI18nQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
|
||||||
* @method ChildImportExportTypeI18nQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
* @method ChildImportI18nQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
||||||
* @method ChildImportExportTypeI18nQuery innerJoin($relation) Adds a INNER JOIN clause to the query
|
* @method ChildImportI18nQuery innerJoin($relation) Adds a INNER JOIN clause to the query
|
||||||
*
|
*
|
||||||
* @method ChildImportExportTypeI18nQuery leftJoinImportExportType($relationAlias = null) Adds a LEFT JOIN clause to the query using the ImportExportType relation
|
* @method ChildImportI18nQuery leftJoinImport($relationAlias = null) Adds a LEFT JOIN clause to the query using the Import relation
|
||||||
* @method ChildImportExportTypeI18nQuery rightJoinImportExportType($relationAlias = null) Adds a RIGHT JOIN clause to the query using the ImportExportType relation
|
* @method ChildImportI18nQuery rightJoinImport($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Import relation
|
||||||
* @method ChildImportExportTypeI18nQuery innerJoinImportExportType($relationAlias = null) Adds a INNER JOIN clause to the query using the ImportExportType relation
|
* @method ChildImportI18nQuery innerJoinImport($relationAlias = null) Adds a INNER JOIN clause to the query using the Import relation
|
||||||
*
|
*
|
||||||
* @method ChildImportExportTypeI18n findOne(ConnectionInterface $con = null) Return the first ChildImportExportTypeI18n matching the query
|
* @method ChildImportI18n findOne(ConnectionInterface $con = null) Return the first ChildImportI18n matching the query
|
||||||
* @method ChildImportExportTypeI18n findOneOrCreate(ConnectionInterface $con = null) Return the first ChildImportExportTypeI18n matching the query, or a new ChildImportExportTypeI18n object populated from the query conditions when no match is found
|
* @method ChildImportI18n findOneOrCreate(ConnectionInterface $con = null) Return the first ChildImportI18n matching the query, or a new ChildImportI18n object populated from the query conditions when no match is found
|
||||||
*
|
*
|
||||||
* @method ChildImportExportTypeI18n findOneById(int $id) Return the first ChildImportExportTypeI18n filtered by the id column
|
* @method ChildImportI18n findOneById(int $id) Return the first ChildImportI18n filtered by the id column
|
||||||
* @method ChildImportExportTypeI18n findOneByLocale(string $locale) Return the first ChildImportExportTypeI18n filtered by the locale column
|
* @method ChildImportI18n findOneByLocale(string $locale) Return the first ChildImportI18n filtered by the locale column
|
||||||
* @method ChildImportExportTypeI18n findOneByTitle(string $title) Return the first ChildImportExportTypeI18n filtered by the title column
|
* @method ChildImportI18n findOneByTitle(string $title) Return the first ChildImportI18n filtered by the title column
|
||||||
* @method ChildImportExportTypeI18n findOneByDescription(string $description) Return the first ChildImportExportTypeI18n filtered by the description column
|
* @method ChildImportI18n findOneByDescription(string $description) Return the first ChildImportI18n filtered by the description column
|
||||||
*
|
*
|
||||||
* @method array findById(int $id) Return ChildImportExportTypeI18n objects filtered by the id column
|
* @method array findById(int $id) Return ChildImportI18n objects filtered by the id column
|
||||||
* @method array findByLocale(string $locale) Return ChildImportExportTypeI18n objects filtered by the locale column
|
* @method array findByLocale(string $locale) Return ChildImportI18n objects filtered by the locale column
|
||||||
* @method array findByTitle(string $title) Return ChildImportExportTypeI18n objects filtered by the title column
|
* @method array findByTitle(string $title) Return ChildImportI18n objects filtered by the title column
|
||||||
* @method array findByDescription(string $description) Return ChildImportExportTypeI18n objects filtered by the description column
|
* @method array findByDescription(string $description) Return ChildImportI18n objects filtered by the description column
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
abstract class ImportI18nQuery extends ModelCriteria
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes internal state of \Thelia\Model\Base\ImportExportTypeI18nQuery object.
|
* Initializes internal state of \Thelia\Model\Base\ImportI18nQuery object.
|
||||||
*
|
*
|
||||||
* @param string $dbName The database name
|
* @param string $dbName The database name
|
||||||
* @param string $modelName The phpName of a model, e.g. 'Book'
|
* @param string $modelName The phpName of a model, e.g. 'Book'
|
||||||
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
|
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
|
||||||
*/
|
*/
|
||||||
public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\ImportExportTypeI18n', $modelAlias = null)
|
public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\ImportI18n', $modelAlias = null)
|
||||||
{
|
{
|
||||||
parent::__construct($dbName, $modelName, $modelAlias);
|
parent::__construct($dbName, $modelName, $modelAlias);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a new ChildImportExportTypeI18nQuery object.
|
* Returns a new ChildImportI18nQuery object.
|
||||||
*
|
*
|
||||||
* @param string $modelAlias The alias of a model in the query
|
* @param string $modelAlias The alias of a model in the query
|
||||||
* @param Criteria $criteria Optional Criteria to build the query from
|
* @param Criteria $criteria Optional Criteria to build the query from
|
||||||
*
|
*
|
||||||
* @return ChildImportExportTypeI18nQuery
|
* @return ChildImportI18nQuery
|
||||||
*/
|
*/
|
||||||
public static function create($modelAlias = null, $criteria = null)
|
public static function create($modelAlias = null, $criteria = null)
|
||||||
{
|
{
|
||||||
if ($criteria instanceof \Thelia\Model\ImportExportTypeI18nQuery) {
|
if ($criteria instanceof \Thelia\Model\ImportI18nQuery) {
|
||||||
return $criteria;
|
return $criteria;
|
||||||
}
|
}
|
||||||
$query = new \Thelia\Model\ImportExportTypeI18nQuery();
|
$query = new \Thelia\Model\ImportI18nQuery();
|
||||||
if (null !== $modelAlias) {
|
if (null !== $modelAlias) {
|
||||||
$query->setModelAlias($modelAlias);
|
$query->setModelAlias($modelAlias);
|
||||||
}
|
}
|
||||||
@@ -104,19 +104,19 @@ abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
|||||||
* @param array[$id, $locale] $key Primary key to use for the query
|
* @param array[$id, $locale] $key Primary key to use for the query
|
||||||
* @param ConnectionInterface $con an optional connection object
|
* @param ConnectionInterface $con an optional connection object
|
||||||
*
|
*
|
||||||
* @return ChildImportExportTypeI18n|array|mixed the result, formatted by the current formatter
|
* @return ChildImportI18n|array|mixed the result, formatted by the current formatter
|
||||||
*/
|
*/
|
||||||
public function findPk($key, $con = null)
|
public function findPk($key, $con = null)
|
||||||
{
|
{
|
||||||
if ($key === null) {
|
if ($key === null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if ((null !== ($obj = ImportExportTypeI18nTableMap::getInstanceFromPool(serialize(array((string) $key[0], (string) $key[1]))))) && !$this->formatter) {
|
if ((null !== ($obj = ImportI18nTableMap::getInstanceFromPool(serialize(array((string) $key[0], (string) $key[1]))))) && !$this->formatter) {
|
||||||
// the object is already in the instance pool
|
// the object is already in the instance pool
|
||||||
return $obj;
|
return $obj;
|
||||||
}
|
}
|
||||||
if ($con === null) {
|
if ($con === null) {
|
||||||
$con = Propel::getServiceContainer()->getReadConnection(ImportExportTypeI18nTableMap::DATABASE_NAME);
|
$con = Propel::getServiceContainer()->getReadConnection(ImportI18nTableMap::DATABASE_NAME);
|
||||||
}
|
}
|
||||||
$this->basePreSelect($con);
|
$this->basePreSelect($con);
|
||||||
if ($this->formatter || $this->modelAlias || $this->with || $this->select
|
if ($this->formatter || $this->modelAlias || $this->with || $this->select
|
||||||
@@ -135,11 +135,11 @@ abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
|||||||
* @param mixed $key Primary key to use for the query
|
* @param mixed $key Primary key to use for the query
|
||||||
* @param ConnectionInterface $con A connection object
|
* @param ConnectionInterface $con A connection object
|
||||||
*
|
*
|
||||||
* @return ChildImportExportTypeI18n A model object, or null if the key is not found
|
* @return ChildImportI18n A model object, or null if the key is not found
|
||||||
*/
|
*/
|
||||||
protected function findPkSimple($key, $con)
|
protected function findPkSimple($key, $con)
|
||||||
{
|
{
|
||||||
$sql = 'SELECT `ID`, `LOCALE`, `TITLE`, `DESCRIPTION` FROM `import_export_type_i18n` WHERE `ID` = :p0 AND `LOCALE` = :p1';
|
$sql = 'SELECT `ID`, `LOCALE`, `TITLE`, `DESCRIPTION` FROM `import_i18n` WHERE `ID` = :p0 AND `LOCALE` = :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);
|
||||||
@@ -151,9 +151,9 @@ abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
|||||||
}
|
}
|
||||||
$obj = null;
|
$obj = null;
|
||||||
if ($row = $stmt->fetch(\PDO::FETCH_NUM)) {
|
if ($row = $stmt->fetch(\PDO::FETCH_NUM)) {
|
||||||
$obj = new ChildImportExportTypeI18n();
|
$obj = new ChildImportI18n();
|
||||||
$obj->hydrate($row);
|
$obj->hydrate($row);
|
||||||
ImportExportTypeI18nTableMap::addInstanceToPool($obj, serialize(array((string) $key[0], (string) $key[1])));
|
ImportI18nTableMap::addInstanceToPool($obj, serialize(array((string) $key[0], (string) $key[1])));
|
||||||
}
|
}
|
||||||
$stmt->closeCursor();
|
$stmt->closeCursor();
|
||||||
|
|
||||||
@@ -166,7 +166,7 @@ abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
|||||||
* @param mixed $key Primary key to use for the query
|
* @param mixed $key Primary key to use for the query
|
||||||
* @param ConnectionInterface $con A connection object
|
* @param ConnectionInterface $con A connection object
|
||||||
*
|
*
|
||||||
* @return ChildImportExportTypeI18n|array|mixed the result, formatted by the current formatter
|
* @return ChildImportI18n|array|mixed the result, formatted by the current formatter
|
||||||
*/
|
*/
|
||||||
protected function findPkComplex($key, $con)
|
protected function findPkComplex($key, $con)
|
||||||
{
|
{
|
||||||
@@ -208,12 +208,12 @@ abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
|||||||
*
|
*
|
||||||
* @param mixed $key Primary key to use for the query
|
* @param mixed $key Primary key to use for the query
|
||||||
*
|
*
|
||||||
* @return ChildImportExportTypeI18nQuery The current query, for fluid interface
|
* @return ChildImportI18nQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function filterByPrimaryKey($key)
|
public function filterByPrimaryKey($key)
|
||||||
{
|
{
|
||||||
$this->addUsingAlias(ImportExportTypeI18nTableMap::ID, $key[0], Criteria::EQUAL);
|
$this->addUsingAlias(ImportI18nTableMap::ID, $key[0], Criteria::EQUAL);
|
||||||
$this->addUsingAlias(ImportExportTypeI18nTableMap::LOCALE, $key[1], Criteria::EQUAL);
|
$this->addUsingAlias(ImportI18nTableMap::LOCALE, $key[1], Criteria::EQUAL);
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
@@ -223,7 +223,7 @@ abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
|||||||
*
|
*
|
||||||
* @param array $keys The list of primary key to use for the query
|
* @param array $keys The list of primary key to use for the query
|
||||||
*
|
*
|
||||||
* @return ChildImportExportTypeI18nQuery The current query, for fluid interface
|
* @return ChildImportI18nQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function filterByPrimaryKeys($keys)
|
public function filterByPrimaryKeys($keys)
|
||||||
{
|
{
|
||||||
@@ -231,8 +231,8 @@ abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
|||||||
return $this->add(null, '1<>1', Criteria::CUSTOM);
|
return $this->add(null, '1<>1', Criteria::CUSTOM);
|
||||||
}
|
}
|
||||||
foreach ($keys as $key) {
|
foreach ($keys as $key) {
|
||||||
$cton0 = $this->getNewCriterion(ImportExportTypeI18nTableMap::ID, $key[0], Criteria::EQUAL);
|
$cton0 = $this->getNewCriterion(ImportI18nTableMap::ID, $key[0], Criteria::EQUAL);
|
||||||
$cton1 = $this->getNewCriterion(ImportExportTypeI18nTableMap::LOCALE, $key[1], Criteria::EQUAL);
|
$cton1 = $this->getNewCriterion(ImportI18nTableMap::LOCALE, $key[1], Criteria::EQUAL);
|
||||||
$cton0->addAnd($cton1);
|
$cton0->addAnd($cton1);
|
||||||
$this->addOr($cton0);
|
$this->addOr($cton0);
|
||||||
}
|
}
|
||||||
@@ -250,7 +250,7 @@ abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
|||||||
* $query->filterById(array('min' => 12)); // WHERE id > 12
|
* $query->filterById(array('min' => 12)); // WHERE id > 12
|
||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
* @see filterByImportExportType()
|
* @see filterByImport()
|
||||||
*
|
*
|
||||||
* @param mixed $id The value to use as filter.
|
* @param mixed $id The value to use as filter.
|
||||||
* Use scalar values for equality.
|
* Use scalar values for equality.
|
||||||
@@ -258,18 +258,18 @@ abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
|||||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
*
|
*
|
||||||
* @return ChildImportExportTypeI18nQuery The current query, for fluid interface
|
* @return ChildImportI18nQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function filterById($id = null, $comparison = null)
|
public function filterById($id = null, $comparison = null)
|
||||||
{
|
{
|
||||||
if (is_array($id)) {
|
if (is_array($id)) {
|
||||||
$useMinMax = false;
|
$useMinMax = false;
|
||||||
if (isset($id['min'])) {
|
if (isset($id['min'])) {
|
||||||
$this->addUsingAlias(ImportExportTypeI18nTableMap::ID, $id['min'], Criteria::GREATER_EQUAL);
|
$this->addUsingAlias(ImportI18nTableMap::ID, $id['min'], Criteria::GREATER_EQUAL);
|
||||||
$useMinMax = true;
|
$useMinMax = true;
|
||||||
}
|
}
|
||||||
if (isset($id['max'])) {
|
if (isset($id['max'])) {
|
||||||
$this->addUsingAlias(ImportExportTypeI18nTableMap::ID, $id['max'], Criteria::LESS_EQUAL);
|
$this->addUsingAlias(ImportI18nTableMap::ID, $id['max'], Criteria::LESS_EQUAL);
|
||||||
$useMinMax = true;
|
$useMinMax = true;
|
||||||
}
|
}
|
||||||
if ($useMinMax) {
|
if ($useMinMax) {
|
||||||
@@ -280,7 +280,7 @@ abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->addUsingAlias(ImportExportTypeI18nTableMap::ID, $id, $comparison);
|
return $this->addUsingAlias(ImportI18nTableMap::ID, $id, $comparison);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -296,7 +296,7 @@ abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
|||||||
* Accepts wildcards (* and % trigger a LIKE)
|
* Accepts wildcards (* and % trigger a LIKE)
|
||||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
*
|
*
|
||||||
* @return ChildImportExportTypeI18nQuery The current query, for fluid interface
|
* @return ChildImportI18nQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function filterByLocale($locale = null, $comparison = null)
|
public function filterByLocale($locale = null, $comparison = null)
|
||||||
{
|
{
|
||||||
@@ -309,7 +309,7 @@ abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->addUsingAlias(ImportExportTypeI18nTableMap::LOCALE, $locale, $comparison);
|
return $this->addUsingAlias(ImportI18nTableMap::LOCALE, $locale, $comparison);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -325,7 +325,7 @@ abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
|||||||
* Accepts wildcards (* and % trigger a LIKE)
|
* Accepts wildcards (* and % trigger a LIKE)
|
||||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
*
|
*
|
||||||
* @return ChildImportExportTypeI18nQuery The current query, for fluid interface
|
* @return ChildImportI18nQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function filterByTitle($title = null, $comparison = null)
|
public function filterByTitle($title = null, $comparison = null)
|
||||||
{
|
{
|
||||||
@@ -338,7 +338,7 @@ abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->addUsingAlias(ImportExportTypeI18nTableMap::TITLE, $title, $comparison);
|
return $this->addUsingAlias(ImportI18nTableMap::TITLE, $title, $comparison);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -354,7 +354,7 @@ abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
|||||||
* Accepts wildcards (* and % trigger a LIKE)
|
* Accepts wildcards (* and % trigger a LIKE)
|
||||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
*
|
*
|
||||||
* @return ChildImportExportTypeI18nQuery The current query, for fluid interface
|
* @return ChildImportI18nQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function filterByDescription($description = null, $comparison = null)
|
public function filterByDescription($description = null, $comparison = null)
|
||||||
{
|
{
|
||||||
@@ -367,46 +367,46 @@ abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->addUsingAlias(ImportExportTypeI18nTableMap::DESCRIPTION, $description, $comparison);
|
return $this->addUsingAlias(ImportI18nTableMap::DESCRIPTION, $description, $comparison);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the query by a related \Thelia\Model\ImportExportType object
|
* Filter the query by a related \Thelia\Model\Import object
|
||||||
*
|
*
|
||||||
* @param \Thelia\Model\ImportExportType|ObjectCollection $importExportType The related object(s) to use as filter
|
* @param \Thelia\Model\Import|ObjectCollection $import The related object(s) to use as filter
|
||||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
*
|
*
|
||||||
* @return ChildImportExportTypeI18nQuery The current query, for fluid interface
|
* @return ChildImportI18nQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function filterByImportExportType($importExportType, $comparison = null)
|
public function filterByImport($import, $comparison = null)
|
||||||
{
|
{
|
||||||
if ($importExportType instanceof \Thelia\Model\ImportExportType) {
|
if ($import instanceof \Thelia\Model\Import) {
|
||||||
return $this
|
return $this
|
||||||
->addUsingAlias(ImportExportTypeI18nTableMap::ID, $importExportType->getId(), $comparison);
|
->addUsingAlias(ImportI18nTableMap::ID, $import->getId(), $comparison);
|
||||||
} elseif ($importExportType instanceof ObjectCollection) {
|
} elseif ($import instanceof ObjectCollection) {
|
||||||
if (null === $comparison) {
|
if (null === $comparison) {
|
||||||
$comparison = Criteria::IN;
|
$comparison = Criteria::IN;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this
|
return $this
|
||||||
->addUsingAlias(ImportExportTypeI18nTableMap::ID, $importExportType->toKeyValue('PrimaryKey', 'Id'), $comparison);
|
->addUsingAlias(ImportI18nTableMap::ID, $import->toKeyValue('PrimaryKey', 'Id'), $comparison);
|
||||||
} else {
|
} else {
|
||||||
throw new PropelException('filterByImportExportType() only accepts arguments of type \Thelia\Model\ImportExportType or Collection');
|
throw new PropelException('filterByImport() only accepts arguments of type \Thelia\Model\Import or Collection');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a JOIN clause to the query using the ImportExportType relation
|
* Adds a JOIN clause to the query using the Import relation
|
||||||
*
|
*
|
||||||
* @param string $relationAlias optional alias for the relation
|
* @param string $relationAlias optional alias for the relation
|
||||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||||
*
|
*
|
||||||
* @return ChildImportExportTypeI18nQuery The current query, for fluid interface
|
* @return ChildImportI18nQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function joinImportExportType($relationAlias = null, $joinType = 'LEFT JOIN')
|
public function joinImport($relationAlias = null, $joinType = 'LEFT JOIN')
|
||||||
{
|
{
|
||||||
$tableMap = $this->getTableMap();
|
$tableMap = $this->getTableMap();
|
||||||
$relationMap = $tableMap->getRelation('ImportExportType');
|
$relationMap = $tableMap->getRelation('Import');
|
||||||
|
|
||||||
// create a ModelJoin object for this join
|
// create a ModelJoin object for this join
|
||||||
$join = new ModelJoin();
|
$join = new ModelJoin();
|
||||||
@@ -421,14 +421,14 @@ abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
|||||||
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||||
$this->addJoinObject($join, $relationAlias);
|
$this->addJoinObject($join, $relationAlias);
|
||||||
} else {
|
} else {
|
||||||
$this->addJoinObject($join, 'ImportExportType');
|
$this->addJoinObject($join, 'Import');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Use the ImportExportType relation ImportExportType object
|
* Use the Import relation Import object
|
||||||
*
|
*
|
||||||
* @see useQuery()
|
* @see useQuery()
|
||||||
*
|
*
|
||||||
@@ -436,27 +436,27 @@ abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
|||||||
* to be used as main alias in the secondary query
|
* to be used as main alias in the secondary query
|
||||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||||
*
|
*
|
||||||
* @return \Thelia\Model\ImportExportTypeQuery A secondary query class using the current class as primary query
|
* @return \Thelia\Model\ImportQuery A secondary query class using the current class as primary query
|
||||||
*/
|
*/
|
||||||
public function useImportExportTypeQuery($relationAlias = null, $joinType = 'LEFT JOIN')
|
public function useImportQuery($relationAlias = null, $joinType = 'LEFT JOIN')
|
||||||
{
|
{
|
||||||
return $this
|
return $this
|
||||||
->joinImportExportType($relationAlias, $joinType)
|
->joinImport($relationAlias, $joinType)
|
||||||
->useQuery($relationAlias ? $relationAlias : 'ImportExportType', '\Thelia\Model\ImportExportTypeQuery');
|
->useQuery($relationAlias ? $relationAlias : 'Import', '\Thelia\Model\ImportQuery');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Exclude object from result
|
* Exclude object from result
|
||||||
*
|
*
|
||||||
* @param ChildImportExportTypeI18n $importExportTypeI18n Object to remove from the list of results
|
* @param ChildImportI18n $importI18n Object to remove from the list of results
|
||||||
*
|
*
|
||||||
* @return ChildImportExportTypeI18nQuery The current query, for fluid interface
|
* @return ChildImportI18nQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function prune($importExportTypeI18n = null)
|
public function prune($importI18n = null)
|
||||||
{
|
{
|
||||||
if ($importExportTypeI18n) {
|
if ($importI18n) {
|
||||||
$this->addCond('pruneCond0', $this->getAliasedColName(ImportExportTypeI18nTableMap::ID), $importExportTypeI18n->getId(), Criteria::NOT_EQUAL);
|
$this->addCond('pruneCond0', $this->getAliasedColName(ImportI18nTableMap::ID), $importI18n->getId(), Criteria::NOT_EQUAL);
|
||||||
$this->addCond('pruneCond1', $this->getAliasedColName(ImportExportTypeI18nTableMap::LOCALE), $importExportTypeI18n->getLocale(), Criteria::NOT_EQUAL);
|
$this->addCond('pruneCond1', $this->getAliasedColName(ImportI18nTableMap::LOCALE), $importI18n->getLocale(), Criteria::NOT_EQUAL);
|
||||||
$this->combine(array('pruneCond0', 'pruneCond1'), Criteria::LOGICAL_OR);
|
$this->combine(array('pruneCond0', 'pruneCond1'), Criteria::LOGICAL_OR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -464,7 +464,7 @@ abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deletes all rows from the import_export_type_i18n table.
|
* Deletes all rows from the import_i18n table.
|
||||||
*
|
*
|
||||||
* @param ConnectionInterface $con the connection to use
|
* @param ConnectionInterface $con the connection to use
|
||||||
* @return int The number of affected rows (if supported by underlying database driver).
|
* @return int The number of affected rows (if supported by underlying database driver).
|
||||||
@@ -472,7 +472,7 @@ abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
|||||||
public function doDeleteAll(ConnectionInterface $con = null)
|
public function doDeleteAll(ConnectionInterface $con = null)
|
||||||
{
|
{
|
||||||
if (null === $con) {
|
if (null === $con) {
|
||||||
$con = Propel::getServiceContainer()->getWriteConnection(ImportExportTypeI18nTableMap::DATABASE_NAME);
|
$con = Propel::getServiceContainer()->getWriteConnection(ImportI18nTableMap::DATABASE_NAME);
|
||||||
}
|
}
|
||||||
$affectedRows = 0; // initialize var to track total num of affected rows
|
$affectedRows = 0; // initialize var to track total num of affected rows
|
||||||
try {
|
try {
|
||||||
@@ -483,8 +483,8 @@ abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
|||||||
// Because this db requires some delete cascade/set null emulation, we have to
|
// Because this db requires some delete cascade/set null emulation, we have to
|
||||||
// clear the cached instance *after* the emulation has happened (since
|
// clear the cached instance *after* the emulation has happened (since
|
||||||
// instances get re-added by the select statement contained therein).
|
// instances get re-added by the select statement contained therein).
|
||||||
ImportExportTypeI18nTableMap::clearInstancePool();
|
ImportI18nTableMap::clearInstancePool();
|
||||||
ImportExportTypeI18nTableMap::clearRelatedInstancePool();
|
ImportI18nTableMap::clearRelatedInstancePool();
|
||||||
|
|
||||||
$con->commit();
|
$con->commit();
|
||||||
} catch (PropelException $e) {
|
} catch (PropelException $e) {
|
||||||
@@ -496,9 +496,9 @@ abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Performs a DELETE on the database, given a ChildImportExportTypeI18n or Criteria object OR a primary key value.
|
* Performs a DELETE on the database, given a ChildImportI18n or Criteria object OR a primary key value.
|
||||||
*
|
*
|
||||||
* @param mixed $values Criteria or ChildImportExportTypeI18n object or primary key or array of primary keys
|
* @param mixed $values Criteria or ChildImportI18n object or primary key or array of primary keys
|
||||||
* which is used to create the DELETE statement
|
* which is used to create the DELETE statement
|
||||||
* @param ConnectionInterface $con the connection to use
|
* @param ConnectionInterface $con the connection to use
|
||||||
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
|
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
|
||||||
@@ -509,13 +509,13 @@ abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
|||||||
public function delete(ConnectionInterface $con = null)
|
public function delete(ConnectionInterface $con = null)
|
||||||
{
|
{
|
||||||
if (null === $con) {
|
if (null === $con) {
|
||||||
$con = Propel::getServiceContainer()->getWriteConnection(ImportExportTypeI18nTableMap::DATABASE_NAME);
|
$con = Propel::getServiceContainer()->getWriteConnection(ImportI18nTableMap::DATABASE_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
$criteria = $this;
|
$criteria = $this;
|
||||||
|
|
||||||
// Set the correct dbName
|
// Set the correct dbName
|
||||||
$criteria->setDbName(ImportExportTypeI18nTableMap::DATABASE_NAME);
|
$criteria->setDbName(ImportI18nTableMap::DATABASE_NAME);
|
||||||
|
|
||||||
$affectedRows = 0; // initialize var to track total num of affected rows
|
$affectedRows = 0; // initialize var to track total num of affected rows
|
||||||
|
|
||||||
@@ -525,10 +525,10 @@ abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
|||||||
$con->beginTransaction();
|
$con->beginTransaction();
|
||||||
|
|
||||||
|
|
||||||
ImportExportTypeI18nTableMap::removeInstanceFromPool($criteria);
|
ImportI18nTableMap::removeInstanceFromPool($criteria);
|
||||||
|
|
||||||
$affectedRows += ModelCriteria::delete($con);
|
$affectedRows += ModelCriteria::delete($con);
|
||||||
ImportExportTypeI18nTableMap::clearRelatedInstancePool();
|
ImportI18nTableMap::clearRelatedInstancePool();
|
||||||
$con->commit();
|
$con->commit();
|
||||||
|
|
||||||
return $affectedRows;
|
return $affectedRows;
|
||||||
@@ -538,4 +538,4 @@ abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} // ImportExportTypeI18nQuery
|
} // ImportI18nQuery
|
||||||
@@ -12,89 +12,85 @@ use Propel\Runtime\Collection\Collection;
|
|||||||
use Propel\Runtime\Collection\ObjectCollection;
|
use Propel\Runtime\Collection\ObjectCollection;
|
||||||
use Propel\Runtime\Connection\ConnectionInterface;
|
use Propel\Runtime\Connection\ConnectionInterface;
|
||||||
use Propel\Runtime\Exception\PropelException;
|
use Propel\Runtime\Exception\PropelException;
|
||||||
use Thelia\Model\ImportExportType as ChildImportExportType;
|
use Thelia\Model\Import as ChildImport;
|
||||||
use Thelia\Model\ImportExportTypeI18nQuery as ChildImportExportTypeI18nQuery;
|
use Thelia\Model\ImportI18nQuery as ChildImportI18nQuery;
|
||||||
use Thelia\Model\ImportExportTypeQuery as ChildImportExportTypeQuery;
|
use Thelia\Model\ImportQuery as ChildImportQuery;
|
||||||
use Thelia\Model\Map\ImportExportTypeTableMap;
|
use Thelia\Model\Map\ImportTableMap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base class that represents a query for the 'import_export_type' table.
|
* Base class that represents a query for the 'import' table.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @method ChildImportExportTypeQuery orderById($order = Criteria::ASC) Order by the id column
|
* @method ChildImportQuery orderById($order = Criteria::ASC) Order by the id column
|
||||||
* @method ChildImportExportTypeQuery orderByUrlAction($order = Criteria::ASC) Order by the url_action column
|
* @method ChildImportQuery orderByImportCategoryId($order = Criteria::ASC) Order by the import_category_id column
|
||||||
* @method ChildImportExportTypeQuery orderByImportExportCategoryId($order = Criteria::ASC) Order by the import_export_category_id column
|
* @method ChildImportQuery orderByPosition($order = Criteria::ASC) Order by the position column
|
||||||
* @method ChildImportExportTypeQuery orderByPosition($order = Criteria::ASC) Order by the position column
|
* @method ChildImportQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
|
||||||
* @method ChildImportExportTypeQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
|
* @method ChildImportQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
|
||||||
* @method ChildImportExportTypeQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
|
|
||||||
*
|
*
|
||||||
* @method ChildImportExportTypeQuery groupById() Group by the id column
|
* @method ChildImportQuery groupById() Group by the id column
|
||||||
* @method ChildImportExportTypeQuery groupByUrlAction() Group by the url_action column
|
* @method ChildImportQuery groupByImportCategoryId() Group by the import_category_id column
|
||||||
* @method ChildImportExportTypeQuery groupByImportExportCategoryId() Group by the import_export_category_id column
|
* @method ChildImportQuery groupByPosition() Group by the position column
|
||||||
* @method ChildImportExportTypeQuery groupByPosition() Group by the position column
|
* @method ChildImportQuery groupByCreatedAt() Group by the created_at column
|
||||||
* @method ChildImportExportTypeQuery groupByCreatedAt() Group by the created_at column
|
* @method ChildImportQuery groupByUpdatedAt() Group by the updated_at column
|
||||||
* @method ChildImportExportTypeQuery groupByUpdatedAt() Group by the updated_at column
|
|
||||||
*
|
*
|
||||||
* @method ChildImportExportTypeQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
|
* @method ChildImportQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
|
||||||
* @method ChildImportExportTypeQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
* @method ChildImportQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
||||||
* @method ChildImportExportTypeQuery innerJoin($relation) Adds a INNER JOIN clause to the query
|
* @method ChildImportQuery innerJoin($relation) Adds a INNER JOIN clause to the query
|
||||||
*
|
*
|
||||||
* @method ChildImportExportTypeQuery leftJoinImportExportCategory($relationAlias = null) Adds a LEFT JOIN clause to the query using the ImportExportCategory relation
|
* @method ChildImportQuery leftJoinImportCategory($relationAlias = null) Adds a LEFT JOIN clause to the query using the ImportCategory relation
|
||||||
* @method ChildImportExportTypeQuery rightJoinImportExportCategory($relationAlias = null) Adds a RIGHT JOIN clause to the query using the ImportExportCategory relation
|
* @method ChildImportQuery rightJoinImportCategory($relationAlias = null) Adds a RIGHT JOIN clause to the query using the ImportCategory relation
|
||||||
* @method ChildImportExportTypeQuery innerJoinImportExportCategory($relationAlias = null) Adds a INNER JOIN clause to the query using the ImportExportCategory relation
|
* @method ChildImportQuery innerJoinImportCategory($relationAlias = null) Adds a INNER JOIN clause to the query using the ImportCategory relation
|
||||||
*
|
*
|
||||||
* @method ChildImportExportTypeQuery leftJoinImportExportTypeI18n($relationAlias = null) Adds a LEFT JOIN clause to the query using the ImportExportTypeI18n relation
|
* @method ChildImportQuery leftJoinImportI18n($relationAlias = null) Adds a LEFT JOIN clause to the query using the ImportI18n relation
|
||||||
* @method ChildImportExportTypeQuery rightJoinImportExportTypeI18n($relationAlias = null) Adds a RIGHT JOIN clause to the query using the ImportExportTypeI18n relation
|
* @method ChildImportQuery rightJoinImportI18n($relationAlias = null) Adds a RIGHT JOIN clause to the query using the ImportI18n relation
|
||||||
* @method ChildImportExportTypeQuery innerJoinImportExportTypeI18n($relationAlias = null) Adds a INNER JOIN clause to the query using the ImportExportTypeI18n relation
|
* @method ChildImportQuery innerJoinImportI18n($relationAlias = null) Adds a INNER JOIN clause to the query using the ImportI18n relation
|
||||||
*
|
*
|
||||||
* @method ChildImportExportType findOne(ConnectionInterface $con = null) Return the first ChildImportExportType matching the query
|
* @method ChildImport findOne(ConnectionInterface $con = null) Return the first ChildImport matching the query
|
||||||
* @method ChildImportExportType findOneOrCreate(ConnectionInterface $con = null) Return the first ChildImportExportType matching the query, or a new ChildImportExportType object populated from the query conditions when no match is found
|
* @method ChildImport findOneOrCreate(ConnectionInterface $con = null) Return the first ChildImport matching the query, or a new ChildImport object populated from the query conditions when no match is found
|
||||||
*
|
*
|
||||||
* @method ChildImportExportType findOneById(int $id) Return the first ChildImportExportType filtered by the id column
|
* @method ChildImport findOneById(int $id) Return the first ChildImport filtered by the id column
|
||||||
* @method ChildImportExportType findOneByUrlAction(string $url_action) Return the first ChildImportExportType filtered by the url_action column
|
* @method ChildImport findOneByImportCategoryId(int $import_category_id) Return the first ChildImport filtered by the import_category_id column
|
||||||
* @method ChildImportExportType findOneByImportExportCategoryId(int $import_export_category_id) Return the first ChildImportExportType filtered by the import_export_category_id column
|
* @method ChildImport findOneByPosition(int $position) Return the first ChildImport filtered by the position column
|
||||||
* @method ChildImportExportType findOneByPosition(int $position) Return the first ChildImportExportType filtered by the position column
|
* @method ChildImport findOneByCreatedAt(string $created_at) Return the first ChildImport filtered by the created_at column
|
||||||
* @method ChildImportExportType findOneByCreatedAt(string $created_at) Return the first ChildImportExportType filtered by the created_at column
|
* @method ChildImport findOneByUpdatedAt(string $updated_at) Return the first ChildImport filtered by the updated_at column
|
||||||
* @method ChildImportExportType findOneByUpdatedAt(string $updated_at) Return the first ChildImportExportType filtered by the updated_at column
|
|
||||||
*
|
*
|
||||||
* @method array findById(int $id) Return ChildImportExportType objects filtered by the id column
|
* @method array findById(int $id) Return ChildImport objects filtered by the id column
|
||||||
* @method array findByUrlAction(string $url_action) Return ChildImportExportType objects filtered by the url_action column
|
* @method array findByImportCategoryId(int $import_category_id) Return ChildImport objects filtered by the import_category_id column
|
||||||
* @method array findByImportExportCategoryId(int $import_export_category_id) Return ChildImportExportType objects filtered by the import_export_category_id column
|
* @method array findByPosition(int $position) Return ChildImport objects filtered by the position column
|
||||||
* @method array findByPosition(int $position) Return ChildImportExportType objects filtered by the position column
|
* @method array findByCreatedAt(string $created_at) Return ChildImport objects filtered by the created_at column
|
||||||
* @method array findByCreatedAt(string $created_at) Return ChildImportExportType 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 ChildImportExportType objects filtered by the updated_at column
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
abstract class ImportExportTypeQuery extends ModelCriteria
|
abstract class ImportQuery extends ModelCriteria
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes internal state of \Thelia\Model\Base\ImportExportTypeQuery object.
|
* Initializes internal state of \Thelia\Model\Base\ImportQuery object.
|
||||||
*
|
*
|
||||||
* @param string $dbName The database name
|
* @param string $dbName The database name
|
||||||
* @param string $modelName The phpName of a model, e.g. 'Book'
|
* @param string $modelName The phpName of a model, e.g. 'Book'
|
||||||
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
|
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
|
||||||
*/
|
*/
|
||||||
public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\ImportExportType', $modelAlias = null)
|
public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\Import', $modelAlias = null)
|
||||||
{
|
{
|
||||||
parent::__construct($dbName, $modelName, $modelAlias);
|
parent::__construct($dbName, $modelName, $modelAlias);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a new ChildImportExportTypeQuery object.
|
* Returns a new ChildImportQuery object.
|
||||||
*
|
*
|
||||||
* @param string $modelAlias The alias of a model in the query
|
* @param string $modelAlias The alias of a model in the query
|
||||||
* @param Criteria $criteria Optional Criteria to build the query from
|
* @param Criteria $criteria Optional Criteria to build the query from
|
||||||
*
|
*
|
||||||
* @return ChildImportExportTypeQuery
|
* @return ChildImportQuery
|
||||||
*/
|
*/
|
||||||
public static function create($modelAlias = null, $criteria = null)
|
public static function create($modelAlias = null, $criteria = null)
|
||||||
{
|
{
|
||||||
if ($criteria instanceof \Thelia\Model\ImportExportTypeQuery) {
|
if ($criteria instanceof \Thelia\Model\ImportQuery) {
|
||||||
return $criteria;
|
return $criteria;
|
||||||
}
|
}
|
||||||
$query = new \Thelia\Model\ImportExportTypeQuery();
|
$query = new \Thelia\Model\ImportQuery();
|
||||||
if (null !== $modelAlias) {
|
if (null !== $modelAlias) {
|
||||||
$query->setModelAlias($modelAlias);
|
$query->setModelAlias($modelAlias);
|
||||||
}
|
}
|
||||||
@@ -117,19 +113,19 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
|||||||
* @param mixed $key Primary key to use for the query
|
* @param mixed $key Primary key to use for the query
|
||||||
* @param ConnectionInterface $con an optional connection object
|
* @param ConnectionInterface $con an optional connection object
|
||||||
*
|
*
|
||||||
* @return ChildImportExportType|array|mixed the result, formatted by the current formatter
|
* @return ChildImport|array|mixed the result, formatted by the current formatter
|
||||||
*/
|
*/
|
||||||
public function findPk($key, $con = null)
|
public function findPk($key, $con = null)
|
||||||
{
|
{
|
||||||
if ($key === null) {
|
if ($key === null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if ((null !== ($obj = ImportExportTypeTableMap::getInstanceFromPool((string) $key))) && !$this->formatter) {
|
if ((null !== ($obj = ImportTableMap::getInstanceFromPool((string) $key))) && !$this->formatter) {
|
||||||
// the object is already in the instance pool
|
// the object is already in the instance pool
|
||||||
return $obj;
|
return $obj;
|
||||||
}
|
}
|
||||||
if ($con === null) {
|
if ($con === null) {
|
||||||
$con = Propel::getServiceContainer()->getReadConnection(ImportExportTypeTableMap::DATABASE_NAME);
|
$con = Propel::getServiceContainer()->getReadConnection(ImportTableMap::DATABASE_NAME);
|
||||||
}
|
}
|
||||||
$this->basePreSelect($con);
|
$this->basePreSelect($con);
|
||||||
if ($this->formatter || $this->modelAlias || $this->with || $this->select
|
if ($this->formatter || $this->modelAlias || $this->with || $this->select
|
||||||
@@ -148,11 +144,11 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
|||||||
* @param mixed $key Primary key to use for the query
|
* @param mixed $key Primary key to use for the query
|
||||||
* @param ConnectionInterface $con A connection object
|
* @param ConnectionInterface $con A connection object
|
||||||
*
|
*
|
||||||
* @return ChildImportExportType A model object, or null if the key is not found
|
* @return ChildImport A model object, or null if the key is not found
|
||||||
*/
|
*/
|
||||||
protected function findPkSimple($key, $con)
|
protected function findPkSimple($key, $con)
|
||||||
{
|
{
|
||||||
$sql = 'SELECT `ID`, `URL_ACTION`, `IMPORT_EXPORT_CATEGORY_ID`, `POSITION`, `CREATED_AT`, `UPDATED_AT` FROM `import_export_type` WHERE `ID` = :p0';
|
$sql = 'SELECT `ID`, `IMPORT_CATEGORY_ID`, `POSITION`, `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);
|
||||||
@@ -163,9 +159,9 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
|||||||
}
|
}
|
||||||
$obj = null;
|
$obj = null;
|
||||||
if ($row = $stmt->fetch(\PDO::FETCH_NUM)) {
|
if ($row = $stmt->fetch(\PDO::FETCH_NUM)) {
|
||||||
$obj = new ChildImportExportType();
|
$obj = new ChildImport();
|
||||||
$obj->hydrate($row);
|
$obj->hydrate($row);
|
||||||
ImportExportTypeTableMap::addInstanceToPool($obj, (string) $key);
|
ImportTableMap::addInstanceToPool($obj, (string) $key);
|
||||||
}
|
}
|
||||||
$stmt->closeCursor();
|
$stmt->closeCursor();
|
||||||
|
|
||||||
@@ -178,7 +174,7 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
|||||||
* @param mixed $key Primary key to use for the query
|
* @param mixed $key Primary key to use for the query
|
||||||
* @param ConnectionInterface $con A connection object
|
* @param ConnectionInterface $con A connection object
|
||||||
*
|
*
|
||||||
* @return ChildImportExportType|array|mixed the result, formatted by the current formatter
|
* @return ChildImport|array|mixed the result, formatted by the current formatter
|
||||||
*/
|
*/
|
||||||
protected function findPkComplex($key, $con)
|
protected function findPkComplex($key, $con)
|
||||||
{
|
{
|
||||||
@@ -220,12 +216,12 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
|||||||
*
|
*
|
||||||
* @param mixed $key Primary key to use for the query
|
* @param mixed $key Primary key to use for the query
|
||||||
*
|
*
|
||||||
* @return ChildImportExportTypeQuery The current query, for fluid interface
|
* @return ChildImportQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function filterByPrimaryKey($key)
|
public function filterByPrimaryKey($key)
|
||||||
{
|
{
|
||||||
|
|
||||||
return $this->addUsingAlias(ImportExportTypeTableMap::ID, $key, Criteria::EQUAL);
|
return $this->addUsingAlias(ImportTableMap::ID, $key, Criteria::EQUAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -233,12 +229,12 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
|||||||
*
|
*
|
||||||
* @param array $keys The list of primary key to use for the query
|
* @param array $keys The list of primary key to use for the query
|
||||||
*
|
*
|
||||||
* @return ChildImportExportTypeQuery The current query, for fluid interface
|
* @return ChildImportQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function filterByPrimaryKeys($keys)
|
public function filterByPrimaryKeys($keys)
|
||||||
{
|
{
|
||||||
|
|
||||||
return $this->addUsingAlias(ImportExportTypeTableMap::ID, $keys, Criteria::IN);
|
return $this->addUsingAlias(ImportTableMap::ID, $keys, Criteria::IN);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -257,18 +253,18 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
|||||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
*
|
*
|
||||||
* @return ChildImportExportTypeQuery The current query, for fluid interface
|
* @return ChildImportQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function filterById($id = null, $comparison = null)
|
public function filterById($id = null, $comparison = null)
|
||||||
{
|
{
|
||||||
if (is_array($id)) {
|
if (is_array($id)) {
|
||||||
$useMinMax = false;
|
$useMinMax = false;
|
||||||
if (isset($id['min'])) {
|
if (isset($id['min'])) {
|
||||||
$this->addUsingAlias(ImportExportTypeTableMap::ID, $id['min'], Criteria::GREATER_EQUAL);
|
$this->addUsingAlias(ImportTableMap::ID, $id['min'], Criteria::GREATER_EQUAL);
|
||||||
$useMinMax = true;
|
$useMinMax = true;
|
||||||
}
|
}
|
||||||
if (isset($id['max'])) {
|
if (isset($id['max'])) {
|
||||||
$this->addUsingAlias(ImportExportTypeTableMap::ID, $id['max'], Criteria::LESS_EQUAL);
|
$this->addUsingAlias(ImportTableMap::ID, $id['max'], Criteria::LESS_EQUAL);
|
||||||
$useMinMax = true;
|
$useMinMax = true;
|
||||||
}
|
}
|
||||||
if ($useMinMax) {
|
if ($useMinMax) {
|
||||||
@@ -279,68 +275,39 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->addUsingAlias(ImportExportTypeTableMap::ID, $id, $comparison);
|
return $this->addUsingAlias(ImportTableMap::ID, $id, $comparison);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the query on the url_action column
|
* Filter the query on the import_category_id column
|
||||||
*
|
*
|
||||||
* Example usage:
|
* Example usage:
|
||||||
* <code>
|
* <code>
|
||||||
* $query->filterByUrlAction('fooValue'); // WHERE url_action = 'fooValue'
|
* $query->filterByImportCategoryId(1234); // WHERE import_category_id = 1234
|
||||||
* $query->filterByUrlAction('%fooValue%'); // WHERE url_action LIKE '%fooValue%'
|
* $query->filterByImportCategoryId(array(12, 34)); // WHERE import_category_id IN (12, 34)
|
||||||
|
* $query->filterByImportCategoryId(array('min' => 12)); // WHERE import_category_id > 12
|
||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
* @param string $urlAction The value to use as filter.
|
* @see filterByImportCategory()
|
||||||
* Accepts wildcards (* and % trigger a LIKE)
|
|
||||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
|
||||||
*
|
*
|
||||||
* @return ChildImportExportTypeQuery The current query, for fluid interface
|
* @param mixed $importCategoryId The value to use as filter.
|
||||||
*/
|
|
||||||
public function filterByUrlAction($urlAction = null, $comparison = null)
|
|
||||||
{
|
|
||||||
if (null === $comparison) {
|
|
||||||
if (is_array($urlAction)) {
|
|
||||||
$comparison = Criteria::IN;
|
|
||||||
} elseif (preg_match('/[\%\*]/', $urlAction)) {
|
|
||||||
$urlAction = str_replace('*', '%', $urlAction);
|
|
||||||
$comparison = Criteria::LIKE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->addUsingAlias(ImportExportTypeTableMap::URL_ACTION, $urlAction, $comparison);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Filter the query on the import_export_category_id column
|
|
||||||
*
|
|
||||||
* Example usage:
|
|
||||||
* <code>
|
|
||||||
* $query->filterByImportExportCategoryId(1234); // WHERE import_export_category_id = 1234
|
|
||||||
* $query->filterByImportExportCategoryId(array(12, 34)); // WHERE import_export_category_id IN (12, 34)
|
|
||||||
* $query->filterByImportExportCategoryId(array('min' => 12)); // WHERE import_export_category_id > 12
|
|
||||||
* </code>
|
|
||||||
*
|
|
||||||
* @see filterByImportExportCategory()
|
|
||||||
*
|
|
||||||
* @param mixed $importExportCategoryId The value to use as filter.
|
|
||||||
* Use scalar values for equality.
|
* Use scalar values for equality.
|
||||||
* Use array values for in_array() equivalent.
|
* Use array values for in_array() equivalent.
|
||||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
*
|
*
|
||||||
* @return ChildImportExportTypeQuery The current query, for fluid interface
|
* @return ChildImportQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function filterByImportExportCategoryId($importExportCategoryId = null, $comparison = null)
|
public function filterByImportCategoryId($importCategoryId = null, $comparison = null)
|
||||||
{
|
{
|
||||||
if (is_array($importExportCategoryId)) {
|
if (is_array($importCategoryId)) {
|
||||||
$useMinMax = false;
|
$useMinMax = false;
|
||||||
if (isset($importExportCategoryId['min'])) {
|
if (isset($importCategoryId['min'])) {
|
||||||
$this->addUsingAlias(ImportExportTypeTableMap::IMPORT_EXPORT_CATEGORY_ID, $importExportCategoryId['min'], Criteria::GREATER_EQUAL);
|
$this->addUsingAlias(ImportTableMap::IMPORT_CATEGORY_ID, $importCategoryId['min'], Criteria::GREATER_EQUAL);
|
||||||
$useMinMax = true;
|
$useMinMax = true;
|
||||||
}
|
}
|
||||||
if (isset($importExportCategoryId['max'])) {
|
if (isset($importCategoryId['max'])) {
|
||||||
$this->addUsingAlias(ImportExportTypeTableMap::IMPORT_EXPORT_CATEGORY_ID, $importExportCategoryId['max'], Criteria::LESS_EQUAL);
|
$this->addUsingAlias(ImportTableMap::IMPORT_CATEGORY_ID, $importCategoryId['max'], Criteria::LESS_EQUAL);
|
||||||
$useMinMax = true;
|
$useMinMax = true;
|
||||||
}
|
}
|
||||||
if ($useMinMax) {
|
if ($useMinMax) {
|
||||||
@@ -351,7 +318,7 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->addUsingAlias(ImportExportTypeTableMap::IMPORT_EXPORT_CATEGORY_ID, $importExportCategoryId, $comparison);
|
return $this->addUsingAlias(ImportTableMap::IMPORT_CATEGORY_ID, $importCategoryId, $comparison);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -370,18 +337,18 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
|||||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
*
|
*
|
||||||
* @return ChildImportExportTypeQuery The current query, for fluid interface
|
* @return ChildImportQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function filterByPosition($position = null, $comparison = null)
|
public function filterByPosition($position = null, $comparison = null)
|
||||||
{
|
{
|
||||||
if (is_array($position)) {
|
if (is_array($position)) {
|
||||||
$useMinMax = false;
|
$useMinMax = false;
|
||||||
if (isset($position['min'])) {
|
if (isset($position['min'])) {
|
||||||
$this->addUsingAlias(ImportExportTypeTableMap::POSITION, $position['min'], Criteria::GREATER_EQUAL);
|
$this->addUsingAlias(ImportTableMap::POSITION, $position['min'], Criteria::GREATER_EQUAL);
|
||||||
$useMinMax = true;
|
$useMinMax = true;
|
||||||
}
|
}
|
||||||
if (isset($position['max'])) {
|
if (isset($position['max'])) {
|
||||||
$this->addUsingAlias(ImportExportTypeTableMap::POSITION, $position['max'], Criteria::LESS_EQUAL);
|
$this->addUsingAlias(ImportTableMap::POSITION, $position['max'], Criteria::LESS_EQUAL);
|
||||||
$useMinMax = true;
|
$useMinMax = true;
|
||||||
}
|
}
|
||||||
if ($useMinMax) {
|
if ($useMinMax) {
|
||||||
@@ -392,7 +359,7 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->addUsingAlias(ImportExportTypeTableMap::POSITION, $position, $comparison);
|
return $this->addUsingAlias(ImportTableMap::POSITION, $position, $comparison);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -413,18 +380,18 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
|||||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
*
|
*
|
||||||
* @return ChildImportExportTypeQuery The current query, for fluid interface
|
* @return ChildImportQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function filterByCreatedAt($createdAt = null, $comparison = null)
|
public function filterByCreatedAt($createdAt = null, $comparison = null)
|
||||||
{
|
{
|
||||||
if (is_array($createdAt)) {
|
if (is_array($createdAt)) {
|
||||||
$useMinMax = false;
|
$useMinMax = false;
|
||||||
if (isset($createdAt['min'])) {
|
if (isset($createdAt['min'])) {
|
||||||
$this->addUsingAlias(ImportExportTypeTableMap::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL);
|
$this->addUsingAlias(ImportTableMap::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL);
|
||||||
$useMinMax = true;
|
$useMinMax = true;
|
||||||
}
|
}
|
||||||
if (isset($createdAt['max'])) {
|
if (isset($createdAt['max'])) {
|
||||||
$this->addUsingAlias(ImportExportTypeTableMap::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL);
|
$this->addUsingAlias(ImportTableMap::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL);
|
||||||
$useMinMax = true;
|
$useMinMax = true;
|
||||||
}
|
}
|
||||||
if ($useMinMax) {
|
if ($useMinMax) {
|
||||||
@@ -435,7 +402,7 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->addUsingAlias(ImportExportTypeTableMap::CREATED_AT, $createdAt, $comparison);
|
return $this->addUsingAlias(ImportTableMap::CREATED_AT, $createdAt, $comparison);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -456,18 +423,18 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
|||||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
*
|
*
|
||||||
* @return ChildImportExportTypeQuery The current query, for fluid interface
|
* @return ChildImportQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function filterByUpdatedAt($updatedAt = null, $comparison = null)
|
public function filterByUpdatedAt($updatedAt = null, $comparison = null)
|
||||||
{
|
{
|
||||||
if (is_array($updatedAt)) {
|
if (is_array($updatedAt)) {
|
||||||
$useMinMax = false;
|
$useMinMax = false;
|
||||||
if (isset($updatedAt['min'])) {
|
if (isset($updatedAt['min'])) {
|
||||||
$this->addUsingAlias(ImportExportTypeTableMap::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);
|
$this->addUsingAlias(ImportTableMap::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);
|
||||||
$useMinMax = true;
|
$useMinMax = true;
|
||||||
}
|
}
|
||||||
if (isset($updatedAt['max'])) {
|
if (isset($updatedAt['max'])) {
|
||||||
$this->addUsingAlias(ImportExportTypeTableMap::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);
|
$this->addUsingAlias(ImportTableMap::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);
|
||||||
$useMinMax = true;
|
$useMinMax = true;
|
||||||
}
|
}
|
||||||
if ($useMinMax) {
|
if ($useMinMax) {
|
||||||
@@ -478,46 +445,46 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->addUsingAlias(ImportExportTypeTableMap::UPDATED_AT, $updatedAt, $comparison);
|
return $this->addUsingAlias(ImportTableMap::UPDATED_AT, $updatedAt, $comparison);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the query by a related \Thelia\Model\ImportExportCategory object
|
* Filter the query by a related \Thelia\Model\ImportCategory object
|
||||||
*
|
*
|
||||||
* @param \Thelia\Model\ImportExportCategory|ObjectCollection $importExportCategory The related object(s) to use as filter
|
* @param \Thelia\Model\ImportCategory|ObjectCollection $importCategory The related object(s) to use as filter
|
||||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
*
|
*
|
||||||
* @return ChildImportExportTypeQuery The current query, for fluid interface
|
* @return ChildImportQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function filterByImportExportCategory($importExportCategory, $comparison = null)
|
public function filterByImportCategory($importCategory, $comparison = null)
|
||||||
{
|
{
|
||||||
if ($importExportCategory instanceof \Thelia\Model\ImportExportCategory) {
|
if ($importCategory instanceof \Thelia\Model\ImportCategory) {
|
||||||
return $this
|
return $this
|
||||||
->addUsingAlias(ImportExportTypeTableMap::IMPORT_EXPORT_CATEGORY_ID, $importExportCategory->getId(), $comparison);
|
->addUsingAlias(ImportTableMap::IMPORT_CATEGORY_ID, $importCategory->getId(), $comparison);
|
||||||
} elseif ($importExportCategory instanceof ObjectCollection) {
|
} elseif ($importCategory instanceof ObjectCollection) {
|
||||||
if (null === $comparison) {
|
if (null === $comparison) {
|
||||||
$comparison = Criteria::IN;
|
$comparison = Criteria::IN;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this
|
return $this
|
||||||
->addUsingAlias(ImportExportTypeTableMap::IMPORT_EXPORT_CATEGORY_ID, $importExportCategory->toKeyValue('PrimaryKey', 'Id'), $comparison);
|
->addUsingAlias(ImportTableMap::IMPORT_CATEGORY_ID, $importCategory->toKeyValue('PrimaryKey', 'Id'), $comparison);
|
||||||
} else {
|
} else {
|
||||||
throw new PropelException('filterByImportExportCategory() only accepts arguments of type \Thelia\Model\ImportExportCategory or Collection');
|
throw new PropelException('filterByImportCategory() only accepts arguments of type \Thelia\Model\ImportCategory or Collection');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a JOIN clause to the query using the ImportExportCategory relation
|
* Adds a JOIN clause to the query using the ImportCategory relation
|
||||||
*
|
*
|
||||||
* @param string $relationAlias optional alias for the relation
|
* @param string $relationAlias optional alias for the relation
|
||||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||||
*
|
*
|
||||||
* @return ChildImportExportTypeQuery The current query, for fluid interface
|
* @return ChildImportQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function joinImportExportCategory($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
public function joinImportCategory($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||||
{
|
{
|
||||||
$tableMap = $this->getTableMap();
|
$tableMap = $this->getTableMap();
|
||||||
$relationMap = $tableMap->getRelation('ImportExportCategory');
|
$relationMap = $tableMap->getRelation('ImportCategory');
|
||||||
|
|
||||||
// create a ModelJoin object for this join
|
// create a ModelJoin object for this join
|
||||||
$join = new ModelJoin();
|
$join = new ModelJoin();
|
||||||
@@ -532,14 +499,14 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
|||||||
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||||
$this->addJoinObject($join, $relationAlias);
|
$this->addJoinObject($join, $relationAlias);
|
||||||
} else {
|
} else {
|
||||||
$this->addJoinObject($join, 'ImportExportCategory');
|
$this->addJoinObject($join, 'ImportCategory');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Use the ImportExportCategory relation ImportExportCategory object
|
* Use the ImportCategory relation ImportCategory object
|
||||||
*
|
*
|
||||||
* @see useQuery()
|
* @see useQuery()
|
||||||
*
|
*
|
||||||
@@ -547,50 +514,50 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
|||||||
* to be used as main alias in the secondary query
|
* to be used as main alias in the secondary query
|
||||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||||
*
|
*
|
||||||
* @return \Thelia\Model\ImportExportCategoryQuery A secondary query class using the current class as primary query
|
* @return \Thelia\Model\ImportCategoryQuery A secondary query class using the current class as primary query
|
||||||
*/
|
*/
|
||||||
public function useImportExportCategoryQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
public function useImportCategoryQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||||
{
|
{
|
||||||
return $this
|
return $this
|
||||||
->joinImportExportCategory($relationAlias, $joinType)
|
->joinImportCategory($relationAlias, $joinType)
|
||||||
->useQuery($relationAlias ? $relationAlias : 'ImportExportCategory', '\Thelia\Model\ImportExportCategoryQuery');
|
->useQuery($relationAlias ? $relationAlias : 'ImportCategory', '\Thelia\Model\ImportCategoryQuery');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the query by a related \Thelia\Model\ImportExportTypeI18n object
|
* Filter the query by a related \Thelia\Model\ImportI18n object
|
||||||
*
|
*
|
||||||
* @param \Thelia\Model\ImportExportTypeI18n|ObjectCollection $importExportTypeI18n the related object to use as filter
|
* @param \Thelia\Model\ImportI18n|ObjectCollection $importI18n the related object to use as filter
|
||||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
*
|
*
|
||||||
* @return ChildImportExportTypeQuery The current query, for fluid interface
|
* @return ChildImportQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function filterByImportExportTypeI18n($importExportTypeI18n, $comparison = null)
|
public function filterByImportI18n($importI18n, $comparison = null)
|
||||||
{
|
{
|
||||||
if ($importExportTypeI18n instanceof \Thelia\Model\ImportExportTypeI18n) {
|
if ($importI18n instanceof \Thelia\Model\ImportI18n) {
|
||||||
return $this
|
return $this
|
||||||
->addUsingAlias(ImportExportTypeTableMap::ID, $importExportTypeI18n->getId(), $comparison);
|
->addUsingAlias(ImportTableMap::ID, $importI18n->getId(), $comparison);
|
||||||
} elseif ($importExportTypeI18n instanceof ObjectCollection) {
|
} elseif ($importI18n instanceof ObjectCollection) {
|
||||||
return $this
|
return $this
|
||||||
->useImportExportTypeI18nQuery()
|
->useImportI18nQuery()
|
||||||
->filterByPrimaryKeys($importExportTypeI18n->getPrimaryKeys())
|
->filterByPrimaryKeys($importI18n->getPrimaryKeys())
|
||||||
->endUse();
|
->endUse();
|
||||||
} else {
|
} else {
|
||||||
throw new PropelException('filterByImportExportTypeI18n() only accepts arguments of type \Thelia\Model\ImportExportTypeI18n or Collection');
|
throw new PropelException('filterByImportI18n() only accepts arguments of type \Thelia\Model\ImportI18n or Collection');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a JOIN clause to the query using the ImportExportTypeI18n relation
|
* Adds a JOIN clause to the query using the ImportI18n relation
|
||||||
*
|
*
|
||||||
* @param string $relationAlias optional alias for the relation
|
* @param string $relationAlias optional alias for the relation
|
||||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||||
*
|
*
|
||||||
* @return ChildImportExportTypeQuery The current query, for fluid interface
|
* @return ChildImportQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function joinImportExportTypeI18n($relationAlias = null, $joinType = 'LEFT JOIN')
|
public function joinImportI18n($relationAlias = null, $joinType = 'LEFT JOIN')
|
||||||
{
|
{
|
||||||
$tableMap = $this->getTableMap();
|
$tableMap = $this->getTableMap();
|
||||||
$relationMap = $tableMap->getRelation('ImportExportTypeI18n');
|
$relationMap = $tableMap->getRelation('ImportI18n');
|
||||||
|
|
||||||
// create a ModelJoin object for this join
|
// create a ModelJoin object for this join
|
||||||
$join = new ModelJoin();
|
$join = new ModelJoin();
|
||||||
@@ -605,14 +572,14 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
|||||||
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||||
$this->addJoinObject($join, $relationAlias);
|
$this->addJoinObject($join, $relationAlias);
|
||||||
} else {
|
} else {
|
||||||
$this->addJoinObject($join, 'ImportExportTypeI18n');
|
$this->addJoinObject($join, 'ImportI18n');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Use the ImportExportTypeI18n relation ImportExportTypeI18n object
|
* Use the ImportI18n relation ImportI18n object
|
||||||
*
|
*
|
||||||
* @see useQuery()
|
* @see useQuery()
|
||||||
*
|
*
|
||||||
@@ -620,33 +587,33 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
|||||||
* to be used as main alias in the secondary query
|
* to be used as main alias in the secondary query
|
||||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||||
*
|
*
|
||||||
* @return \Thelia\Model\ImportExportTypeI18nQuery A secondary query class using the current class as primary query
|
* @return \Thelia\Model\ImportI18nQuery A secondary query class using the current class as primary query
|
||||||
*/
|
*/
|
||||||
public function useImportExportTypeI18nQuery($relationAlias = null, $joinType = 'LEFT JOIN')
|
public function useImportI18nQuery($relationAlias = null, $joinType = 'LEFT JOIN')
|
||||||
{
|
{
|
||||||
return $this
|
return $this
|
||||||
->joinImportExportTypeI18n($relationAlias, $joinType)
|
->joinImportI18n($relationAlias, $joinType)
|
||||||
->useQuery($relationAlias ? $relationAlias : 'ImportExportTypeI18n', '\Thelia\Model\ImportExportTypeI18nQuery');
|
->useQuery($relationAlias ? $relationAlias : 'ImportI18n', '\Thelia\Model\ImportI18nQuery');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Exclude object from result
|
* Exclude object from result
|
||||||
*
|
*
|
||||||
* @param ChildImportExportType $importExportType Object to remove from the list of results
|
* @param ChildImport $import Object to remove from the list of results
|
||||||
*
|
*
|
||||||
* @return ChildImportExportTypeQuery The current query, for fluid interface
|
* @return ChildImportQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function prune($importExportType = null)
|
public function prune($import = null)
|
||||||
{
|
{
|
||||||
if ($importExportType) {
|
if ($import) {
|
||||||
$this->addUsingAlias(ImportExportTypeTableMap::ID, $importExportType->getId(), Criteria::NOT_EQUAL);
|
$this->addUsingAlias(ImportTableMap::ID, $import->getId(), Criteria::NOT_EQUAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deletes all rows from the import_export_type table.
|
* Deletes all rows from the import table.
|
||||||
*
|
*
|
||||||
* @param ConnectionInterface $con the connection to use
|
* @param ConnectionInterface $con the connection to use
|
||||||
* @return int The number of affected rows (if supported by underlying database driver).
|
* @return int The number of affected rows (if supported by underlying database driver).
|
||||||
@@ -654,7 +621,7 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
|||||||
public function doDeleteAll(ConnectionInterface $con = null)
|
public function doDeleteAll(ConnectionInterface $con = null)
|
||||||
{
|
{
|
||||||
if (null === $con) {
|
if (null === $con) {
|
||||||
$con = Propel::getServiceContainer()->getWriteConnection(ImportExportTypeTableMap::DATABASE_NAME);
|
$con = Propel::getServiceContainer()->getWriteConnection(ImportTableMap::DATABASE_NAME);
|
||||||
}
|
}
|
||||||
$affectedRows = 0; // initialize var to track total num of affected rows
|
$affectedRows = 0; // initialize var to track total num of affected rows
|
||||||
try {
|
try {
|
||||||
@@ -665,8 +632,8 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
|||||||
// Because this db requires some delete cascade/set null emulation, we have to
|
// Because this db requires some delete cascade/set null emulation, we have to
|
||||||
// clear the cached instance *after* the emulation has happened (since
|
// clear the cached instance *after* the emulation has happened (since
|
||||||
// instances get re-added by the select statement contained therein).
|
// instances get re-added by the select statement contained therein).
|
||||||
ImportExportTypeTableMap::clearInstancePool();
|
ImportTableMap::clearInstancePool();
|
||||||
ImportExportTypeTableMap::clearRelatedInstancePool();
|
ImportTableMap::clearRelatedInstancePool();
|
||||||
|
|
||||||
$con->commit();
|
$con->commit();
|
||||||
} catch (PropelException $e) {
|
} catch (PropelException $e) {
|
||||||
@@ -678,9 +645,9 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Performs a DELETE on the database, given a ChildImportExportType or Criteria object OR a primary key value.
|
* Performs a DELETE on the database, given a ChildImport or Criteria object OR a primary key value.
|
||||||
*
|
*
|
||||||
* @param mixed $values Criteria or ChildImportExportType object or primary key or array of primary keys
|
* @param mixed $values Criteria or ChildImport object or primary key or array of primary keys
|
||||||
* which is used to create the DELETE statement
|
* which is used to create the DELETE statement
|
||||||
* @param ConnectionInterface $con the connection to use
|
* @param ConnectionInterface $con the connection to use
|
||||||
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
|
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
|
||||||
@@ -691,13 +658,13 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
|||||||
public function delete(ConnectionInterface $con = null)
|
public function delete(ConnectionInterface $con = null)
|
||||||
{
|
{
|
||||||
if (null === $con) {
|
if (null === $con) {
|
||||||
$con = Propel::getServiceContainer()->getWriteConnection(ImportExportTypeTableMap::DATABASE_NAME);
|
$con = Propel::getServiceContainer()->getWriteConnection(ImportTableMap::DATABASE_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
$criteria = $this;
|
$criteria = $this;
|
||||||
|
|
||||||
// Set the correct dbName
|
// Set the correct dbName
|
||||||
$criteria->setDbName(ImportExportTypeTableMap::DATABASE_NAME);
|
$criteria->setDbName(ImportTableMap::DATABASE_NAME);
|
||||||
|
|
||||||
$affectedRows = 0; // initialize var to track total num of affected rows
|
$affectedRows = 0; // initialize var to track total num of affected rows
|
||||||
|
|
||||||
@@ -707,10 +674,10 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
|||||||
$con->beginTransaction();
|
$con->beginTransaction();
|
||||||
|
|
||||||
|
|
||||||
ImportExportTypeTableMap::removeInstanceFromPool($criteria);
|
ImportTableMap::removeInstanceFromPool($criteria);
|
||||||
|
|
||||||
$affectedRows += ModelCriteria::delete($con);
|
$affectedRows += ModelCriteria::delete($con);
|
||||||
ImportExportTypeTableMap::clearRelatedInstancePool();
|
ImportTableMap::clearRelatedInstancePool();
|
||||||
$con->commit();
|
$con->commit();
|
||||||
|
|
||||||
return $affectedRows;
|
return $affectedRows;
|
||||||
@@ -729,14 +696,14 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
|||||||
* @param string $relationAlias optional alias for the relation
|
* @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.
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join.
|
||||||
*
|
*
|
||||||
* @return ChildImportExportTypeQuery The current query, for fluid interface
|
* @return ChildImportQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
||||||
{
|
{
|
||||||
$relationName = $relationAlias ? $relationAlias : 'ImportExportTypeI18n';
|
$relationName = $relationAlias ? $relationAlias : 'ImportI18n';
|
||||||
|
|
||||||
return $this
|
return $this
|
||||||
->joinImportExportTypeI18n($relationAlias, $joinType)
|
->joinImportI18n($relationAlias, $joinType)
|
||||||
->addJoinCondition($relationName, $relationName . '.Locale = ?', $locale);
|
->addJoinCondition($relationName, $relationName . '.Locale = ?', $locale);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -747,14 +714,14 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
|||||||
* @param string $locale Locale to use for the join condition, e.g. 'fr_FR'
|
* @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.
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join.
|
||||||
*
|
*
|
||||||
* @return ChildImportExportTypeQuery The current query, for fluid interface
|
* @return ChildImportQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN)
|
public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN)
|
||||||
{
|
{
|
||||||
$this
|
$this
|
||||||
->joinI18n($locale, null, $joinType)
|
->joinI18n($locale, null, $joinType)
|
||||||
->with('ImportExportTypeI18n');
|
->with('ImportI18n');
|
||||||
$this->with['ImportExportTypeI18n']->setIsWithOneToMany(false);
|
$this->with['ImportI18n']->setIsWithOneToMany(false);
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
@@ -768,13 +735,13 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
|||||||
* @param string $relationAlias optional alias for the relation
|
* @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.
|
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join.
|
||||||
*
|
*
|
||||||
* @return ChildImportExportTypeI18nQuery A secondary query class using the current class as primary query
|
* @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)
|
public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
||||||
{
|
{
|
||||||
return $this
|
return $this
|
||||||
->joinI18n($locale, $relationAlias, $joinType)
|
->joinI18n($locale, $relationAlias, $joinType)
|
||||||
->useQuery($relationAlias ? $relationAlias : 'ImportExportTypeI18n', '\Thelia\Model\ImportExportTypeI18nQuery');
|
->useQuery($relationAlias ? $relationAlias : 'ImportI18n', '\Thelia\Model\ImportI18nQuery');
|
||||||
}
|
}
|
||||||
|
|
||||||
// timestampable behavior
|
// timestampable behavior
|
||||||
@@ -784,11 +751,11 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
|||||||
*
|
*
|
||||||
* @param int $nbDays Maximum age of the latest update in days
|
* @param int $nbDays Maximum age of the latest update in days
|
||||||
*
|
*
|
||||||
* @return ChildImportExportTypeQuery The current query, for fluid interface
|
* @return ChildImportQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function recentlyUpdated($nbDays = 7)
|
public function recentlyUpdated($nbDays = 7)
|
||||||
{
|
{
|
||||||
return $this->addUsingAlias(ImportExportTypeTableMap::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
|
return $this->addUsingAlias(ImportTableMap::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -796,51 +763,51 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
|||||||
*
|
*
|
||||||
* @param int $nbDays Maximum age of in days
|
* @param int $nbDays Maximum age of in days
|
||||||
*
|
*
|
||||||
* @return ChildImportExportTypeQuery The current query, for fluid interface
|
* @return ChildImportQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function recentlyCreated($nbDays = 7)
|
public function recentlyCreated($nbDays = 7)
|
||||||
{
|
{
|
||||||
return $this->addUsingAlias(ImportExportTypeTableMap::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
|
return $this->addUsingAlias(ImportTableMap::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Order by update date desc
|
* Order by update date desc
|
||||||
*
|
*
|
||||||
* @return ChildImportExportTypeQuery The current query, for fluid interface
|
* @return ChildImportQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function lastUpdatedFirst()
|
public function lastUpdatedFirst()
|
||||||
{
|
{
|
||||||
return $this->addDescendingOrderByColumn(ImportExportTypeTableMap::UPDATED_AT);
|
return $this->addDescendingOrderByColumn(ImportTableMap::UPDATED_AT);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Order by update date asc
|
* Order by update date asc
|
||||||
*
|
*
|
||||||
* @return ChildImportExportTypeQuery The current query, for fluid interface
|
* @return ChildImportQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function firstUpdatedFirst()
|
public function firstUpdatedFirst()
|
||||||
{
|
{
|
||||||
return $this->addAscendingOrderByColumn(ImportExportTypeTableMap::UPDATED_AT);
|
return $this->addAscendingOrderByColumn(ImportTableMap::UPDATED_AT);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Order by create date desc
|
* Order by create date desc
|
||||||
*
|
*
|
||||||
* @return ChildImportExportTypeQuery The current query, for fluid interface
|
* @return ChildImportQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function lastCreatedFirst()
|
public function lastCreatedFirst()
|
||||||
{
|
{
|
||||||
return $this->addDescendingOrderByColumn(ImportExportTypeTableMap::CREATED_AT);
|
return $this->addDescendingOrderByColumn(ImportTableMap::CREATED_AT);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Order by create date asc
|
* Order by create date asc
|
||||||
*
|
*
|
||||||
* @return ChildImportExportTypeQuery The current query, for fluid interface
|
* @return ChildImportQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function firstCreatedFirst()
|
public function firstCreatedFirst()
|
||||||
{
|
{
|
||||||
return $this->addAscendingOrderByColumn(ImportExportTypeTableMap::CREATED_AT);
|
return $this->addAscendingOrderByColumn(ImportTableMap::CREATED_AT);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // ImportExportTypeQuery
|
} // ImportQuery
|
||||||
10
core/lib/Thelia/Model/Export.php
Normal file
10
core/lib/Thelia/Model/Export.php
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Thelia\Model;
|
||||||
|
|
||||||
|
use Thelia\Model\Base\Export as BaseExport;
|
||||||
|
|
||||||
|
class Export extends BaseExport
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
10
core/lib/Thelia/Model/ExportCategory.php
Normal file
10
core/lib/Thelia/Model/ExportCategory.php
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Thelia\Model;
|
||||||
|
|
||||||
|
use Thelia\Model\Base\ExportCategory as BaseExportCategory;
|
||||||
|
|
||||||
|
class ExportCategory extends BaseExportCategory
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
10
core/lib/Thelia/Model/ExportCategoryI18n.php
Normal file
10
core/lib/Thelia/Model/ExportCategoryI18n.php
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Thelia\Model;
|
||||||
|
|
||||||
|
use Thelia\Model\Base\ExportCategoryI18n as BaseExportCategoryI18n;
|
||||||
|
|
||||||
|
class ExportCategoryI18n extends BaseExportCategoryI18n
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
@@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
namespace Thelia\Model;
|
namespace Thelia\Model;
|
||||||
|
|
||||||
use Thelia\Model\Base\ImportExportCategoryQuery as BaseImportExportCategoryQuery;
|
use Thelia\Model\Base\ExportCategoryI18nQuery as BaseExportCategoryI18nQuery;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Skeleton subclass for performing query and update operations on the 'import_export_category' table.
|
* Skeleton subclass for performing query and update operations on the 'export_category_i18n' table.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
@@ -15,7 +15,7 @@ use Thelia\Model\Base\ImportExportCategoryQuery as BaseImportExportCategoryQuery
|
|||||||
* long as it does not already exist in the output directory.
|
* long as it does not already exist in the output directory.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
class ImportExportCategoryQuery extends BaseImportExportCategoryQuery
|
class ExportCategoryI18nQuery extends BaseExportCategoryI18nQuery
|
||||||
{
|
{
|
||||||
|
|
||||||
} // ImportExportCategoryQuery
|
} // ExportCategoryI18nQuery
|
||||||
@@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
namespace Thelia\Model;
|
namespace Thelia\Model;
|
||||||
|
|
||||||
use Thelia\Model\Base\ImportExportTypeQuery as BaseImportExportTypeQuery;
|
use Thelia\Model\Base\ExportCategoryQuery as BaseExportCategoryQuery;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Skeleton subclass for performing query and update operations on the 'import_export_type' table.
|
* Skeleton subclass for performing query and update operations on the 'export_category' table.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
@@ -15,7 +15,7 @@ use Thelia\Model\Base\ImportExportTypeQuery as BaseImportExportTypeQuery;
|
|||||||
* long as it does not already exist in the output directory.
|
* long as it does not already exist in the output directory.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
class ImportExportTypeQuery extends BaseImportExportTypeQuery
|
class ExportCategoryQuery extends BaseExportCategoryQuery
|
||||||
{
|
{
|
||||||
|
|
||||||
} // ImportExportTypeQuery
|
} // ExportCategoryQuery
|
||||||
10
core/lib/Thelia/Model/ExportI18n.php
Normal file
10
core/lib/Thelia/Model/ExportI18n.php
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Thelia\Model;
|
||||||
|
|
||||||
|
use Thelia\Model\Base\ExportI18n as BaseExportI18n;
|
||||||
|
|
||||||
|
class ExportI18n extends BaseExportI18n
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
@@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
namespace Thelia\Model;
|
namespace Thelia\Model;
|
||||||
|
|
||||||
use Thelia\Model\Base\ImportExportTypeI18nQuery as BaseImportExportTypeI18nQuery;
|
use Thelia\Model\Base\ExportI18nQuery as BaseExportI18nQuery;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Skeleton subclass for performing query and update operations on the 'import_export_type_i18n' table.
|
* Skeleton subclass for performing query and update operations on the 'export_i18n' table.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
@@ -15,7 +15,7 @@ use Thelia\Model\Base\ImportExportTypeI18nQuery as BaseImportExportTypeI18nQuery
|
|||||||
* long as it does not already exist in the output directory.
|
* long as it does not already exist in the output directory.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
class ImportExportTypeI18nQuery extends BaseImportExportTypeI18nQuery
|
class ExportI18nQuery extends BaseExportI18nQuery
|
||||||
{
|
{
|
||||||
|
|
||||||
} // ImportExportTypeI18nQuery
|
} // ExportI18nQuery
|
||||||
@@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
namespace Thelia\Model;
|
namespace Thelia\Model;
|
||||||
|
|
||||||
use Thelia\Model\Base\ImportExportCategoryI18nQuery as BaseImportExportCategoryI18nQuery;
|
use Thelia\Model\Base\ExportQuery as BaseExportQuery;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Skeleton subclass for performing query and update operations on the 'import_export_category_i18n' table.
|
* Skeleton subclass for performing query and update operations on the 'export' table.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
@@ -15,7 +15,7 @@ use Thelia\Model\Base\ImportExportCategoryI18nQuery as BaseImportExportCategoryI
|
|||||||
* long as it does not already exist in the output directory.
|
* long as it does not already exist in the output directory.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
class ImportExportCategoryI18nQuery extends BaseImportExportCategoryI18nQuery
|
class ExportQuery extends BaseExportQuery
|
||||||
{
|
{
|
||||||
|
|
||||||
} // ImportExportCategoryI18nQuery
|
} // ExportQuery
|
||||||
10
core/lib/Thelia/Model/Import.php
Normal file
10
core/lib/Thelia/Model/Import.php
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Thelia\Model;
|
||||||
|
|
||||||
|
use Thelia\Model\Base\Import as BaseImport;
|
||||||
|
|
||||||
|
class Import extends BaseImport
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
10
core/lib/Thelia/Model/ImportCategory.php
Normal file
10
core/lib/Thelia/Model/ImportCategory.php
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Thelia\Model;
|
||||||
|
|
||||||
|
use Thelia\Model\Base\ImportCategory as BaseImportCategory;
|
||||||
|
|
||||||
|
class ImportCategory extends BaseImportCategory
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
10
core/lib/Thelia/Model/ImportCategoryI18n.php
Normal file
10
core/lib/Thelia/Model/ImportCategoryI18n.php
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Thelia\Model;
|
||||||
|
|
||||||
|
use Thelia\Model\Base\ImportCategoryI18n as BaseImportCategoryI18n;
|
||||||
|
|
||||||
|
class ImportCategoryI18n extends BaseImportCategoryI18n
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
21
core/lib/Thelia/Model/ImportCategoryI18nQuery.php
Normal file
21
core/lib/Thelia/Model/ImportCategoryI18nQuery.php
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Thelia\Model;
|
||||||
|
|
||||||
|
use Thelia\Model\Base\ImportCategoryI18nQuery as BaseImportCategoryI18nQuery;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Skeleton subclass for performing query and update operations on the 'import_category_i18n' table.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* You should add additional methods to this class to meet the
|
||||||
|
* application requirements. This class will only be generated as
|
||||||
|
* long as it does not already exist in the output directory.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
class ImportCategoryI18nQuery extends BaseImportCategoryI18nQuery
|
||||||
|
{
|
||||||
|
|
||||||
|
} // ImportCategoryI18nQuery
|
||||||
21
core/lib/Thelia/Model/ImportCategoryQuery.php
Normal file
21
core/lib/Thelia/Model/ImportCategoryQuery.php
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Thelia\Model;
|
||||||
|
|
||||||
|
use Thelia\Model\Base\ImportCategoryQuery as BaseImportCategoryQuery;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Skeleton subclass for performing query and update operations on the 'import_category' table.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* You should add additional methods to this class to meet the
|
||||||
|
* application requirements. This class will only be generated as
|
||||||
|
* long as it does not already exist in the output directory.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
class ImportCategoryQuery extends BaseImportCategoryQuery
|
||||||
|
{
|
||||||
|
|
||||||
|
} // ImportCategoryQuery
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace Thelia\Model;
|
|
||||||
|
|
||||||
use Thelia\Model\Base\ImportExportCategory as BaseImportExportCategory;
|
|
||||||
|
|
||||||
class ImportExportCategory extends BaseImportExportCategory
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace Thelia\Model;
|
|
||||||
|
|
||||||
use Thelia\Model\Base\ImportExportCategoryI18n as BaseImportExportCategoryI18n;
|
|
||||||
|
|
||||||
class ImportExportCategoryI18n extends BaseImportExportCategoryI18n
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace Thelia\Model;
|
|
||||||
|
|
||||||
use Thelia\Model\Base\ImportExportType as BaseImportExportType;
|
|
||||||
|
|
||||||
class ImportExportType extends BaseImportExportType
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace Thelia\Model;
|
|
||||||
|
|
||||||
use Thelia\Model\Base\ImportExportTypeI18n as BaseImportExportTypeI18n;
|
|
||||||
|
|
||||||
class ImportExportTypeI18n extends BaseImportExportTypeI18n
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
10
core/lib/Thelia/Model/ImportI18n.php
Normal file
10
core/lib/Thelia/Model/ImportI18n.php
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Thelia\Model;
|
||||||
|
|
||||||
|
use Thelia\Model\Base\ImportI18n as BaseImportI18n;
|
||||||
|
|
||||||
|
class ImportI18n extends BaseImportI18n
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
21
core/lib/Thelia/Model/ImportI18nQuery.php
Normal file
21
core/lib/Thelia/Model/ImportI18nQuery.php
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Thelia\Model;
|
||||||
|
|
||||||
|
use Thelia\Model\Base\ImportI18nQuery as BaseImportI18nQuery;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Skeleton subclass for performing query and update operations on the 'import_i18n' table.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* You should add additional methods to this class to meet the
|
||||||
|
* application requirements. This class will only be generated as
|
||||||
|
* long as it does not already exist in the output directory.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
class ImportI18nQuery extends BaseImportI18nQuery
|
||||||
|
{
|
||||||
|
|
||||||
|
} // ImportI18nQuery
|
||||||
21
core/lib/Thelia/Model/ImportQuery.php
Normal file
21
core/lib/Thelia/Model/ImportQuery.php
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Thelia\Model;
|
||||||
|
|
||||||
|
use Thelia\Model\Base\ImportQuery as BaseImportQuery;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Skeleton subclass for performing query and update operations on the 'import' table.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* You should add additional methods to this class to meet the
|
||||||
|
* application requirements. This class will only be generated as
|
||||||
|
* long as it does not already exist in the output directory.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
class ImportQuery extends BaseImportQuery
|
||||||
|
{
|
||||||
|
|
||||||
|
} // ImportQuery
|
||||||
474
core/lib/Thelia/Model/Map/ExportCategoryI18nTableMap.php
Normal file
474
core/lib/Thelia/Model/Map/ExportCategoryI18nTableMap.php
Normal file
@@ -0,0 +1,474 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Thelia\Model\Map;
|
||||||
|
|
||||||
|
use Propel\Runtime\Propel;
|
||||||
|
use Propel\Runtime\ActiveQuery\Criteria;
|
||||||
|
use Propel\Runtime\ActiveQuery\InstancePoolTrait;
|
||||||
|
use Propel\Runtime\Connection\ConnectionInterface;
|
||||||
|
use Propel\Runtime\DataFetcher\DataFetcherInterface;
|
||||||
|
use Propel\Runtime\Exception\PropelException;
|
||||||
|
use Propel\Runtime\Map\RelationMap;
|
||||||
|
use Propel\Runtime\Map\TableMap;
|
||||||
|
use Propel\Runtime\Map\TableMapTrait;
|
||||||
|
use Thelia\Model\ExportCategoryI18n;
|
||||||
|
use Thelia\Model\ExportCategoryI18nQuery;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class defines the structure of the 'export_category_i18n' table.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* This map class is used by Propel to do runtime db structure discovery.
|
||||||
|
* For example, the createSelectSql() method checks the type of a given column used in an
|
||||||
|
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
|
||||||
|
* (i.e. if it's a text column type).
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
class ExportCategoryI18nTableMap extends TableMap
|
||||||
|
{
|
||||||
|
use InstancePoolTrait;
|
||||||
|
use TableMapTrait;
|
||||||
|
/**
|
||||||
|
* The (dot-path) name of this class
|
||||||
|
*/
|
||||||
|
const CLASS_NAME = 'Thelia.Model.Map.ExportCategoryI18nTableMap';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The default database name for this class
|
||||||
|
*/
|
||||||
|
const DATABASE_NAME = 'thelia';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table name for this class
|
||||||
|
*/
|
||||||
|
const TABLE_NAME = 'export_category_i18n';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The related Propel class for this table
|
||||||
|
*/
|
||||||
|
const OM_CLASS = '\\Thelia\\Model\\ExportCategoryI18n';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A class that can be returned by this tableMap
|
||||||
|
*/
|
||||||
|
const CLASS_DEFAULT = 'Thelia.Model.ExportCategoryI18n';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The total number of columns
|
||||||
|
*/
|
||||||
|
const NUM_COLUMNS = 3;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The number of lazy-loaded columns
|
||||||
|
*/
|
||||||
|
const NUM_LAZY_LOAD_COLUMNS = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS)
|
||||||
|
*/
|
||||||
|
const NUM_HYDRATE_COLUMNS = 3;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the column name for the ID field
|
||||||
|
*/
|
||||||
|
const ID = 'export_category_i18n.ID';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the column name for the LOCALE field
|
||||||
|
*/
|
||||||
|
const LOCALE = 'export_category_i18n.LOCALE';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the column name for the TITLE field
|
||||||
|
*/
|
||||||
|
const TITLE = 'export_category_i18n.TITLE';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The default string format for model objects of the related table
|
||||||
|
*/
|
||||||
|
const DEFAULT_STRING_FORMAT = 'YAML';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* holds an array of fieldnames
|
||||||
|
*
|
||||||
|
* first dimension keys are the type constants
|
||||||
|
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||||
|
*/
|
||||||
|
protected static $fieldNames = array (
|
||||||
|
self::TYPE_PHPNAME => array('Id', 'Locale', 'Title', ),
|
||||||
|
self::TYPE_STUDLYPHPNAME => array('id', 'locale', 'title', ),
|
||||||
|
self::TYPE_COLNAME => array(ExportCategoryI18nTableMap::ID, ExportCategoryI18nTableMap::LOCALE, ExportCategoryI18nTableMap::TITLE, ),
|
||||||
|
self::TYPE_RAW_COLNAME => array('ID', 'LOCALE', 'TITLE', ),
|
||||||
|
self::TYPE_FIELDNAME => array('id', 'locale', 'title', ),
|
||||||
|
self::TYPE_NUM => array(0, 1, 2, )
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* holds an array of keys for quick access to the fieldnames array
|
||||||
|
*
|
||||||
|
* first dimension keys are the type constants
|
||||||
|
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
|
||||||
|
*/
|
||||||
|
protected static $fieldKeys = array (
|
||||||
|
self::TYPE_PHPNAME => array('Id' => 0, 'Locale' => 1, 'Title' => 2, ),
|
||||||
|
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'locale' => 1, 'title' => 2, ),
|
||||||
|
self::TYPE_COLNAME => array(ExportCategoryI18nTableMap::ID => 0, ExportCategoryI18nTableMap::LOCALE => 1, ExportCategoryI18nTableMap::TITLE => 2, ),
|
||||||
|
self::TYPE_RAW_COLNAME => array('ID' => 0, 'LOCALE' => 1, 'TITLE' => 2, ),
|
||||||
|
self::TYPE_FIELDNAME => array('id' => 0, 'locale' => 1, 'title' => 2, ),
|
||||||
|
self::TYPE_NUM => array(0, 1, 2, )
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialize the table attributes and columns
|
||||||
|
* Relations are not initialized by this method since they are lazy loaded
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
* @throws PropelException
|
||||||
|
*/
|
||||||
|
public function initialize()
|
||||||
|
{
|
||||||
|
// attributes
|
||||||
|
$this->setName('export_category_i18n');
|
||||||
|
$this->setPhpName('ExportCategoryI18n');
|
||||||
|
$this->setClassName('\\Thelia\\Model\\ExportCategoryI18n');
|
||||||
|
$this->setPackage('Thelia.Model');
|
||||||
|
$this->setUseIdGenerator(false);
|
||||||
|
// columns
|
||||||
|
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'export_category', 'ID', true, null, null);
|
||||||
|
$this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_US');
|
||||||
|
$this->addColumn('TITLE', 'Title', 'VARCHAR', true, 255, null);
|
||||||
|
} // initialize()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Build the RelationMap objects for this table relationships
|
||||||
|
*/
|
||||||
|
public function buildRelations()
|
||||||
|
{
|
||||||
|
$this->addRelation('ExportCategory', '\\Thelia\\Model\\ExportCategory', RelationMap::MANY_TO_ONE, array('id' => 'id', ), 'CASCADE', null);
|
||||||
|
} // buildRelations()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds an object to the instance pool.
|
||||||
|
*
|
||||||
|
* Propel keeps cached copies of objects in an instance pool when they are retrieved
|
||||||
|
* from the database. In some cases you may need to explicitly add objects
|
||||||
|
* to the cache in order to ensure that the same objects are always returned by find*()
|
||||||
|
* and findPk*() calls.
|
||||||
|
*
|
||||||
|
* @param \Thelia\Model\ExportCategoryI18n $obj A \Thelia\Model\ExportCategoryI18n object.
|
||||||
|
* @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally).
|
||||||
|
*/
|
||||||
|
public static function addInstanceToPool($obj, $key = null)
|
||||||
|
{
|
||||||
|
if (Propel::isInstancePoolingEnabled()) {
|
||||||
|
if (null === $key) {
|
||||||
|
$key = serialize(array((string) $obj->getId(), (string) $obj->getLocale()));
|
||||||
|
} // if key === null
|
||||||
|
self::$instances[$key] = $obj;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes an object from the instance pool.
|
||||||
|
*
|
||||||
|
* Propel keeps cached copies of objects in an instance pool when they are retrieved
|
||||||
|
* from the database. In some cases -- especially when you override doDelete
|
||||||
|
* methods in your stub classes -- you may need to explicitly remove objects
|
||||||
|
* from the cache in order to prevent returning objects that no longer exist.
|
||||||
|
*
|
||||||
|
* @param mixed $value A \Thelia\Model\ExportCategoryI18n object or a primary key value.
|
||||||
|
*/
|
||||||
|
public static function removeInstanceFromPool($value)
|
||||||
|
{
|
||||||
|
if (Propel::isInstancePoolingEnabled() && null !== $value) {
|
||||||
|
if (is_object($value) && $value instanceof \Thelia\Model\ExportCategoryI18n) {
|
||||||
|
$key = serialize(array((string) $value->getId(), (string) $value->getLocale()));
|
||||||
|
|
||||||
|
} elseif (is_array($value) && count($value) === 2) {
|
||||||
|
// assume we've been passed a primary key";
|
||||||
|
$key = serialize(array((string) $value[0], (string) $value[1]));
|
||||||
|
} elseif ($value instanceof Criteria) {
|
||||||
|
self::$instances = [];
|
||||||
|
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
$e = new PropelException("Invalid value passed to removeInstanceFromPool(). Expected primary key or \Thelia\Model\ExportCategoryI18n object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value, true)));
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
|
|
||||||
|
unset(self::$instances[$key]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table.
|
||||||
|
*
|
||||||
|
* For tables with a single-column primary key, that simple pkey value will be returned. For tables with
|
||||||
|
* a multi-column primary key, a serialize()d version of the primary key will be returned.
|
||||||
|
*
|
||||||
|
* @param array $row resultset row.
|
||||||
|
* @param int $offset The 0-based offset for reading from the resultset row.
|
||||||
|
* @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME
|
||||||
|
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM
|
||||||
|
*/
|
||||||
|
public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
|
||||||
|
{
|
||||||
|
// If the PK cannot be derived from the row, return NULL.
|
||||||
|
if ($row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)] === null && $row[TableMap::TYPE_NUM == $indexType ? 1 + $offset : static::translateFieldName('Locale', TableMap::TYPE_PHPNAME, $indexType)] === 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 ? 1 + $offset : static::translateFieldName('Locale', TableMap::TYPE_PHPNAME, $indexType)]));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves the primary key from the DB resultset row
|
||||||
|
* For tables with a single-column primary key, that simple pkey value will be returned. For tables with
|
||||||
|
* a multi-column primary key, an array of the primary key columns will be returned.
|
||||||
|
*
|
||||||
|
* @param array $row resultset row.
|
||||||
|
* @param int $offset The 0-based offset for reading from the resultset row.
|
||||||
|
* @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME
|
||||||
|
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM
|
||||||
|
*
|
||||||
|
* @return mixed The primary key of the row
|
||||||
|
*/
|
||||||
|
public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
|
||||||
|
{
|
||||||
|
|
||||||
|
return $pks;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class that the tableMap will make instances of.
|
||||||
|
*
|
||||||
|
* If $withPrefix is true, the returned path
|
||||||
|
* uses a dot-path notation which is translated into a path
|
||||||
|
* relative to a location on the PHP include_path.
|
||||||
|
* (e.g. path.to.MyClass -> 'path/to/MyClass.php')
|
||||||
|
*
|
||||||
|
* @param boolean $withPrefix Whether or not to return the path with the class name
|
||||||
|
* @return string path.to.ClassName
|
||||||
|
*/
|
||||||
|
public static function getOMClass($withPrefix = true)
|
||||||
|
{
|
||||||
|
return $withPrefix ? ExportCategoryI18nTableMap::CLASS_DEFAULT : ExportCategoryI18nTableMap::OM_CLASS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Populates an object of the default type or an object that inherit from the default.
|
||||||
|
*
|
||||||
|
* @param array $row row returned by DataFetcher->fetch().
|
||||||
|
* @param int $offset The 0-based offset for reading from the resultset row.
|
||||||
|
* @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType().
|
||||||
|
One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME
|
||||||
|
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
|
||||||
|
*
|
||||||
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
|
* rethrown wrapped into a PropelException.
|
||||||
|
* @return array (ExportCategoryI18n object, last column rank)
|
||||||
|
*/
|
||||||
|
public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
|
||||||
|
{
|
||||||
|
$key = ExportCategoryI18nTableMap::getPrimaryKeyHashFromRow($row, $offset, $indexType);
|
||||||
|
if (null !== ($obj = ExportCategoryI18nTableMap::getInstanceFromPool($key))) {
|
||||||
|
// We no longer rehydrate the object, since this can cause data loss.
|
||||||
|
// See http://www.propelorm.org/ticket/509
|
||||||
|
// $obj->hydrate($row, $offset, true); // rehydrate
|
||||||
|
$col = $offset + ExportCategoryI18nTableMap::NUM_HYDRATE_COLUMNS;
|
||||||
|
} else {
|
||||||
|
$cls = ExportCategoryI18nTableMap::OM_CLASS;
|
||||||
|
$obj = new $cls();
|
||||||
|
$col = $obj->hydrate($row, $offset, false, $indexType);
|
||||||
|
ExportCategoryI18nTableMap::addInstanceToPool($obj, $key);
|
||||||
|
}
|
||||||
|
|
||||||
|
return array($obj, $col);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The returned array will contain objects of the default type or
|
||||||
|
* objects that inherit from the default.
|
||||||
|
*
|
||||||
|
* @param DataFetcherInterface $dataFetcher
|
||||||
|
* @return array
|
||||||
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
|
* rethrown wrapped into a PropelException.
|
||||||
|
*/
|
||||||
|
public static function populateObjects(DataFetcherInterface $dataFetcher)
|
||||||
|
{
|
||||||
|
$results = array();
|
||||||
|
|
||||||
|
// set the class once to avoid overhead in the loop
|
||||||
|
$cls = static::getOMClass(false);
|
||||||
|
// populate the object(s)
|
||||||
|
while ($row = $dataFetcher->fetch()) {
|
||||||
|
$key = ExportCategoryI18nTableMap::getPrimaryKeyHashFromRow($row, 0, $dataFetcher->getIndexType());
|
||||||
|
if (null !== ($obj = ExportCategoryI18nTableMap::getInstanceFromPool($key))) {
|
||||||
|
// We no longer rehydrate the object, since this can cause data loss.
|
||||||
|
// See http://www.propelorm.org/ticket/509
|
||||||
|
// $obj->hydrate($row, 0, true); // rehydrate
|
||||||
|
$results[] = $obj;
|
||||||
|
} else {
|
||||||
|
$obj = new $cls();
|
||||||
|
$obj->hydrate($row);
|
||||||
|
$results[] = $obj;
|
||||||
|
ExportCategoryI18nTableMap::addInstanceToPool($obj, $key);
|
||||||
|
} // if key exists
|
||||||
|
}
|
||||||
|
|
||||||
|
return $results;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Add all the columns needed to create a new object.
|
||||||
|
*
|
||||||
|
* Note: any columns that were marked with lazyLoad="true" in the
|
||||||
|
* XML schema will not be added to the select list and only loaded
|
||||||
|
* on demand.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria object containing the columns to add.
|
||||||
|
* @param string $alias optional table alias
|
||||||
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
|
* rethrown wrapped into a PropelException.
|
||||||
|
*/
|
||||||
|
public static function addSelectColumns(Criteria $criteria, $alias = null)
|
||||||
|
{
|
||||||
|
if (null === $alias) {
|
||||||
|
$criteria->addSelectColumn(ExportCategoryI18nTableMap::ID);
|
||||||
|
$criteria->addSelectColumn(ExportCategoryI18nTableMap::LOCALE);
|
||||||
|
$criteria->addSelectColumn(ExportCategoryI18nTableMap::TITLE);
|
||||||
|
} else {
|
||||||
|
$criteria->addSelectColumn($alias . '.ID');
|
||||||
|
$criteria->addSelectColumn($alias . '.LOCALE');
|
||||||
|
$criteria->addSelectColumn($alias . '.TITLE');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the TableMap related to this object.
|
||||||
|
* This method is not needed for general use but a specific application could have a need.
|
||||||
|
* @return TableMap
|
||||||
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
|
* rethrown wrapped into a PropelException.
|
||||||
|
*/
|
||||||
|
public static function getTableMap()
|
||||||
|
{
|
||||||
|
return Propel::getServiceContainer()->getDatabaseMap(ExportCategoryI18nTableMap::DATABASE_NAME)->getTable(ExportCategoryI18nTableMap::TABLE_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a TableMap instance to the database for this tableMap class.
|
||||||
|
*/
|
||||||
|
public static function buildTableMap()
|
||||||
|
{
|
||||||
|
$dbMap = Propel::getServiceContainer()->getDatabaseMap(ExportCategoryI18nTableMap::DATABASE_NAME);
|
||||||
|
if (!$dbMap->hasTable(ExportCategoryI18nTableMap::TABLE_NAME)) {
|
||||||
|
$dbMap->addTableObject(new ExportCategoryI18nTableMap());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Performs a DELETE on the database, given a ExportCategoryI18n or Criteria object OR a primary key value.
|
||||||
|
*
|
||||||
|
* @param mixed $values Criteria or ExportCategoryI18n object or primary key or array of primary keys
|
||||||
|
* which is used to create the DELETE statement
|
||||||
|
* @param ConnectionInterface $con the connection to use
|
||||||
|
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
|
||||||
|
* if supported by native driver or if emulated using Propel.
|
||||||
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
|
* rethrown wrapped into a PropelException.
|
||||||
|
*/
|
||||||
|
public static function doDelete($values, ConnectionInterface $con = null)
|
||||||
|
{
|
||||||
|
if (null === $con) {
|
||||||
|
$con = Propel::getServiceContainer()->getWriteConnection(ExportCategoryI18nTableMap::DATABASE_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($values instanceof Criteria) {
|
||||||
|
// rename for clarity
|
||||||
|
$criteria = $values;
|
||||||
|
} elseif ($values instanceof \Thelia\Model\ExportCategoryI18n) { // it's a model object
|
||||||
|
// create criteria based on pk values
|
||||||
|
$criteria = $values->buildPkeyCriteria();
|
||||||
|
} else { // it's a primary key, or an array of pks
|
||||||
|
$criteria = new Criteria(ExportCategoryI18nTableMap::DATABASE_NAME);
|
||||||
|
// primary key is composite; we therefore, expect
|
||||||
|
// the primary key passed to be an array of pkey values
|
||||||
|
if (count($values) == count($values, COUNT_RECURSIVE)) {
|
||||||
|
// array is not multi-dimensional
|
||||||
|
$values = array($values);
|
||||||
|
}
|
||||||
|
foreach ($values as $value) {
|
||||||
|
$criterion = $criteria->getNewCriterion(ExportCategoryI18nTableMap::ID, $value[0]);
|
||||||
|
$criterion->addAnd($criteria->getNewCriterion(ExportCategoryI18nTableMap::LOCALE, $value[1]));
|
||||||
|
$criteria->addOr($criterion);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$query = ExportCategoryI18nQuery::create()->mergeWith($criteria);
|
||||||
|
|
||||||
|
if ($values instanceof Criteria) { ExportCategoryI18nTableMap::clearInstancePool();
|
||||||
|
} elseif (!is_object($values)) { // it's a primary key, or an array of pks
|
||||||
|
foreach ((array) $values as $singleval) { ExportCategoryI18nTableMap::removeInstanceFromPool($singleval);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $query->delete($con);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deletes all rows from the export_category_i18n table.
|
||||||
|
*
|
||||||
|
* @param ConnectionInterface $con the connection to use
|
||||||
|
* @return int The number of affected rows (if supported by underlying database driver).
|
||||||
|
*/
|
||||||
|
public static function doDeleteAll(ConnectionInterface $con = null)
|
||||||
|
{
|
||||||
|
return ExportCategoryI18nQuery::create()->doDeleteAll($con);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Performs an INSERT on the database, given a ExportCategoryI18n or Criteria object.
|
||||||
|
*
|
||||||
|
* @param mixed $criteria Criteria or ExportCategoryI18n object containing data that is used to create the INSERT statement.
|
||||||
|
* @param ConnectionInterface $con the ConnectionInterface connection to use
|
||||||
|
* @return mixed The new primary key.
|
||||||
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
|
* rethrown wrapped into a PropelException.
|
||||||
|
*/
|
||||||
|
public static function doInsert($criteria, ConnectionInterface $con = null)
|
||||||
|
{
|
||||||
|
if (null === $con) {
|
||||||
|
$con = Propel::getServiceContainer()->getWriteConnection(ExportCategoryI18nTableMap::DATABASE_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($criteria instanceof Criteria) {
|
||||||
|
$criteria = clone $criteria; // rename for clarity
|
||||||
|
} else {
|
||||||
|
$criteria = $criteria->buildCriteria(); // build Criteria from ExportCategoryI18n object
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Set the correct dbName
|
||||||
|
$query = ExportCategoryI18nQuery::create()->mergeWith($criteria);
|
||||||
|
|
||||||
|
try {
|
||||||
|
// use transaction because $criteria could contain info
|
||||||
|
// for more than one table (I guess, conceivably)
|
||||||
|
$con->beginTransaction();
|
||||||
|
$pk = $query->doInsert($con);
|
||||||
|
$con->commit();
|
||||||
|
} catch (PropelException $e) {
|
||||||
|
$con->rollBack();
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $pk;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // ExportCategoryI18nTableMap
|
||||||
|
// This is the static code needed to register the TableMap for this table with the main Propel class.
|
||||||
|
//
|
||||||
|
ExportCategoryI18nTableMap::buildTableMap();
|
||||||
461
core/lib/Thelia/Model/Map/ExportCategoryTableMap.php
Normal file
461
core/lib/Thelia/Model/Map/ExportCategoryTableMap.php
Normal file
@@ -0,0 +1,461 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Thelia\Model\Map;
|
||||||
|
|
||||||
|
use Propel\Runtime\Propel;
|
||||||
|
use Propel\Runtime\ActiveQuery\Criteria;
|
||||||
|
use Propel\Runtime\ActiveQuery\InstancePoolTrait;
|
||||||
|
use Propel\Runtime\Connection\ConnectionInterface;
|
||||||
|
use Propel\Runtime\DataFetcher\DataFetcherInterface;
|
||||||
|
use Propel\Runtime\Exception\PropelException;
|
||||||
|
use Propel\Runtime\Map\RelationMap;
|
||||||
|
use Propel\Runtime\Map\TableMap;
|
||||||
|
use Propel\Runtime\Map\TableMapTrait;
|
||||||
|
use Thelia\Model\ExportCategory;
|
||||||
|
use Thelia\Model\ExportCategoryQuery;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class defines the structure of the 'export_category' table.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* This map class is used by Propel to do runtime db structure discovery.
|
||||||
|
* For example, the createSelectSql() method checks the type of a given column used in an
|
||||||
|
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
|
||||||
|
* (i.e. if it's a text column type).
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
class ExportCategoryTableMap extends TableMap
|
||||||
|
{
|
||||||
|
use InstancePoolTrait;
|
||||||
|
use TableMapTrait;
|
||||||
|
/**
|
||||||
|
* The (dot-path) name of this class
|
||||||
|
*/
|
||||||
|
const CLASS_NAME = 'Thelia.Model.Map.ExportCategoryTableMap';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The default database name for this class
|
||||||
|
*/
|
||||||
|
const DATABASE_NAME = 'thelia';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table name for this class
|
||||||
|
*/
|
||||||
|
const TABLE_NAME = 'export_category';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The related Propel class for this table
|
||||||
|
*/
|
||||||
|
const OM_CLASS = '\\Thelia\\Model\\ExportCategory';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A class that can be returned by this tableMap
|
||||||
|
*/
|
||||||
|
const CLASS_DEFAULT = 'Thelia.Model.ExportCategory';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The total number of columns
|
||||||
|
*/
|
||||||
|
const NUM_COLUMNS = 4;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The number of lazy-loaded columns
|
||||||
|
*/
|
||||||
|
const NUM_LAZY_LOAD_COLUMNS = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS)
|
||||||
|
*/
|
||||||
|
const NUM_HYDRATE_COLUMNS = 4;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the column name for the ID field
|
||||||
|
*/
|
||||||
|
const ID = 'export_category.ID';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the column name for the POSITION field
|
||||||
|
*/
|
||||||
|
const POSITION = 'export_category.POSITION';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the column name for the CREATED_AT field
|
||||||
|
*/
|
||||||
|
const CREATED_AT = 'export_category.CREATED_AT';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the column name for the UPDATED_AT field
|
||||||
|
*/
|
||||||
|
const UPDATED_AT = 'export_category.UPDATED_AT';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The default string format for model objects of the related table
|
||||||
|
*/
|
||||||
|
const DEFAULT_STRING_FORMAT = 'YAML';
|
||||||
|
|
||||||
|
// i18n behavior
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The default locale to use for translations.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
const DEFAULT_LOCALE = 'en_US';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* holds an array of fieldnames
|
||||||
|
*
|
||||||
|
* first dimension keys are the type constants
|
||||||
|
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||||
|
*/
|
||||||
|
protected static $fieldNames = array (
|
||||||
|
self::TYPE_PHPNAME => array('Id', 'Position', 'CreatedAt', 'UpdatedAt', ),
|
||||||
|
self::TYPE_STUDLYPHPNAME => array('id', 'position', 'createdAt', 'updatedAt', ),
|
||||||
|
self::TYPE_COLNAME => array(ExportCategoryTableMap::ID, ExportCategoryTableMap::POSITION, ExportCategoryTableMap::CREATED_AT, ExportCategoryTableMap::UPDATED_AT, ),
|
||||||
|
self::TYPE_RAW_COLNAME => array('ID', 'POSITION', 'CREATED_AT', 'UPDATED_AT', ),
|
||||||
|
self::TYPE_FIELDNAME => array('id', 'position', 'created_at', 'updated_at', ),
|
||||||
|
self::TYPE_NUM => array(0, 1, 2, 3, )
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* holds an array of keys for quick access to the fieldnames array
|
||||||
|
*
|
||||||
|
* first dimension keys are the type constants
|
||||||
|
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
|
||||||
|
*/
|
||||||
|
protected static $fieldKeys = array (
|
||||||
|
self::TYPE_PHPNAME => array('Id' => 0, 'Position' => 1, 'CreatedAt' => 2, 'UpdatedAt' => 3, ),
|
||||||
|
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'position' => 1, 'createdAt' => 2, 'updatedAt' => 3, ),
|
||||||
|
self::TYPE_COLNAME => array(ExportCategoryTableMap::ID => 0, ExportCategoryTableMap::POSITION => 1, ExportCategoryTableMap::CREATED_AT => 2, ExportCategoryTableMap::UPDATED_AT => 3, ),
|
||||||
|
self::TYPE_RAW_COLNAME => array('ID' => 0, 'POSITION' => 1, 'CREATED_AT' => 2, 'UPDATED_AT' => 3, ),
|
||||||
|
self::TYPE_FIELDNAME => array('id' => 0, 'position' => 1, 'created_at' => 2, 'updated_at' => 3, ),
|
||||||
|
self::TYPE_NUM => array(0, 1, 2, 3, )
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialize the table attributes and columns
|
||||||
|
* Relations are not initialized by this method since they are lazy loaded
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
* @throws PropelException
|
||||||
|
*/
|
||||||
|
public function initialize()
|
||||||
|
{
|
||||||
|
// attributes
|
||||||
|
$this->setName('export_category');
|
||||||
|
$this->setPhpName('ExportCategory');
|
||||||
|
$this->setClassName('\\Thelia\\Model\\ExportCategory');
|
||||||
|
$this->setPackage('Thelia.Model');
|
||||||
|
$this->setUseIdGenerator(true);
|
||||||
|
// columns
|
||||||
|
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
|
||||||
|
$this->addColumn('POSITION', 'Position', 'INTEGER', true, null, null);
|
||||||
|
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
|
||||||
|
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
|
||||||
|
} // initialize()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Build the RelationMap objects for this table relationships
|
||||||
|
*/
|
||||||
|
public function buildRelations()
|
||||||
|
{
|
||||||
|
$this->addRelation('Export', '\\Thelia\\Model\\Export', RelationMap::ONE_TO_MANY, array('id' => 'export_category_id', ), 'CASCADE', 'RESTRICT', 'Exports');
|
||||||
|
$this->addRelation('ExportCategoryI18n', '\\Thelia\\Model\\ExportCategoryI18n', RelationMap::ONE_TO_MANY, array('id' => 'id', ), 'CASCADE', null, 'ExportCategoryI18ns');
|
||||||
|
} // buildRelations()
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Gets the list of behaviors registered for this table
|
||||||
|
*
|
||||||
|
* @return array Associative array (name => parameters) of behaviors
|
||||||
|
*/
|
||||||
|
public function getBehaviors()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
'i18n' => array('i18n_table' => '%TABLE%_i18n', 'i18n_phpname' => '%PHPNAME%I18n', 'i18n_columns' => 'title', 'locale_column' => 'locale', 'locale_length' => '5', 'default_locale' => '', 'locale_alias' => '', ),
|
||||||
|
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', ),
|
||||||
|
);
|
||||||
|
} // getBehaviors()
|
||||||
|
/**
|
||||||
|
* Method to invalidate the instance pool of all tables related to export_category * by a foreign key with ON DELETE CASCADE
|
||||||
|
*/
|
||||||
|
public static function clearRelatedInstancePool()
|
||||||
|
{
|
||||||
|
// Invalidate objects in ".$this->getClassNameFromBuilder($joinedTableTableMapBuilder)." instance pool,
|
||||||
|
// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
|
||||||
|
ExportTableMap::clearInstancePool();
|
||||||
|
ExportCategoryI18nTableMap::clearInstancePool();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table.
|
||||||
|
*
|
||||||
|
* For tables with a single-column primary key, that simple pkey value will be returned. For tables with
|
||||||
|
* a multi-column primary key, a serialize()d version of the primary key will be returned.
|
||||||
|
*
|
||||||
|
* @param array $row resultset row.
|
||||||
|
* @param int $offset The 0-based offset for reading from the resultset row.
|
||||||
|
* @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME
|
||||||
|
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM
|
||||||
|
*/
|
||||||
|
public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
|
||||||
|
{
|
||||||
|
// If the PK cannot be derived from the row, return NULL.
|
||||||
|
if ($row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)] === null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (string) $row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves the primary key from the DB resultset row
|
||||||
|
* For tables with a single-column primary key, that simple pkey value will be returned. For tables with
|
||||||
|
* a multi-column primary key, an array of the primary key columns will be returned.
|
||||||
|
*
|
||||||
|
* @param array $row resultset row.
|
||||||
|
* @param int $offset The 0-based offset for reading from the resultset row.
|
||||||
|
* @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME
|
||||||
|
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM
|
||||||
|
*
|
||||||
|
* @return mixed The primary key of the row
|
||||||
|
*/
|
||||||
|
public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
|
||||||
|
{
|
||||||
|
|
||||||
|
return (int) $row[
|
||||||
|
$indexType == TableMap::TYPE_NUM
|
||||||
|
? 0 + $offset
|
||||||
|
: self::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class that the tableMap will make instances of.
|
||||||
|
*
|
||||||
|
* If $withPrefix is true, the returned path
|
||||||
|
* uses a dot-path notation which is translated into a path
|
||||||
|
* relative to a location on the PHP include_path.
|
||||||
|
* (e.g. path.to.MyClass -> 'path/to/MyClass.php')
|
||||||
|
*
|
||||||
|
* @param boolean $withPrefix Whether or not to return the path with the class name
|
||||||
|
* @return string path.to.ClassName
|
||||||
|
*/
|
||||||
|
public static function getOMClass($withPrefix = true)
|
||||||
|
{
|
||||||
|
return $withPrefix ? ExportCategoryTableMap::CLASS_DEFAULT : ExportCategoryTableMap::OM_CLASS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Populates an object of the default type or an object that inherit from the default.
|
||||||
|
*
|
||||||
|
* @param array $row row returned by DataFetcher->fetch().
|
||||||
|
* @param int $offset The 0-based offset for reading from the resultset row.
|
||||||
|
* @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType().
|
||||||
|
One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME
|
||||||
|
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
|
||||||
|
*
|
||||||
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
|
* rethrown wrapped into a PropelException.
|
||||||
|
* @return array (ExportCategory object, last column rank)
|
||||||
|
*/
|
||||||
|
public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
|
||||||
|
{
|
||||||
|
$key = ExportCategoryTableMap::getPrimaryKeyHashFromRow($row, $offset, $indexType);
|
||||||
|
if (null !== ($obj = ExportCategoryTableMap::getInstanceFromPool($key))) {
|
||||||
|
// We no longer rehydrate the object, since this can cause data loss.
|
||||||
|
// See http://www.propelorm.org/ticket/509
|
||||||
|
// $obj->hydrate($row, $offset, true); // rehydrate
|
||||||
|
$col = $offset + ExportCategoryTableMap::NUM_HYDRATE_COLUMNS;
|
||||||
|
} else {
|
||||||
|
$cls = ExportCategoryTableMap::OM_CLASS;
|
||||||
|
$obj = new $cls();
|
||||||
|
$col = $obj->hydrate($row, $offset, false, $indexType);
|
||||||
|
ExportCategoryTableMap::addInstanceToPool($obj, $key);
|
||||||
|
}
|
||||||
|
|
||||||
|
return array($obj, $col);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The returned array will contain objects of the default type or
|
||||||
|
* objects that inherit from the default.
|
||||||
|
*
|
||||||
|
* @param DataFetcherInterface $dataFetcher
|
||||||
|
* @return array
|
||||||
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
|
* rethrown wrapped into a PropelException.
|
||||||
|
*/
|
||||||
|
public static function populateObjects(DataFetcherInterface $dataFetcher)
|
||||||
|
{
|
||||||
|
$results = array();
|
||||||
|
|
||||||
|
// set the class once to avoid overhead in the loop
|
||||||
|
$cls = static::getOMClass(false);
|
||||||
|
// populate the object(s)
|
||||||
|
while ($row = $dataFetcher->fetch()) {
|
||||||
|
$key = ExportCategoryTableMap::getPrimaryKeyHashFromRow($row, 0, $dataFetcher->getIndexType());
|
||||||
|
if (null !== ($obj = ExportCategoryTableMap::getInstanceFromPool($key))) {
|
||||||
|
// We no longer rehydrate the object, since this can cause data loss.
|
||||||
|
// See http://www.propelorm.org/ticket/509
|
||||||
|
// $obj->hydrate($row, 0, true); // rehydrate
|
||||||
|
$results[] = $obj;
|
||||||
|
} else {
|
||||||
|
$obj = new $cls();
|
||||||
|
$obj->hydrate($row);
|
||||||
|
$results[] = $obj;
|
||||||
|
ExportCategoryTableMap::addInstanceToPool($obj, $key);
|
||||||
|
} // if key exists
|
||||||
|
}
|
||||||
|
|
||||||
|
return $results;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Add all the columns needed to create a new object.
|
||||||
|
*
|
||||||
|
* Note: any columns that were marked with lazyLoad="true" in the
|
||||||
|
* XML schema will not be added to the select list and only loaded
|
||||||
|
* on demand.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria object containing the columns to add.
|
||||||
|
* @param string $alias optional table alias
|
||||||
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
|
* rethrown wrapped into a PropelException.
|
||||||
|
*/
|
||||||
|
public static function addSelectColumns(Criteria $criteria, $alias = null)
|
||||||
|
{
|
||||||
|
if (null === $alias) {
|
||||||
|
$criteria->addSelectColumn(ExportCategoryTableMap::ID);
|
||||||
|
$criteria->addSelectColumn(ExportCategoryTableMap::POSITION);
|
||||||
|
$criteria->addSelectColumn(ExportCategoryTableMap::CREATED_AT);
|
||||||
|
$criteria->addSelectColumn(ExportCategoryTableMap::UPDATED_AT);
|
||||||
|
} else {
|
||||||
|
$criteria->addSelectColumn($alias . '.ID');
|
||||||
|
$criteria->addSelectColumn($alias . '.POSITION');
|
||||||
|
$criteria->addSelectColumn($alias . '.CREATED_AT');
|
||||||
|
$criteria->addSelectColumn($alias . '.UPDATED_AT');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the TableMap related to this object.
|
||||||
|
* This method is not needed for general use but a specific application could have a need.
|
||||||
|
* @return TableMap
|
||||||
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
|
* rethrown wrapped into a PropelException.
|
||||||
|
*/
|
||||||
|
public static function getTableMap()
|
||||||
|
{
|
||||||
|
return Propel::getServiceContainer()->getDatabaseMap(ExportCategoryTableMap::DATABASE_NAME)->getTable(ExportCategoryTableMap::TABLE_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a TableMap instance to the database for this tableMap class.
|
||||||
|
*/
|
||||||
|
public static function buildTableMap()
|
||||||
|
{
|
||||||
|
$dbMap = Propel::getServiceContainer()->getDatabaseMap(ExportCategoryTableMap::DATABASE_NAME);
|
||||||
|
if (!$dbMap->hasTable(ExportCategoryTableMap::TABLE_NAME)) {
|
||||||
|
$dbMap->addTableObject(new ExportCategoryTableMap());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Performs a DELETE on the database, given a ExportCategory or Criteria object OR a primary key value.
|
||||||
|
*
|
||||||
|
* @param mixed $values Criteria or ExportCategory object or primary key or array of primary keys
|
||||||
|
* which is used to create the DELETE statement
|
||||||
|
* @param ConnectionInterface $con the connection to use
|
||||||
|
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
|
||||||
|
* if supported by native driver or if emulated using Propel.
|
||||||
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
|
* rethrown wrapped into a PropelException.
|
||||||
|
*/
|
||||||
|
public static function doDelete($values, ConnectionInterface $con = null)
|
||||||
|
{
|
||||||
|
if (null === $con) {
|
||||||
|
$con = Propel::getServiceContainer()->getWriteConnection(ExportCategoryTableMap::DATABASE_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($values instanceof Criteria) {
|
||||||
|
// rename for clarity
|
||||||
|
$criteria = $values;
|
||||||
|
} elseif ($values instanceof \Thelia\Model\ExportCategory) { // it's a model object
|
||||||
|
// create criteria based on pk values
|
||||||
|
$criteria = $values->buildPkeyCriteria();
|
||||||
|
} else { // it's a primary key, or an array of pks
|
||||||
|
$criteria = new Criteria(ExportCategoryTableMap::DATABASE_NAME);
|
||||||
|
$criteria->add(ExportCategoryTableMap::ID, (array) $values, Criteria::IN);
|
||||||
|
}
|
||||||
|
|
||||||
|
$query = ExportCategoryQuery::create()->mergeWith($criteria);
|
||||||
|
|
||||||
|
if ($values instanceof Criteria) { ExportCategoryTableMap::clearInstancePool();
|
||||||
|
} elseif (!is_object($values)) { // it's a primary key, or an array of pks
|
||||||
|
foreach ((array) $values as $singleval) { ExportCategoryTableMap::removeInstanceFromPool($singleval);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $query->delete($con);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deletes all rows from the export_category table.
|
||||||
|
*
|
||||||
|
* @param ConnectionInterface $con the connection to use
|
||||||
|
* @return int The number of affected rows (if supported by underlying database driver).
|
||||||
|
*/
|
||||||
|
public static function doDeleteAll(ConnectionInterface $con = null)
|
||||||
|
{
|
||||||
|
return ExportCategoryQuery::create()->doDeleteAll($con);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Performs an INSERT on the database, given a ExportCategory or Criteria object.
|
||||||
|
*
|
||||||
|
* @param mixed $criteria Criteria or ExportCategory object containing data that is used to create the INSERT statement.
|
||||||
|
* @param ConnectionInterface $con the ConnectionInterface connection to use
|
||||||
|
* @return mixed The new primary key.
|
||||||
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
|
* rethrown wrapped into a PropelException.
|
||||||
|
*/
|
||||||
|
public static function doInsert($criteria, ConnectionInterface $con = null)
|
||||||
|
{
|
||||||
|
if (null === $con) {
|
||||||
|
$con = Propel::getServiceContainer()->getWriteConnection(ExportCategoryTableMap::DATABASE_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($criteria instanceof Criteria) {
|
||||||
|
$criteria = clone $criteria; // rename for clarity
|
||||||
|
} else {
|
||||||
|
$criteria = $criteria->buildCriteria(); // build Criteria from ExportCategory object
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($criteria->containsKey(ExportCategoryTableMap::ID) && $criteria->keyContainsValue(ExportCategoryTableMap::ID) ) {
|
||||||
|
throw new PropelException('Cannot insert a value for auto-increment primary key ('.ExportCategoryTableMap::ID.')');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Set the correct dbName
|
||||||
|
$query = ExportCategoryQuery::create()->mergeWith($criteria);
|
||||||
|
|
||||||
|
try {
|
||||||
|
// use transaction because $criteria could contain info
|
||||||
|
// for more than one table (I guess, conceivably)
|
||||||
|
$con->beginTransaction();
|
||||||
|
$pk = $query->doInsert($con);
|
||||||
|
$con->commit();
|
||||||
|
} catch (PropelException $e) {
|
||||||
|
$con->rollBack();
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $pk;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // ExportCategoryTableMap
|
||||||
|
// This is the static code needed to register the TableMap for this table with the main Propel class.
|
||||||
|
//
|
||||||
|
ExportCategoryTableMap::buildTableMap();
|
||||||
482
core/lib/Thelia/Model/Map/ExportI18nTableMap.php
Normal file
482
core/lib/Thelia/Model/Map/ExportI18nTableMap.php
Normal file
@@ -0,0 +1,482 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Thelia\Model\Map;
|
||||||
|
|
||||||
|
use Propel\Runtime\Propel;
|
||||||
|
use Propel\Runtime\ActiveQuery\Criteria;
|
||||||
|
use Propel\Runtime\ActiveQuery\InstancePoolTrait;
|
||||||
|
use Propel\Runtime\Connection\ConnectionInterface;
|
||||||
|
use Propel\Runtime\DataFetcher\DataFetcherInterface;
|
||||||
|
use Propel\Runtime\Exception\PropelException;
|
||||||
|
use Propel\Runtime\Map\RelationMap;
|
||||||
|
use Propel\Runtime\Map\TableMap;
|
||||||
|
use Propel\Runtime\Map\TableMapTrait;
|
||||||
|
use Thelia\Model\ExportI18n;
|
||||||
|
use Thelia\Model\ExportI18nQuery;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class defines the structure of the 'export_i18n' table.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* This map class is used by Propel to do runtime db structure discovery.
|
||||||
|
* For example, the createSelectSql() method checks the type of a given column used in an
|
||||||
|
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
|
||||||
|
* (i.e. if it's a text column type).
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
class ExportI18nTableMap extends TableMap
|
||||||
|
{
|
||||||
|
use InstancePoolTrait;
|
||||||
|
use TableMapTrait;
|
||||||
|
/**
|
||||||
|
* The (dot-path) name of this class
|
||||||
|
*/
|
||||||
|
const CLASS_NAME = 'Thelia.Model.Map.ExportI18nTableMap';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The default database name for this class
|
||||||
|
*/
|
||||||
|
const DATABASE_NAME = 'thelia';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table name for this class
|
||||||
|
*/
|
||||||
|
const TABLE_NAME = 'export_i18n';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The related Propel class for this table
|
||||||
|
*/
|
||||||
|
const OM_CLASS = '\\Thelia\\Model\\ExportI18n';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A class that can be returned by this tableMap
|
||||||
|
*/
|
||||||
|
const CLASS_DEFAULT = 'Thelia.Model.ExportI18n';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The total number of columns
|
||||||
|
*/
|
||||||
|
const NUM_COLUMNS = 4;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The number of lazy-loaded columns
|
||||||
|
*/
|
||||||
|
const NUM_LAZY_LOAD_COLUMNS = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS)
|
||||||
|
*/
|
||||||
|
const NUM_HYDRATE_COLUMNS = 4;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the column name for the ID field
|
||||||
|
*/
|
||||||
|
const ID = 'export_i18n.ID';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the column name for the LOCALE field
|
||||||
|
*/
|
||||||
|
const LOCALE = 'export_i18n.LOCALE';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the column name for the TITLE field
|
||||||
|
*/
|
||||||
|
const TITLE = 'export_i18n.TITLE';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the column name for the DESCRIPTION field
|
||||||
|
*/
|
||||||
|
const DESCRIPTION = 'export_i18n.DESCRIPTION';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The default string format for model objects of the related table
|
||||||
|
*/
|
||||||
|
const DEFAULT_STRING_FORMAT = 'YAML';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* holds an array of fieldnames
|
||||||
|
*
|
||||||
|
* first dimension keys are the type constants
|
||||||
|
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||||
|
*/
|
||||||
|
protected static $fieldNames = array (
|
||||||
|
self::TYPE_PHPNAME => array('Id', 'Locale', 'Title', 'Description', ),
|
||||||
|
self::TYPE_STUDLYPHPNAME => array('id', 'locale', 'title', 'description', ),
|
||||||
|
self::TYPE_COLNAME => array(ExportI18nTableMap::ID, ExportI18nTableMap::LOCALE, ExportI18nTableMap::TITLE, ExportI18nTableMap::DESCRIPTION, ),
|
||||||
|
self::TYPE_RAW_COLNAME => array('ID', 'LOCALE', 'TITLE', 'DESCRIPTION', ),
|
||||||
|
self::TYPE_FIELDNAME => array('id', 'locale', 'title', 'description', ),
|
||||||
|
self::TYPE_NUM => array(0, 1, 2, 3, )
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* holds an array of keys for quick access to the fieldnames array
|
||||||
|
*
|
||||||
|
* first dimension keys are the type constants
|
||||||
|
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
|
||||||
|
*/
|
||||||
|
protected static $fieldKeys = array (
|
||||||
|
self::TYPE_PHPNAME => array('Id' => 0, 'Locale' => 1, 'Title' => 2, 'Description' => 3, ),
|
||||||
|
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'locale' => 1, 'title' => 2, 'description' => 3, ),
|
||||||
|
self::TYPE_COLNAME => array(ExportI18nTableMap::ID => 0, ExportI18nTableMap::LOCALE => 1, ExportI18nTableMap::TITLE => 2, ExportI18nTableMap::DESCRIPTION => 3, ),
|
||||||
|
self::TYPE_RAW_COLNAME => array('ID' => 0, 'LOCALE' => 1, 'TITLE' => 2, 'DESCRIPTION' => 3, ),
|
||||||
|
self::TYPE_FIELDNAME => array('id' => 0, 'locale' => 1, 'title' => 2, 'description' => 3, ),
|
||||||
|
self::TYPE_NUM => array(0, 1, 2, 3, )
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialize the table attributes and columns
|
||||||
|
* Relations are not initialized by this method since they are lazy loaded
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
* @throws PropelException
|
||||||
|
*/
|
||||||
|
public function initialize()
|
||||||
|
{
|
||||||
|
// attributes
|
||||||
|
$this->setName('export_i18n');
|
||||||
|
$this->setPhpName('ExportI18n');
|
||||||
|
$this->setClassName('\\Thelia\\Model\\ExportI18n');
|
||||||
|
$this->setPackage('Thelia.Model');
|
||||||
|
$this->setUseIdGenerator(false);
|
||||||
|
// columns
|
||||||
|
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'export', 'ID', true, null, null);
|
||||||
|
$this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_US');
|
||||||
|
$this->addColumn('TITLE', 'Title', 'VARCHAR', true, 255, null);
|
||||||
|
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
|
||||||
|
} // initialize()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Build the RelationMap objects for this table relationships
|
||||||
|
*/
|
||||||
|
public function buildRelations()
|
||||||
|
{
|
||||||
|
$this->addRelation('Export', '\\Thelia\\Model\\Export', RelationMap::MANY_TO_ONE, array('id' => 'id', ), 'CASCADE', null);
|
||||||
|
} // buildRelations()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds an object to the instance pool.
|
||||||
|
*
|
||||||
|
* Propel keeps cached copies of objects in an instance pool when they are retrieved
|
||||||
|
* from the database. In some cases you may need to explicitly add objects
|
||||||
|
* to the cache in order to ensure that the same objects are always returned by find*()
|
||||||
|
* and findPk*() calls.
|
||||||
|
*
|
||||||
|
* @param \Thelia\Model\ExportI18n $obj A \Thelia\Model\ExportI18n object.
|
||||||
|
* @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally).
|
||||||
|
*/
|
||||||
|
public static function addInstanceToPool($obj, $key = null)
|
||||||
|
{
|
||||||
|
if (Propel::isInstancePoolingEnabled()) {
|
||||||
|
if (null === $key) {
|
||||||
|
$key = serialize(array((string) $obj->getId(), (string) $obj->getLocale()));
|
||||||
|
} // if key === null
|
||||||
|
self::$instances[$key] = $obj;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes an object from the instance pool.
|
||||||
|
*
|
||||||
|
* Propel keeps cached copies of objects in an instance pool when they are retrieved
|
||||||
|
* from the database. In some cases -- especially when you override doDelete
|
||||||
|
* methods in your stub classes -- you may need to explicitly remove objects
|
||||||
|
* from the cache in order to prevent returning objects that no longer exist.
|
||||||
|
*
|
||||||
|
* @param mixed $value A \Thelia\Model\ExportI18n object or a primary key value.
|
||||||
|
*/
|
||||||
|
public static function removeInstanceFromPool($value)
|
||||||
|
{
|
||||||
|
if (Propel::isInstancePoolingEnabled() && null !== $value) {
|
||||||
|
if (is_object($value) && $value instanceof \Thelia\Model\ExportI18n) {
|
||||||
|
$key = serialize(array((string) $value->getId(), (string) $value->getLocale()));
|
||||||
|
|
||||||
|
} elseif (is_array($value) && count($value) === 2) {
|
||||||
|
// assume we've been passed a primary key";
|
||||||
|
$key = serialize(array((string) $value[0], (string) $value[1]));
|
||||||
|
} elseif ($value instanceof Criteria) {
|
||||||
|
self::$instances = [];
|
||||||
|
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
$e = new PropelException("Invalid value passed to removeInstanceFromPool(). Expected primary key or \Thelia\Model\ExportI18n object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value, true)));
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
|
|
||||||
|
unset(self::$instances[$key]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table.
|
||||||
|
*
|
||||||
|
* For tables with a single-column primary key, that simple pkey value will be returned. For tables with
|
||||||
|
* a multi-column primary key, a serialize()d version of the primary key will be returned.
|
||||||
|
*
|
||||||
|
* @param array $row resultset row.
|
||||||
|
* @param int $offset The 0-based offset for reading from the resultset row.
|
||||||
|
* @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME
|
||||||
|
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM
|
||||||
|
*/
|
||||||
|
public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
|
||||||
|
{
|
||||||
|
// If the PK cannot be derived from the row, return NULL.
|
||||||
|
if ($row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)] === null && $row[TableMap::TYPE_NUM == $indexType ? 1 + $offset : static::translateFieldName('Locale', TableMap::TYPE_PHPNAME, $indexType)] === 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 ? 1 + $offset : static::translateFieldName('Locale', TableMap::TYPE_PHPNAME, $indexType)]));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves the primary key from the DB resultset row
|
||||||
|
* For tables with a single-column primary key, that simple pkey value will be returned. For tables with
|
||||||
|
* a multi-column primary key, an array of the primary key columns will be returned.
|
||||||
|
*
|
||||||
|
* @param array $row resultset row.
|
||||||
|
* @param int $offset The 0-based offset for reading from the resultset row.
|
||||||
|
* @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME
|
||||||
|
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM
|
||||||
|
*
|
||||||
|
* @return mixed The primary key of the row
|
||||||
|
*/
|
||||||
|
public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
|
||||||
|
{
|
||||||
|
|
||||||
|
return $pks;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class that the tableMap will make instances of.
|
||||||
|
*
|
||||||
|
* If $withPrefix is true, the returned path
|
||||||
|
* uses a dot-path notation which is translated into a path
|
||||||
|
* relative to a location on the PHP include_path.
|
||||||
|
* (e.g. path.to.MyClass -> 'path/to/MyClass.php')
|
||||||
|
*
|
||||||
|
* @param boolean $withPrefix Whether or not to return the path with the class name
|
||||||
|
* @return string path.to.ClassName
|
||||||
|
*/
|
||||||
|
public static function getOMClass($withPrefix = true)
|
||||||
|
{
|
||||||
|
return $withPrefix ? ExportI18nTableMap::CLASS_DEFAULT : ExportI18nTableMap::OM_CLASS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Populates an object of the default type or an object that inherit from the default.
|
||||||
|
*
|
||||||
|
* @param array $row row returned by DataFetcher->fetch().
|
||||||
|
* @param int $offset The 0-based offset for reading from the resultset row.
|
||||||
|
* @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType().
|
||||||
|
One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME
|
||||||
|
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
|
||||||
|
*
|
||||||
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
|
* rethrown wrapped into a PropelException.
|
||||||
|
* @return array (ExportI18n object, last column rank)
|
||||||
|
*/
|
||||||
|
public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
|
||||||
|
{
|
||||||
|
$key = ExportI18nTableMap::getPrimaryKeyHashFromRow($row, $offset, $indexType);
|
||||||
|
if (null !== ($obj = ExportI18nTableMap::getInstanceFromPool($key))) {
|
||||||
|
// We no longer rehydrate the object, since this can cause data loss.
|
||||||
|
// See http://www.propelorm.org/ticket/509
|
||||||
|
// $obj->hydrate($row, $offset, true); // rehydrate
|
||||||
|
$col = $offset + ExportI18nTableMap::NUM_HYDRATE_COLUMNS;
|
||||||
|
} else {
|
||||||
|
$cls = ExportI18nTableMap::OM_CLASS;
|
||||||
|
$obj = new $cls();
|
||||||
|
$col = $obj->hydrate($row, $offset, false, $indexType);
|
||||||
|
ExportI18nTableMap::addInstanceToPool($obj, $key);
|
||||||
|
}
|
||||||
|
|
||||||
|
return array($obj, $col);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The returned array will contain objects of the default type or
|
||||||
|
* objects that inherit from the default.
|
||||||
|
*
|
||||||
|
* @param DataFetcherInterface $dataFetcher
|
||||||
|
* @return array
|
||||||
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
|
* rethrown wrapped into a PropelException.
|
||||||
|
*/
|
||||||
|
public static function populateObjects(DataFetcherInterface $dataFetcher)
|
||||||
|
{
|
||||||
|
$results = array();
|
||||||
|
|
||||||
|
// set the class once to avoid overhead in the loop
|
||||||
|
$cls = static::getOMClass(false);
|
||||||
|
// populate the object(s)
|
||||||
|
while ($row = $dataFetcher->fetch()) {
|
||||||
|
$key = ExportI18nTableMap::getPrimaryKeyHashFromRow($row, 0, $dataFetcher->getIndexType());
|
||||||
|
if (null !== ($obj = ExportI18nTableMap::getInstanceFromPool($key))) {
|
||||||
|
// We no longer rehydrate the object, since this can cause data loss.
|
||||||
|
// See http://www.propelorm.org/ticket/509
|
||||||
|
// $obj->hydrate($row, 0, true); // rehydrate
|
||||||
|
$results[] = $obj;
|
||||||
|
} else {
|
||||||
|
$obj = new $cls();
|
||||||
|
$obj->hydrate($row);
|
||||||
|
$results[] = $obj;
|
||||||
|
ExportI18nTableMap::addInstanceToPool($obj, $key);
|
||||||
|
} // if key exists
|
||||||
|
}
|
||||||
|
|
||||||
|
return $results;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Add all the columns needed to create a new object.
|
||||||
|
*
|
||||||
|
* Note: any columns that were marked with lazyLoad="true" in the
|
||||||
|
* XML schema will not be added to the select list and only loaded
|
||||||
|
* on demand.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria object containing the columns to add.
|
||||||
|
* @param string $alias optional table alias
|
||||||
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
|
* rethrown wrapped into a PropelException.
|
||||||
|
*/
|
||||||
|
public static function addSelectColumns(Criteria $criteria, $alias = null)
|
||||||
|
{
|
||||||
|
if (null === $alias) {
|
||||||
|
$criteria->addSelectColumn(ExportI18nTableMap::ID);
|
||||||
|
$criteria->addSelectColumn(ExportI18nTableMap::LOCALE);
|
||||||
|
$criteria->addSelectColumn(ExportI18nTableMap::TITLE);
|
||||||
|
$criteria->addSelectColumn(ExportI18nTableMap::DESCRIPTION);
|
||||||
|
} else {
|
||||||
|
$criteria->addSelectColumn($alias . '.ID');
|
||||||
|
$criteria->addSelectColumn($alias . '.LOCALE');
|
||||||
|
$criteria->addSelectColumn($alias . '.TITLE');
|
||||||
|
$criteria->addSelectColumn($alias . '.DESCRIPTION');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the TableMap related to this object.
|
||||||
|
* This method is not needed for general use but a specific application could have a need.
|
||||||
|
* @return TableMap
|
||||||
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
|
* rethrown wrapped into a PropelException.
|
||||||
|
*/
|
||||||
|
public static function getTableMap()
|
||||||
|
{
|
||||||
|
return Propel::getServiceContainer()->getDatabaseMap(ExportI18nTableMap::DATABASE_NAME)->getTable(ExportI18nTableMap::TABLE_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a TableMap instance to the database for this tableMap class.
|
||||||
|
*/
|
||||||
|
public static function buildTableMap()
|
||||||
|
{
|
||||||
|
$dbMap = Propel::getServiceContainer()->getDatabaseMap(ExportI18nTableMap::DATABASE_NAME);
|
||||||
|
if (!$dbMap->hasTable(ExportI18nTableMap::TABLE_NAME)) {
|
||||||
|
$dbMap->addTableObject(new ExportI18nTableMap());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Performs a DELETE on the database, given a ExportI18n or Criteria object OR a primary key value.
|
||||||
|
*
|
||||||
|
* @param mixed $values Criteria or ExportI18n object or primary key or array of primary keys
|
||||||
|
* which is used to create the DELETE statement
|
||||||
|
* @param ConnectionInterface $con the connection to use
|
||||||
|
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
|
||||||
|
* if supported by native driver or if emulated using Propel.
|
||||||
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
|
* rethrown wrapped into a PropelException.
|
||||||
|
*/
|
||||||
|
public static function doDelete($values, ConnectionInterface $con = null)
|
||||||
|
{
|
||||||
|
if (null === $con) {
|
||||||
|
$con = Propel::getServiceContainer()->getWriteConnection(ExportI18nTableMap::DATABASE_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($values instanceof Criteria) {
|
||||||
|
// rename for clarity
|
||||||
|
$criteria = $values;
|
||||||
|
} elseif ($values instanceof \Thelia\Model\ExportI18n) { // it's a model object
|
||||||
|
// create criteria based on pk values
|
||||||
|
$criteria = $values->buildPkeyCriteria();
|
||||||
|
} else { // it's a primary key, or an array of pks
|
||||||
|
$criteria = new Criteria(ExportI18nTableMap::DATABASE_NAME);
|
||||||
|
// primary key is composite; we therefore, expect
|
||||||
|
// the primary key passed to be an array of pkey values
|
||||||
|
if (count($values) == count($values, COUNT_RECURSIVE)) {
|
||||||
|
// array is not multi-dimensional
|
||||||
|
$values = array($values);
|
||||||
|
}
|
||||||
|
foreach ($values as $value) {
|
||||||
|
$criterion = $criteria->getNewCriterion(ExportI18nTableMap::ID, $value[0]);
|
||||||
|
$criterion->addAnd($criteria->getNewCriterion(ExportI18nTableMap::LOCALE, $value[1]));
|
||||||
|
$criteria->addOr($criterion);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$query = ExportI18nQuery::create()->mergeWith($criteria);
|
||||||
|
|
||||||
|
if ($values instanceof Criteria) { ExportI18nTableMap::clearInstancePool();
|
||||||
|
} elseif (!is_object($values)) { // it's a primary key, or an array of pks
|
||||||
|
foreach ((array) $values as $singleval) { ExportI18nTableMap::removeInstanceFromPool($singleval);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $query->delete($con);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deletes all rows from the export_i18n table.
|
||||||
|
*
|
||||||
|
* @param ConnectionInterface $con the connection to use
|
||||||
|
* @return int The number of affected rows (if supported by underlying database driver).
|
||||||
|
*/
|
||||||
|
public static function doDeleteAll(ConnectionInterface $con = null)
|
||||||
|
{
|
||||||
|
return ExportI18nQuery::create()->doDeleteAll($con);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Performs an INSERT on the database, given a ExportI18n or Criteria object.
|
||||||
|
*
|
||||||
|
* @param mixed $criteria Criteria or ExportI18n object containing data that is used to create the INSERT statement.
|
||||||
|
* @param ConnectionInterface $con the ConnectionInterface connection to use
|
||||||
|
* @return mixed The new primary key.
|
||||||
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
|
* rethrown wrapped into a PropelException.
|
||||||
|
*/
|
||||||
|
public static function doInsert($criteria, ConnectionInterface $con = null)
|
||||||
|
{
|
||||||
|
if (null === $con) {
|
||||||
|
$con = Propel::getServiceContainer()->getWriteConnection(ExportI18nTableMap::DATABASE_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($criteria instanceof Criteria) {
|
||||||
|
$criteria = clone $criteria; // rename for clarity
|
||||||
|
} else {
|
||||||
|
$criteria = $criteria->buildCriteria(); // build Criteria from ExportI18n object
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Set the correct dbName
|
||||||
|
$query = ExportI18nQuery::create()->mergeWith($criteria);
|
||||||
|
|
||||||
|
try {
|
||||||
|
// use transaction because $criteria could contain info
|
||||||
|
// for more than one table (I guess, conceivably)
|
||||||
|
$con->beginTransaction();
|
||||||
|
$pk = $query->doInsert($con);
|
||||||
|
$con->commit();
|
||||||
|
} catch (PropelException $e) {
|
||||||
|
$con->rollBack();
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $pk;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // ExportI18nTableMap
|
||||||
|
// This is the static code needed to register the TableMap for this table with the main Propel class.
|
||||||
|
//
|
||||||
|
ExportI18nTableMap::buildTableMap();
|
||||||
468
core/lib/Thelia/Model/Map/ExportTableMap.php
Normal file
468
core/lib/Thelia/Model/Map/ExportTableMap.php
Normal file
@@ -0,0 +1,468 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Thelia\Model\Map;
|
||||||
|
|
||||||
|
use Propel\Runtime\Propel;
|
||||||
|
use Propel\Runtime\ActiveQuery\Criteria;
|
||||||
|
use Propel\Runtime\ActiveQuery\InstancePoolTrait;
|
||||||
|
use Propel\Runtime\Connection\ConnectionInterface;
|
||||||
|
use Propel\Runtime\DataFetcher\DataFetcherInterface;
|
||||||
|
use Propel\Runtime\Exception\PropelException;
|
||||||
|
use Propel\Runtime\Map\RelationMap;
|
||||||
|
use Propel\Runtime\Map\TableMap;
|
||||||
|
use Propel\Runtime\Map\TableMapTrait;
|
||||||
|
use Thelia\Model\Export;
|
||||||
|
use Thelia\Model\ExportQuery;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class defines the structure of the 'export' table.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* This map class is used by Propel to do runtime db structure discovery.
|
||||||
|
* For example, the createSelectSql() method checks the type of a given column used in an
|
||||||
|
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
|
||||||
|
* (i.e. if it's a text column type).
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
class ExportTableMap extends TableMap
|
||||||
|
{
|
||||||
|
use InstancePoolTrait;
|
||||||
|
use TableMapTrait;
|
||||||
|
/**
|
||||||
|
* The (dot-path) name of this class
|
||||||
|
*/
|
||||||
|
const CLASS_NAME = 'Thelia.Model.Map.ExportTableMap';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The default database name for this class
|
||||||
|
*/
|
||||||
|
const DATABASE_NAME = 'thelia';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table name for this class
|
||||||
|
*/
|
||||||
|
const TABLE_NAME = 'export';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The related Propel class for this table
|
||||||
|
*/
|
||||||
|
const OM_CLASS = '\\Thelia\\Model\\Export';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A class that can be returned by this tableMap
|
||||||
|
*/
|
||||||
|
const CLASS_DEFAULT = 'Thelia.Model.Export';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The total number of columns
|
||||||
|
*/
|
||||||
|
const NUM_COLUMNS = 5;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The number of lazy-loaded columns
|
||||||
|
*/
|
||||||
|
const NUM_LAZY_LOAD_COLUMNS = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS)
|
||||||
|
*/
|
||||||
|
const NUM_HYDRATE_COLUMNS = 5;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the column name for the ID field
|
||||||
|
*/
|
||||||
|
const ID = 'export.ID';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the column name for the EXPORT_CATEGORY_ID field
|
||||||
|
*/
|
||||||
|
const EXPORT_CATEGORY_ID = 'export.EXPORT_CATEGORY_ID';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the column name for the POSITION field
|
||||||
|
*/
|
||||||
|
const POSITION = 'export.POSITION';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the column name for the CREATED_AT field
|
||||||
|
*/
|
||||||
|
const CREATED_AT = 'export.CREATED_AT';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the column name for the UPDATED_AT field
|
||||||
|
*/
|
||||||
|
const UPDATED_AT = 'export.UPDATED_AT';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The default string format for model objects of the related table
|
||||||
|
*/
|
||||||
|
const DEFAULT_STRING_FORMAT = 'YAML';
|
||||||
|
|
||||||
|
// i18n behavior
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The default locale to use for translations.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
const DEFAULT_LOCALE = 'en_US';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* holds an array of fieldnames
|
||||||
|
*
|
||||||
|
* first dimension keys are the type constants
|
||||||
|
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||||
|
*/
|
||||||
|
protected static $fieldNames = array (
|
||||||
|
self::TYPE_PHPNAME => array('Id', 'ExportCategoryId', 'Position', 'CreatedAt', 'UpdatedAt', ),
|
||||||
|
self::TYPE_STUDLYPHPNAME => array('id', 'exportCategoryId', 'position', 'createdAt', 'updatedAt', ),
|
||||||
|
self::TYPE_COLNAME => array(ExportTableMap::ID, ExportTableMap::EXPORT_CATEGORY_ID, ExportTableMap::POSITION, ExportTableMap::CREATED_AT, ExportTableMap::UPDATED_AT, ),
|
||||||
|
self::TYPE_RAW_COLNAME => array('ID', 'EXPORT_CATEGORY_ID', 'POSITION', 'CREATED_AT', 'UPDATED_AT', ),
|
||||||
|
self::TYPE_FIELDNAME => array('id', 'export_category_id', 'position', 'created_at', 'updated_at', ),
|
||||||
|
self::TYPE_NUM => array(0, 1, 2, 3, 4, )
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* holds an array of keys for quick access to the fieldnames array
|
||||||
|
*
|
||||||
|
* first dimension keys are the type constants
|
||||||
|
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
|
||||||
|
*/
|
||||||
|
protected static $fieldKeys = array (
|
||||||
|
self::TYPE_PHPNAME => array('Id' => 0, 'ExportCategoryId' => 1, 'Position' => 2, 'CreatedAt' => 3, 'UpdatedAt' => 4, ),
|
||||||
|
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'exportCategoryId' => 1, 'position' => 2, 'createdAt' => 3, 'updatedAt' => 4, ),
|
||||||
|
self::TYPE_COLNAME => array(ExportTableMap::ID => 0, ExportTableMap::EXPORT_CATEGORY_ID => 1, ExportTableMap::POSITION => 2, ExportTableMap::CREATED_AT => 3, ExportTableMap::UPDATED_AT => 4, ),
|
||||||
|
self::TYPE_RAW_COLNAME => array('ID' => 0, 'EXPORT_CATEGORY_ID' => 1, 'POSITION' => 2, 'CREATED_AT' => 3, 'UPDATED_AT' => 4, ),
|
||||||
|
self::TYPE_FIELDNAME => array('id' => 0, 'export_category_id' => 1, 'position' => 2, 'created_at' => 3, 'updated_at' => 4, ),
|
||||||
|
self::TYPE_NUM => array(0, 1, 2, 3, 4, )
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialize the table attributes and columns
|
||||||
|
* Relations are not initialized by this method since they are lazy loaded
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
* @throws PropelException
|
||||||
|
*/
|
||||||
|
public function initialize()
|
||||||
|
{
|
||||||
|
// attributes
|
||||||
|
$this->setName('export');
|
||||||
|
$this->setPhpName('Export');
|
||||||
|
$this->setClassName('\\Thelia\\Model\\Export');
|
||||||
|
$this->setPackage('Thelia.Model');
|
||||||
|
$this->setUseIdGenerator(true);
|
||||||
|
// columns
|
||||||
|
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
|
||||||
|
$this->addForeignKey('EXPORT_CATEGORY_ID', 'ExportCategoryId', 'INTEGER', 'export_category', 'ID', true, null, null);
|
||||||
|
$this->addColumn('POSITION', 'Position', 'INTEGER', true, null, null);
|
||||||
|
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
|
||||||
|
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
|
||||||
|
} // initialize()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Build the RelationMap objects for this table relationships
|
||||||
|
*/
|
||||||
|
public function buildRelations()
|
||||||
|
{
|
||||||
|
$this->addRelation('ExportCategory', '\\Thelia\\Model\\ExportCategory', RelationMap::MANY_TO_ONE, array('export_category_id' => 'id', ), 'CASCADE', 'RESTRICT');
|
||||||
|
$this->addRelation('ExportI18n', '\\Thelia\\Model\\ExportI18n', RelationMap::ONE_TO_MANY, array('id' => 'id', ), 'CASCADE', null, 'ExportI18ns');
|
||||||
|
} // buildRelations()
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Gets the list of behaviors registered for this table
|
||||||
|
*
|
||||||
|
* @return array Associative array (name => parameters) of behaviors
|
||||||
|
*/
|
||||||
|
public function getBehaviors()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
'i18n' => array('i18n_table' => '%TABLE%_i18n', 'i18n_phpname' => '%PHPNAME%I18n', 'i18n_columns' => 'title, description', 'locale_column' => 'locale', 'locale_length' => '5', 'default_locale' => '', 'locale_alias' => '', ),
|
||||||
|
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', ),
|
||||||
|
);
|
||||||
|
} // getBehaviors()
|
||||||
|
/**
|
||||||
|
* Method to invalidate the instance pool of all tables related to export * by a foreign key with ON DELETE CASCADE
|
||||||
|
*/
|
||||||
|
public static function clearRelatedInstancePool()
|
||||||
|
{
|
||||||
|
// Invalidate objects in ".$this->getClassNameFromBuilder($joinedTableTableMapBuilder)." instance pool,
|
||||||
|
// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
|
||||||
|
ExportI18nTableMap::clearInstancePool();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table.
|
||||||
|
*
|
||||||
|
* For tables with a single-column primary key, that simple pkey value will be returned. For tables with
|
||||||
|
* a multi-column primary key, a serialize()d version of the primary key will be returned.
|
||||||
|
*
|
||||||
|
* @param array $row resultset row.
|
||||||
|
* @param int $offset The 0-based offset for reading from the resultset row.
|
||||||
|
* @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME
|
||||||
|
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM
|
||||||
|
*/
|
||||||
|
public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
|
||||||
|
{
|
||||||
|
// If the PK cannot be derived from the row, return NULL.
|
||||||
|
if ($row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)] === null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (string) $row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves the primary key from the DB resultset row
|
||||||
|
* For tables with a single-column primary key, that simple pkey value will be returned. For tables with
|
||||||
|
* a multi-column primary key, an array of the primary key columns will be returned.
|
||||||
|
*
|
||||||
|
* @param array $row resultset row.
|
||||||
|
* @param int $offset The 0-based offset for reading from the resultset row.
|
||||||
|
* @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME
|
||||||
|
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM
|
||||||
|
*
|
||||||
|
* @return mixed The primary key of the row
|
||||||
|
*/
|
||||||
|
public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
|
||||||
|
{
|
||||||
|
|
||||||
|
return (int) $row[
|
||||||
|
$indexType == TableMap::TYPE_NUM
|
||||||
|
? 0 + $offset
|
||||||
|
: self::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class that the tableMap will make instances of.
|
||||||
|
*
|
||||||
|
* If $withPrefix is true, the returned path
|
||||||
|
* uses a dot-path notation which is translated into a path
|
||||||
|
* relative to a location on the PHP include_path.
|
||||||
|
* (e.g. path.to.MyClass -> 'path/to/MyClass.php')
|
||||||
|
*
|
||||||
|
* @param boolean $withPrefix Whether or not to return the path with the class name
|
||||||
|
* @return string path.to.ClassName
|
||||||
|
*/
|
||||||
|
public static function getOMClass($withPrefix = true)
|
||||||
|
{
|
||||||
|
return $withPrefix ? ExportTableMap::CLASS_DEFAULT : ExportTableMap::OM_CLASS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Populates an object of the default type or an object that inherit from the default.
|
||||||
|
*
|
||||||
|
* @param array $row row returned by DataFetcher->fetch().
|
||||||
|
* @param int $offset The 0-based offset for reading from the resultset row.
|
||||||
|
* @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType().
|
||||||
|
One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME
|
||||||
|
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
|
||||||
|
*
|
||||||
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
|
* rethrown wrapped into a PropelException.
|
||||||
|
* @return array (Export object, last column rank)
|
||||||
|
*/
|
||||||
|
public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
|
||||||
|
{
|
||||||
|
$key = ExportTableMap::getPrimaryKeyHashFromRow($row, $offset, $indexType);
|
||||||
|
if (null !== ($obj = ExportTableMap::getInstanceFromPool($key))) {
|
||||||
|
// We no longer rehydrate the object, since this can cause data loss.
|
||||||
|
// See http://www.propelorm.org/ticket/509
|
||||||
|
// $obj->hydrate($row, $offset, true); // rehydrate
|
||||||
|
$col = $offset + ExportTableMap::NUM_HYDRATE_COLUMNS;
|
||||||
|
} else {
|
||||||
|
$cls = ExportTableMap::OM_CLASS;
|
||||||
|
$obj = new $cls();
|
||||||
|
$col = $obj->hydrate($row, $offset, false, $indexType);
|
||||||
|
ExportTableMap::addInstanceToPool($obj, $key);
|
||||||
|
}
|
||||||
|
|
||||||
|
return array($obj, $col);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The returned array will contain objects of the default type or
|
||||||
|
* objects that inherit from the default.
|
||||||
|
*
|
||||||
|
* @param DataFetcherInterface $dataFetcher
|
||||||
|
* @return array
|
||||||
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
|
* rethrown wrapped into a PropelException.
|
||||||
|
*/
|
||||||
|
public static function populateObjects(DataFetcherInterface $dataFetcher)
|
||||||
|
{
|
||||||
|
$results = array();
|
||||||
|
|
||||||
|
// set the class once to avoid overhead in the loop
|
||||||
|
$cls = static::getOMClass(false);
|
||||||
|
// populate the object(s)
|
||||||
|
while ($row = $dataFetcher->fetch()) {
|
||||||
|
$key = ExportTableMap::getPrimaryKeyHashFromRow($row, 0, $dataFetcher->getIndexType());
|
||||||
|
if (null !== ($obj = ExportTableMap::getInstanceFromPool($key))) {
|
||||||
|
// We no longer rehydrate the object, since this can cause data loss.
|
||||||
|
// See http://www.propelorm.org/ticket/509
|
||||||
|
// $obj->hydrate($row, 0, true); // rehydrate
|
||||||
|
$results[] = $obj;
|
||||||
|
} else {
|
||||||
|
$obj = new $cls();
|
||||||
|
$obj->hydrate($row);
|
||||||
|
$results[] = $obj;
|
||||||
|
ExportTableMap::addInstanceToPool($obj, $key);
|
||||||
|
} // if key exists
|
||||||
|
}
|
||||||
|
|
||||||
|
return $results;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Add all the columns needed to create a new object.
|
||||||
|
*
|
||||||
|
* Note: any columns that were marked with lazyLoad="true" in the
|
||||||
|
* XML schema will not be added to the select list and only loaded
|
||||||
|
* on demand.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria object containing the columns to add.
|
||||||
|
* @param string $alias optional table alias
|
||||||
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
|
* rethrown wrapped into a PropelException.
|
||||||
|
*/
|
||||||
|
public static function addSelectColumns(Criteria $criteria, $alias = null)
|
||||||
|
{
|
||||||
|
if (null === $alias) {
|
||||||
|
$criteria->addSelectColumn(ExportTableMap::ID);
|
||||||
|
$criteria->addSelectColumn(ExportTableMap::EXPORT_CATEGORY_ID);
|
||||||
|
$criteria->addSelectColumn(ExportTableMap::POSITION);
|
||||||
|
$criteria->addSelectColumn(ExportTableMap::CREATED_AT);
|
||||||
|
$criteria->addSelectColumn(ExportTableMap::UPDATED_AT);
|
||||||
|
} else {
|
||||||
|
$criteria->addSelectColumn($alias . '.ID');
|
||||||
|
$criteria->addSelectColumn($alias . '.EXPORT_CATEGORY_ID');
|
||||||
|
$criteria->addSelectColumn($alias . '.POSITION');
|
||||||
|
$criteria->addSelectColumn($alias . '.CREATED_AT');
|
||||||
|
$criteria->addSelectColumn($alias . '.UPDATED_AT');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the TableMap related to this object.
|
||||||
|
* This method is not needed for general use but a specific application could have a need.
|
||||||
|
* @return TableMap
|
||||||
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
|
* rethrown wrapped into a PropelException.
|
||||||
|
*/
|
||||||
|
public static function getTableMap()
|
||||||
|
{
|
||||||
|
return Propel::getServiceContainer()->getDatabaseMap(ExportTableMap::DATABASE_NAME)->getTable(ExportTableMap::TABLE_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a TableMap instance to the database for this tableMap class.
|
||||||
|
*/
|
||||||
|
public static function buildTableMap()
|
||||||
|
{
|
||||||
|
$dbMap = Propel::getServiceContainer()->getDatabaseMap(ExportTableMap::DATABASE_NAME);
|
||||||
|
if (!$dbMap->hasTable(ExportTableMap::TABLE_NAME)) {
|
||||||
|
$dbMap->addTableObject(new ExportTableMap());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Performs a DELETE on the database, given a Export or Criteria object OR a primary key value.
|
||||||
|
*
|
||||||
|
* @param mixed $values Criteria or Export object or primary key or array of primary keys
|
||||||
|
* which is used to create the DELETE statement
|
||||||
|
* @param ConnectionInterface $con the connection to use
|
||||||
|
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
|
||||||
|
* if supported by native driver or if emulated using Propel.
|
||||||
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
|
* rethrown wrapped into a PropelException.
|
||||||
|
*/
|
||||||
|
public static function doDelete($values, ConnectionInterface $con = null)
|
||||||
|
{
|
||||||
|
if (null === $con) {
|
||||||
|
$con = Propel::getServiceContainer()->getWriteConnection(ExportTableMap::DATABASE_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($values instanceof Criteria) {
|
||||||
|
// rename for clarity
|
||||||
|
$criteria = $values;
|
||||||
|
} elseif ($values instanceof \Thelia\Model\Export) { // it's a model object
|
||||||
|
// create criteria based on pk values
|
||||||
|
$criteria = $values->buildPkeyCriteria();
|
||||||
|
} else { // it's a primary key, or an array of pks
|
||||||
|
$criteria = new Criteria(ExportTableMap::DATABASE_NAME);
|
||||||
|
$criteria->add(ExportTableMap::ID, (array) $values, Criteria::IN);
|
||||||
|
}
|
||||||
|
|
||||||
|
$query = ExportQuery::create()->mergeWith($criteria);
|
||||||
|
|
||||||
|
if ($values instanceof Criteria) { ExportTableMap::clearInstancePool();
|
||||||
|
} elseif (!is_object($values)) { // it's a primary key, or an array of pks
|
||||||
|
foreach ((array) $values as $singleval) { ExportTableMap::removeInstanceFromPool($singleval);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $query->delete($con);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deletes all rows from the export table.
|
||||||
|
*
|
||||||
|
* @param ConnectionInterface $con the connection to use
|
||||||
|
* @return int The number of affected rows (if supported by underlying database driver).
|
||||||
|
*/
|
||||||
|
public static function doDeleteAll(ConnectionInterface $con = null)
|
||||||
|
{
|
||||||
|
return ExportQuery::create()->doDeleteAll($con);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Performs an INSERT on the database, given a Export or Criteria object.
|
||||||
|
*
|
||||||
|
* @param mixed $criteria Criteria or Export object containing data that is used to create the INSERT statement.
|
||||||
|
* @param ConnectionInterface $con the ConnectionInterface connection to use
|
||||||
|
* @return mixed The new primary key.
|
||||||
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
|
* rethrown wrapped into a PropelException.
|
||||||
|
*/
|
||||||
|
public static function doInsert($criteria, ConnectionInterface $con = null)
|
||||||
|
{
|
||||||
|
if (null === $con) {
|
||||||
|
$con = Propel::getServiceContainer()->getWriteConnection(ExportTableMap::DATABASE_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($criteria instanceof Criteria) {
|
||||||
|
$criteria = clone $criteria; // rename for clarity
|
||||||
|
} else {
|
||||||
|
$criteria = $criteria->buildCriteria(); // build Criteria from Export object
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($criteria->containsKey(ExportTableMap::ID) && $criteria->keyContainsValue(ExportTableMap::ID) ) {
|
||||||
|
throw new PropelException('Cannot insert a value for auto-increment primary key ('.ExportTableMap::ID.')');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Set the correct dbName
|
||||||
|
$query = ExportQuery::create()->mergeWith($criteria);
|
||||||
|
|
||||||
|
try {
|
||||||
|
// use transaction because $criteria could contain info
|
||||||
|
// for more than one table (I guess, conceivably)
|
||||||
|
$con->beginTransaction();
|
||||||
|
$pk = $query->doInsert($con);
|
||||||
|
$con->commit();
|
||||||
|
} catch (PropelException $e) {
|
||||||
|
$con->rollBack();
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $pk;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // ExportTableMap
|
||||||
|
// This is the static code needed to register the TableMap for this table with the main Propel class.
|
||||||
|
//
|
||||||
|
ExportTableMap::buildTableMap();
|
||||||
@@ -11,12 +11,12 @@ use Propel\Runtime\Exception\PropelException;
|
|||||||
use Propel\Runtime\Map\RelationMap;
|
use Propel\Runtime\Map\RelationMap;
|
||||||
use Propel\Runtime\Map\TableMap;
|
use Propel\Runtime\Map\TableMap;
|
||||||
use Propel\Runtime\Map\TableMapTrait;
|
use Propel\Runtime\Map\TableMapTrait;
|
||||||
use Thelia\Model\ImportExportCategoryI18n;
|
use Thelia\Model\ImportCategoryI18n;
|
||||||
use Thelia\Model\ImportExportCategoryI18nQuery;
|
use Thelia\Model\ImportCategoryI18nQuery;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class defines the structure of the 'import_export_category_i18n' table.
|
* This class defines the structure of the 'import_category_i18n' table.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
@@ -26,14 +26,14 @@ use Thelia\Model\ImportExportCategoryI18nQuery;
|
|||||||
* (i.e. if it's a text column type).
|
* (i.e. if it's a text column type).
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
class ImportExportCategoryI18nTableMap extends TableMap
|
class ImportCategoryI18nTableMap extends TableMap
|
||||||
{
|
{
|
||||||
use InstancePoolTrait;
|
use InstancePoolTrait;
|
||||||
use TableMapTrait;
|
use TableMapTrait;
|
||||||
/**
|
/**
|
||||||
* The (dot-path) name of this class
|
* The (dot-path) name of this class
|
||||||
*/
|
*/
|
||||||
const CLASS_NAME = 'Thelia.Model.Map.ImportExportCategoryI18nTableMap';
|
const CLASS_NAME = 'Thelia.Model.Map.ImportCategoryI18nTableMap';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The default database name for this class
|
* The default database name for this class
|
||||||
@@ -43,17 +43,17 @@ class ImportExportCategoryI18nTableMap extends TableMap
|
|||||||
/**
|
/**
|
||||||
* The table name for this class
|
* The table name for this class
|
||||||
*/
|
*/
|
||||||
const TABLE_NAME = 'import_export_category_i18n';
|
const TABLE_NAME = 'import_category_i18n';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The related Propel class for this table
|
* The related Propel class for this table
|
||||||
*/
|
*/
|
||||||
const OM_CLASS = '\\Thelia\\Model\\ImportExportCategoryI18n';
|
const OM_CLASS = '\\Thelia\\Model\\ImportCategoryI18n';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A class that can be returned by this tableMap
|
* A class that can be returned by this tableMap
|
||||||
*/
|
*/
|
||||||
const CLASS_DEFAULT = 'Thelia.Model.ImportExportCategoryI18n';
|
const CLASS_DEFAULT = 'Thelia.Model.ImportCategoryI18n';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The total number of columns
|
* The total number of columns
|
||||||
@@ -73,17 +73,17 @@ class ImportExportCategoryI18nTableMap extends TableMap
|
|||||||
/**
|
/**
|
||||||
* the column name for the ID field
|
* the column name for the ID field
|
||||||
*/
|
*/
|
||||||
const ID = 'import_export_category_i18n.ID';
|
const ID = 'import_category_i18n.ID';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the column name for the LOCALE field
|
* the column name for the LOCALE field
|
||||||
*/
|
*/
|
||||||
const LOCALE = 'import_export_category_i18n.LOCALE';
|
const LOCALE = 'import_category_i18n.LOCALE';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the column name for the TITLE field
|
* the column name for the TITLE field
|
||||||
*/
|
*/
|
||||||
const TITLE = 'import_export_category_i18n.TITLE';
|
const TITLE = 'import_category_i18n.TITLE';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The default string format for model objects of the related table
|
* The default string format for model objects of the related table
|
||||||
@@ -99,7 +99,7 @@ class ImportExportCategoryI18nTableMap extends TableMap
|
|||||||
protected static $fieldNames = array (
|
protected static $fieldNames = array (
|
||||||
self::TYPE_PHPNAME => array('Id', 'Locale', 'Title', ),
|
self::TYPE_PHPNAME => array('Id', 'Locale', 'Title', ),
|
||||||
self::TYPE_STUDLYPHPNAME => array('id', 'locale', 'title', ),
|
self::TYPE_STUDLYPHPNAME => array('id', 'locale', 'title', ),
|
||||||
self::TYPE_COLNAME => array(ImportExportCategoryI18nTableMap::ID, ImportExportCategoryI18nTableMap::LOCALE, ImportExportCategoryI18nTableMap::TITLE, ),
|
self::TYPE_COLNAME => array(ImportCategoryI18nTableMap::ID, ImportCategoryI18nTableMap::LOCALE, ImportCategoryI18nTableMap::TITLE, ),
|
||||||
self::TYPE_RAW_COLNAME => array('ID', 'LOCALE', 'TITLE', ),
|
self::TYPE_RAW_COLNAME => array('ID', 'LOCALE', 'TITLE', ),
|
||||||
self::TYPE_FIELDNAME => array('id', 'locale', 'title', ),
|
self::TYPE_FIELDNAME => array('id', 'locale', 'title', ),
|
||||||
self::TYPE_NUM => array(0, 1, 2, )
|
self::TYPE_NUM => array(0, 1, 2, )
|
||||||
@@ -114,7 +114,7 @@ class ImportExportCategoryI18nTableMap extends TableMap
|
|||||||
protected static $fieldKeys = array (
|
protected static $fieldKeys = array (
|
||||||
self::TYPE_PHPNAME => array('Id' => 0, 'Locale' => 1, 'Title' => 2, ),
|
self::TYPE_PHPNAME => array('Id' => 0, 'Locale' => 1, 'Title' => 2, ),
|
||||||
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'locale' => 1, 'title' => 2, ),
|
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'locale' => 1, 'title' => 2, ),
|
||||||
self::TYPE_COLNAME => array(ImportExportCategoryI18nTableMap::ID => 0, ImportExportCategoryI18nTableMap::LOCALE => 1, ImportExportCategoryI18nTableMap::TITLE => 2, ),
|
self::TYPE_COLNAME => array(ImportCategoryI18nTableMap::ID => 0, ImportCategoryI18nTableMap::LOCALE => 1, ImportCategoryI18nTableMap::TITLE => 2, ),
|
||||||
self::TYPE_RAW_COLNAME => array('ID' => 0, 'LOCALE' => 1, 'TITLE' => 2, ),
|
self::TYPE_RAW_COLNAME => array('ID' => 0, 'LOCALE' => 1, 'TITLE' => 2, ),
|
||||||
self::TYPE_FIELDNAME => array('id' => 0, 'locale' => 1, 'title' => 2, ),
|
self::TYPE_FIELDNAME => array('id' => 0, 'locale' => 1, 'title' => 2, ),
|
||||||
self::TYPE_NUM => array(0, 1, 2, )
|
self::TYPE_NUM => array(0, 1, 2, )
|
||||||
@@ -130,13 +130,13 @@ class ImportExportCategoryI18nTableMap extends TableMap
|
|||||||
public function initialize()
|
public function initialize()
|
||||||
{
|
{
|
||||||
// attributes
|
// attributes
|
||||||
$this->setName('import_export_category_i18n');
|
$this->setName('import_category_i18n');
|
||||||
$this->setPhpName('ImportExportCategoryI18n');
|
$this->setPhpName('ImportCategoryI18n');
|
||||||
$this->setClassName('\\Thelia\\Model\\ImportExportCategoryI18n');
|
$this->setClassName('\\Thelia\\Model\\ImportCategoryI18n');
|
||||||
$this->setPackage('Thelia.Model');
|
$this->setPackage('Thelia.Model');
|
||||||
$this->setUseIdGenerator(false);
|
$this->setUseIdGenerator(false);
|
||||||
// columns
|
// columns
|
||||||
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'import_export_category', 'ID', true, null, null);
|
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'import_category', 'ID', true, null, null);
|
||||||
$this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_US');
|
$this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_US');
|
||||||
$this->addColumn('TITLE', 'Title', 'VARCHAR', true, 255, null);
|
$this->addColumn('TITLE', 'Title', 'VARCHAR', true, 255, null);
|
||||||
} // initialize()
|
} // initialize()
|
||||||
@@ -146,7 +146,7 @@ class ImportExportCategoryI18nTableMap extends TableMap
|
|||||||
*/
|
*/
|
||||||
public function buildRelations()
|
public function buildRelations()
|
||||||
{
|
{
|
||||||
$this->addRelation('ImportExportCategory', '\\Thelia\\Model\\ImportExportCategory', RelationMap::MANY_TO_ONE, array('id' => 'id', ), 'CASCADE', null);
|
$this->addRelation('ImportCategory', '\\Thelia\\Model\\ImportCategory', RelationMap::MANY_TO_ONE, array('id' => 'id', ), 'CASCADE', null);
|
||||||
} // buildRelations()
|
} // buildRelations()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -157,7 +157,7 @@ class ImportExportCategoryI18nTableMap extends TableMap
|
|||||||
* to the cache in order to ensure that the same objects are always returned by find*()
|
* to the cache in order to ensure that the same objects are always returned by find*()
|
||||||
* and findPk*() calls.
|
* and findPk*() calls.
|
||||||
*
|
*
|
||||||
* @param \Thelia\Model\ImportExportCategoryI18n $obj A \Thelia\Model\ImportExportCategoryI18n object.
|
* @param \Thelia\Model\ImportCategoryI18n $obj A \Thelia\Model\ImportCategoryI18n object.
|
||||||
* @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally).
|
* @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally).
|
||||||
*/
|
*/
|
||||||
public static function addInstanceToPool($obj, $key = null)
|
public static function addInstanceToPool($obj, $key = null)
|
||||||
@@ -178,12 +178,12 @@ class ImportExportCategoryI18nTableMap extends TableMap
|
|||||||
* methods in your stub classes -- you may need to explicitly remove objects
|
* methods in your stub classes -- you may need to explicitly remove objects
|
||||||
* from the cache in order to prevent returning objects that no longer exist.
|
* from the cache in order to prevent returning objects that no longer exist.
|
||||||
*
|
*
|
||||||
* @param mixed $value A \Thelia\Model\ImportExportCategoryI18n object or a primary key value.
|
* @param mixed $value A \Thelia\Model\ImportCategoryI18n object or a primary key value.
|
||||||
*/
|
*/
|
||||||
public static function removeInstanceFromPool($value)
|
public static function removeInstanceFromPool($value)
|
||||||
{
|
{
|
||||||
if (Propel::isInstancePoolingEnabled() && null !== $value) {
|
if (Propel::isInstancePoolingEnabled() && null !== $value) {
|
||||||
if (is_object($value) && $value instanceof \Thelia\Model\ImportExportCategoryI18n) {
|
if (is_object($value) && $value instanceof \Thelia\Model\ImportCategoryI18n) {
|
||||||
$key = serialize(array((string) $value->getId(), (string) $value->getLocale()));
|
$key = serialize(array((string) $value->getId(), (string) $value->getLocale()));
|
||||||
|
|
||||||
} elseif (is_array($value) && count($value) === 2) {
|
} elseif (is_array($value) && count($value) === 2) {
|
||||||
@@ -194,7 +194,7 @@ class ImportExportCategoryI18nTableMap extends TableMap
|
|||||||
|
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
$e = new PropelException("Invalid value passed to removeInstanceFromPool(). Expected primary key or \Thelia\Model\ImportExportCategoryI18n object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value, true)));
|
$e = new PropelException("Invalid value passed to removeInstanceFromPool(). Expected primary key or \Thelia\Model\ImportCategoryI18n object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value, true)));
|
||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -254,7 +254,7 @@ class ImportExportCategoryI18nTableMap extends TableMap
|
|||||||
*/
|
*/
|
||||||
public static function getOMClass($withPrefix = true)
|
public static function getOMClass($withPrefix = true)
|
||||||
{
|
{
|
||||||
return $withPrefix ? ImportExportCategoryI18nTableMap::CLASS_DEFAULT : ImportExportCategoryI18nTableMap::OM_CLASS;
|
return $withPrefix ? ImportCategoryI18nTableMap::CLASS_DEFAULT : ImportCategoryI18nTableMap::OM_CLASS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -268,21 +268,21 @@ class ImportExportCategoryI18nTableMap extends TableMap
|
|||||||
*
|
*
|
||||||
* @throws PropelException Any exceptions caught during processing will be
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
* rethrown wrapped into a PropelException.
|
* rethrown wrapped into a PropelException.
|
||||||
* @return array (ImportExportCategoryI18n object, last column rank)
|
* @return array (ImportCategoryI18n object, last column rank)
|
||||||
*/
|
*/
|
||||||
public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
|
public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
|
||||||
{
|
{
|
||||||
$key = ImportExportCategoryI18nTableMap::getPrimaryKeyHashFromRow($row, $offset, $indexType);
|
$key = ImportCategoryI18nTableMap::getPrimaryKeyHashFromRow($row, $offset, $indexType);
|
||||||
if (null !== ($obj = ImportExportCategoryI18nTableMap::getInstanceFromPool($key))) {
|
if (null !== ($obj = ImportCategoryI18nTableMap::getInstanceFromPool($key))) {
|
||||||
// We no longer rehydrate the object, since this can cause data loss.
|
// We no longer rehydrate the object, since this can cause data loss.
|
||||||
// See http://www.propelorm.org/ticket/509
|
// See http://www.propelorm.org/ticket/509
|
||||||
// $obj->hydrate($row, $offset, true); // rehydrate
|
// $obj->hydrate($row, $offset, true); // rehydrate
|
||||||
$col = $offset + ImportExportCategoryI18nTableMap::NUM_HYDRATE_COLUMNS;
|
$col = $offset + ImportCategoryI18nTableMap::NUM_HYDRATE_COLUMNS;
|
||||||
} else {
|
} else {
|
||||||
$cls = ImportExportCategoryI18nTableMap::OM_CLASS;
|
$cls = ImportCategoryI18nTableMap::OM_CLASS;
|
||||||
$obj = new $cls();
|
$obj = new $cls();
|
||||||
$col = $obj->hydrate($row, $offset, false, $indexType);
|
$col = $obj->hydrate($row, $offset, false, $indexType);
|
||||||
ImportExportCategoryI18nTableMap::addInstanceToPool($obj, $key);
|
ImportCategoryI18nTableMap::addInstanceToPool($obj, $key);
|
||||||
}
|
}
|
||||||
|
|
||||||
return array($obj, $col);
|
return array($obj, $col);
|
||||||
@@ -305,8 +305,8 @@ class ImportExportCategoryI18nTableMap extends TableMap
|
|||||||
$cls = static::getOMClass(false);
|
$cls = static::getOMClass(false);
|
||||||
// populate the object(s)
|
// populate the object(s)
|
||||||
while ($row = $dataFetcher->fetch()) {
|
while ($row = $dataFetcher->fetch()) {
|
||||||
$key = ImportExportCategoryI18nTableMap::getPrimaryKeyHashFromRow($row, 0, $dataFetcher->getIndexType());
|
$key = ImportCategoryI18nTableMap::getPrimaryKeyHashFromRow($row, 0, $dataFetcher->getIndexType());
|
||||||
if (null !== ($obj = ImportExportCategoryI18nTableMap::getInstanceFromPool($key))) {
|
if (null !== ($obj = ImportCategoryI18nTableMap::getInstanceFromPool($key))) {
|
||||||
// We no longer rehydrate the object, since this can cause data loss.
|
// We no longer rehydrate the object, since this can cause data loss.
|
||||||
// See http://www.propelorm.org/ticket/509
|
// See http://www.propelorm.org/ticket/509
|
||||||
// $obj->hydrate($row, 0, true); // rehydrate
|
// $obj->hydrate($row, 0, true); // rehydrate
|
||||||
@@ -315,7 +315,7 @@ class ImportExportCategoryI18nTableMap extends TableMap
|
|||||||
$obj = new $cls();
|
$obj = new $cls();
|
||||||
$obj->hydrate($row);
|
$obj->hydrate($row);
|
||||||
$results[] = $obj;
|
$results[] = $obj;
|
||||||
ImportExportCategoryI18nTableMap::addInstanceToPool($obj, $key);
|
ImportCategoryI18nTableMap::addInstanceToPool($obj, $key);
|
||||||
} // if key exists
|
} // if key exists
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -336,9 +336,9 @@ class ImportExportCategoryI18nTableMap extends TableMap
|
|||||||
public static function addSelectColumns(Criteria $criteria, $alias = null)
|
public static function addSelectColumns(Criteria $criteria, $alias = null)
|
||||||
{
|
{
|
||||||
if (null === $alias) {
|
if (null === $alias) {
|
||||||
$criteria->addSelectColumn(ImportExportCategoryI18nTableMap::ID);
|
$criteria->addSelectColumn(ImportCategoryI18nTableMap::ID);
|
||||||
$criteria->addSelectColumn(ImportExportCategoryI18nTableMap::LOCALE);
|
$criteria->addSelectColumn(ImportCategoryI18nTableMap::LOCALE);
|
||||||
$criteria->addSelectColumn(ImportExportCategoryI18nTableMap::TITLE);
|
$criteria->addSelectColumn(ImportCategoryI18nTableMap::TITLE);
|
||||||
} else {
|
} else {
|
||||||
$criteria->addSelectColumn($alias . '.ID');
|
$criteria->addSelectColumn($alias . '.ID');
|
||||||
$criteria->addSelectColumn($alias . '.LOCALE');
|
$criteria->addSelectColumn($alias . '.LOCALE');
|
||||||
@@ -355,7 +355,7 @@ class ImportExportCategoryI18nTableMap extends TableMap
|
|||||||
*/
|
*/
|
||||||
public static function getTableMap()
|
public static function getTableMap()
|
||||||
{
|
{
|
||||||
return Propel::getServiceContainer()->getDatabaseMap(ImportExportCategoryI18nTableMap::DATABASE_NAME)->getTable(ImportExportCategoryI18nTableMap::TABLE_NAME);
|
return Propel::getServiceContainer()->getDatabaseMap(ImportCategoryI18nTableMap::DATABASE_NAME)->getTable(ImportCategoryI18nTableMap::TABLE_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -363,16 +363,16 @@ class ImportExportCategoryI18nTableMap extends TableMap
|
|||||||
*/
|
*/
|
||||||
public static function buildTableMap()
|
public static function buildTableMap()
|
||||||
{
|
{
|
||||||
$dbMap = Propel::getServiceContainer()->getDatabaseMap(ImportExportCategoryI18nTableMap::DATABASE_NAME);
|
$dbMap = Propel::getServiceContainer()->getDatabaseMap(ImportCategoryI18nTableMap::DATABASE_NAME);
|
||||||
if (!$dbMap->hasTable(ImportExportCategoryI18nTableMap::TABLE_NAME)) {
|
if (!$dbMap->hasTable(ImportCategoryI18nTableMap::TABLE_NAME)) {
|
||||||
$dbMap->addTableObject(new ImportExportCategoryI18nTableMap());
|
$dbMap->addTableObject(new ImportCategoryI18nTableMap());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Performs a DELETE on the database, given a ImportExportCategoryI18n or Criteria object OR a primary key value.
|
* Performs a DELETE on the database, given a ImportCategoryI18n or Criteria object OR a primary key value.
|
||||||
*
|
*
|
||||||
* @param mixed $values Criteria or ImportExportCategoryI18n object or primary key or array of primary keys
|
* @param mixed $values Criteria or ImportCategoryI18n object or primary key or array of primary keys
|
||||||
* which is used to create the DELETE statement
|
* which is used to create the DELETE statement
|
||||||
* @param ConnectionInterface $con the connection to use
|
* @param ConnectionInterface $con the connection to use
|
||||||
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
|
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
|
||||||
@@ -383,17 +383,17 @@ class ImportExportCategoryI18nTableMap extends TableMap
|
|||||||
public static function doDelete($values, ConnectionInterface $con = null)
|
public static function doDelete($values, ConnectionInterface $con = null)
|
||||||
{
|
{
|
||||||
if (null === $con) {
|
if (null === $con) {
|
||||||
$con = Propel::getServiceContainer()->getWriteConnection(ImportExportCategoryI18nTableMap::DATABASE_NAME);
|
$con = Propel::getServiceContainer()->getWriteConnection(ImportCategoryI18nTableMap::DATABASE_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($values instanceof Criteria) {
|
if ($values instanceof Criteria) {
|
||||||
// rename for clarity
|
// rename for clarity
|
||||||
$criteria = $values;
|
$criteria = $values;
|
||||||
} elseif ($values instanceof \Thelia\Model\ImportExportCategoryI18n) { // it's a model object
|
} elseif ($values instanceof \Thelia\Model\ImportCategoryI18n) { // it's a model object
|
||||||
// create criteria based on pk values
|
// create criteria based on pk values
|
||||||
$criteria = $values->buildPkeyCriteria();
|
$criteria = $values->buildPkeyCriteria();
|
||||||
} else { // it's a primary key, or an array of pks
|
} else { // it's a primary key, or an array of pks
|
||||||
$criteria = new Criteria(ImportExportCategoryI18nTableMap::DATABASE_NAME);
|
$criteria = new Criteria(ImportCategoryI18nTableMap::DATABASE_NAME);
|
||||||
// primary key is composite; we therefore, expect
|
// primary key is composite; we therefore, expect
|
||||||
// the primary key passed to be an array of pkey values
|
// the primary key passed to be an array of pkey values
|
||||||
if (count($values) == count($values, COUNT_RECURSIVE)) {
|
if (count($values) == count($values, COUNT_RECURSIVE)) {
|
||||||
@@ -401,17 +401,17 @@ class ImportExportCategoryI18nTableMap extends TableMap
|
|||||||
$values = array($values);
|
$values = array($values);
|
||||||
}
|
}
|
||||||
foreach ($values as $value) {
|
foreach ($values as $value) {
|
||||||
$criterion = $criteria->getNewCriterion(ImportExportCategoryI18nTableMap::ID, $value[0]);
|
$criterion = $criteria->getNewCriterion(ImportCategoryI18nTableMap::ID, $value[0]);
|
||||||
$criterion->addAnd($criteria->getNewCriterion(ImportExportCategoryI18nTableMap::LOCALE, $value[1]));
|
$criterion->addAnd($criteria->getNewCriterion(ImportCategoryI18nTableMap::LOCALE, $value[1]));
|
||||||
$criteria->addOr($criterion);
|
$criteria->addOr($criterion);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$query = ImportExportCategoryI18nQuery::create()->mergeWith($criteria);
|
$query = ImportCategoryI18nQuery::create()->mergeWith($criteria);
|
||||||
|
|
||||||
if ($values instanceof Criteria) { ImportExportCategoryI18nTableMap::clearInstancePool();
|
if ($values instanceof Criteria) { ImportCategoryI18nTableMap::clearInstancePool();
|
||||||
} elseif (!is_object($values)) { // it's a primary key, or an array of pks
|
} elseif (!is_object($values)) { // it's a primary key, or an array of pks
|
||||||
foreach ((array) $values as $singleval) { ImportExportCategoryI18nTableMap::removeInstanceFromPool($singleval);
|
foreach ((array) $values as $singleval) { ImportCategoryI18nTableMap::removeInstanceFromPool($singleval);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -419,20 +419,20 @@ class ImportExportCategoryI18nTableMap extends TableMap
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deletes all rows from the import_export_category_i18n table.
|
* Deletes all rows from the import_category_i18n table.
|
||||||
*
|
*
|
||||||
* @param ConnectionInterface $con the connection to use
|
* @param ConnectionInterface $con the connection to use
|
||||||
* @return int The number of affected rows (if supported by underlying database driver).
|
* @return int The number of affected rows (if supported by underlying database driver).
|
||||||
*/
|
*/
|
||||||
public static function doDeleteAll(ConnectionInterface $con = null)
|
public static function doDeleteAll(ConnectionInterface $con = null)
|
||||||
{
|
{
|
||||||
return ImportExportCategoryI18nQuery::create()->doDeleteAll($con);
|
return ImportCategoryI18nQuery::create()->doDeleteAll($con);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Performs an INSERT on the database, given a ImportExportCategoryI18n or Criteria object.
|
* Performs an INSERT on the database, given a ImportCategoryI18n or Criteria object.
|
||||||
*
|
*
|
||||||
* @param mixed $criteria Criteria or ImportExportCategoryI18n object containing data that is used to create the INSERT statement.
|
* @param mixed $criteria Criteria or ImportCategoryI18n object containing data that is used to create the INSERT statement.
|
||||||
* @param ConnectionInterface $con the ConnectionInterface connection to use
|
* @param ConnectionInterface $con the ConnectionInterface connection to use
|
||||||
* @return mixed The new primary key.
|
* @return mixed The new primary key.
|
||||||
* @throws PropelException Any exceptions caught during processing will be
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
@@ -441,18 +441,18 @@ class ImportExportCategoryI18nTableMap extends TableMap
|
|||||||
public static function doInsert($criteria, ConnectionInterface $con = null)
|
public static function doInsert($criteria, ConnectionInterface $con = null)
|
||||||
{
|
{
|
||||||
if (null === $con) {
|
if (null === $con) {
|
||||||
$con = Propel::getServiceContainer()->getWriteConnection(ImportExportCategoryI18nTableMap::DATABASE_NAME);
|
$con = Propel::getServiceContainer()->getWriteConnection(ImportCategoryI18nTableMap::DATABASE_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($criteria instanceof Criteria) {
|
if ($criteria instanceof Criteria) {
|
||||||
$criteria = clone $criteria; // rename for clarity
|
$criteria = clone $criteria; // rename for clarity
|
||||||
} else {
|
} else {
|
||||||
$criteria = $criteria->buildCriteria(); // build Criteria from ImportExportCategoryI18n object
|
$criteria = $criteria->buildCriteria(); // build Criteria from ImportCategoryI18n object
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Set the correct dbName
|
// Set the correct dbName
|
||||||
$query = ImportExportCategoryI18nQuery::create()->mergeWith($criteria);
|
$query = ImportCategoryI18nQuery::create()->mergeWith($criteria);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// use transaction because $criteria could contain info
|
// use transaction because $criteria could contain info
|
||||||
@@ -468,7 +468,7 @@ class ImportExportCategoryI18nTableMap extends TableMap
|
|||||||
return $pk;
|
return $pk;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // ImportExportCategoryI18nTableMap
|
} // ImportCategoryI18nTableMap
|
||||||
// This is the static code needed to register the TableMap for this table with the main Propel class.
|
// This is the static code needed to register the TableMap for this table with the main Propel class.
|
||||||
//
|
//
|
||||||
ImportExportCategoryI18nTableMap::buildTableMap();
|
ImportCategoryI18nTableMap::buildTableMap();
|
||||||
@@ -11,12 +11,12 @@ use Propel\Runtime\Exception\PropelException;
|
|||||||
use Propel\Runtime\Map\RelationMap;
|
use Propel\Runtime\Map\RelationMap;
|
||||||
use Propel\Runtime\Map\TableMap;
|
use Propel\Runtime\Map\TableMap;
|
||||||
use Propel\Runtime\Map\TableMapTrait;
|
use Propel\Runtime\Map\TableMapTrait;
|
||||||
use Thelia\Model\ImportExportCategory;
|
use Thelia\Model\ImportCategory;
|
||||||
use Thelia\Model\ImportExportCategoryQuery;
|
use Thelia\Model\ImportCategoryQuery;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class defines the structure of the 'import_export_category' table.
|
* This class defines the structure of the 'import_category' table.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
@@ -26,14 +26,14 @@ use Thelia\Model\ImportExportCategoryQuery;
|
|||||||
* (i.e. if it's a text column type).
|
* (i.e. if it's a text column type).
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
class ImportExportCategoryTableMap extends TableMap
|
class ImportCategoryTableMap extends TableMap
|
||||||
{
|
{
|
||||||
use InstancePoolTrait;
|
use InstancePoolTrait;
|
||||||
use TableMapTrait;
|
use TableMapTrait;
|
||||||
/**
|
/**
|
||||||
* The (dot-path) name of this class
|
* The (dot-path) name of this class
|
||||||
*/
|
*/
|
||||||
const CLASS_NAME = 'Thelia.Model.Map.ImportExportCategoryTableMap';
|
const CLASS_NAME = 'Thelia.Model.Map.ImportCategoryTableMap';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The default database name for this class
|
* The default database name for this class
|
||||||
@@ -43,17 +43,17 @@ class ImportExportCategoryTableMap extends TableMap
|
|||||||
/**
|
/**
|
||||||
* The table name for this class
|
* The table name for this class
|
||||||
*/
|
*/
|
||||||
const TABLE_NAME = 'import_export_category';
|
const TABLE_NAME = 'import_category';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The related Propel class for this table
|
* The related Propel class for this table
|
||||||
*/
|
*/
|
||||||
const OM_CLASS = '\\Thelia\\Model\\ImportExportCategory';
|
const OM_CLASS = '\\Thelia\\Model\\ImportCategory';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A class that can be returned by this tableMap
|
* A class that can be returned by this tableMap
|
||||||
*/
|
*/
|
||||||
const CLASS_DEFAULT = 'Thelia.Model.ImportExportCategory';
|
const CLASS_DEFAULT = 'Thelia.Model.ImportCategory';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The total number of columns
|
* The total number of columns
|
||||||
@@ -73,22 +73,22 @@ class ImportExportCategoryTableMap extends TableMap
|
|||||||
/**
|
/**
|
||||||
* the column name for the ID field
|
* the column name for the ID field
|
||||||
*/
|
*/
|
||||||
const ID = 'import_export_category.ID';
|
const ID = 'import_category.ID';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the column name for the POSITION field
|
* the column name for the POSITION field
|
||||||
*/
|
*/
|
||||||
const POSITION = 'import_export_category.POSITION';
|
const POSITION = 'import_category.POSITION';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the column name for the CREATED_AT field
|
* the column name for the CREATED_AT field
|
||||||
*/
|
*/
|
||||||
const CREATED_AT = 'import_export_category.CREATED_AT';
|
const CREATED_AT = 'import_category.CREATED_AT';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the column name for the UPDATED_AT field
|
* the column name for the UPDATED_AT field
|
||||||
*/
|
*/
|
||||||
const UPDATED_AT = 'import_export_category.UPDATED_AT';
|
const UPDATED_AT = 'import_category.UPDATED_AT';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The default string format for model objects of the related table
|
* The default string format for model objects of the related table
|
||||||
@@ -113,7 +113,7 @@ class ImportExportCategoryTableMap extends TableMap
|
|||||||
protected static $fieldNames = array (
|
protected static $fieldNames = array (
|
||||||
self::TYPE_PHPNAME => array('Id', 'Position', 'CreatedAt', 'UpdatedAt', ),
|
self::TYPE_PHPNAME => array('Id', 'Position', 'CreatedAt', 'UpdatedAt', ),
|
||||||
self::TYPE_STUDLYPHPNAME => array('id', 'position', 'createdAt', 'updatedAt', ),
|
self::TYPE_STUDLYPHPNAME => array('id', 'position', 'createdAt', 'updatedAt', ),
|
||||||
self::TYPE_COLNAME => array(ImportExportCategoryTableMap::ID, ImportExportCategoryTableMap::POSITION, ImportExportCategoryTableMap::CREATED_AT, ImportExportCategoryTableMap::UPDATED_AT, ),
|
self::TYPE_COLNAME => array(ImportCategoryTableMap::ID, ImportCategoryTableMap::POSITION, ImportCategoryTableMap::CREATED_AT, ImportCategoryTableMap::UPDATED_AT, ),
|
||||||
self::TYPE_RAW_COLNAME => array('ID', 'POSITION', 'CREATED_AT', 'UPDATED_AT', ),
|
self::TYPE_RAW_COLNAME => array('ID', 'POSITION', 'CREATED_AT', 'UPDATED_AT', ),
|
||||||
self::TYPE_FIELDNAME => array('id', 'position', 'created_at', 'updated_at', ),
|
self::TYPE_FIELDNAME => array('id', 'position', 'created_at', 'updated_at', ),
|
||||||
self::TYPE_NUM => array(0, 1, 2, 3, )
|
self::TYPE_NUM => array(0, 1, 2, 3, )
|
||||||
@@ -128,7 +128,7 @@ class ImportExportCategoryTableMap extends TableMap
|
|||||||
protected static $fieldKeys = array (
|
protected static $fieldKeys = array (
|
||||||
self::TYPE_PHPNAME => array('Id' => 0, 'Position' => 1, 'CreatedAt' => 2, 'UpdatedAt' => 3, ),
|
self::TYPE_PHPNAME => array('Id' => 0, 'Position' => 1, 'CreatedAt' => 2, 'UpdatedAt' => 3, ),
|
||||||
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'position' => 1, 'createdAt' => 2, 'updatedAt' => 3, ),
|
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'position' => 1, 'createdAt' => 2, 'updatedAt' => 3, ),
|
||||||
self::TYPE_COLNAME => array(ImportExportCategoryTableMap::ID => 0, ImportExportCategoryTableMap::POSITION => 1, ImportExportCategoryTableMap::CREATED_AT => 2, ImportExportCategoryTableMap::UPDATED_AT => 3, ),
|
self::TYPE_COLNAME => array(ImportCategoryTableMap::ID => 0, ImportCategoryTableMap::POSITION => 1, ImportCategoryTableMap::CREATED_AT => 2, ImportCategoryTableMap::UPDATED_AT => 3, ),
|
||||||
self::TYPE_RAW_COLNAME => array('ID' => 0, 'POSITION' => 1, 'CREATED_AT' => 2, 'UPDATED_AT' => 3, ),
|
self::TYPE_RAW_COLNAME => array('ID' => 0, 'POSITION' => 1, 'CREATED_AT' => 2, 'UPDATED_AT' => 3, ),
|
||||||
self::TYPE_FIELDNAME => array('id' => 0, 'position' => 1, 'created_at' => 2, 'updated_at' => 3, ),
|
self::TYPE_FIELDNAME => array('id' => 0, 'position' => 1, 'created_at' => 2, 'updated_at' => 3, ),
|
||||||
self::TYPE_NUM => array(0, 1, 2, 3, )
|
self::TYPE_NUM => array(0, 1, 2, 3, )
|
||||||
@@ -144,9 +144,9 @@ class ImportExportCategoryTableMap extends TableMap
|
|||||||
public function initialize()
|
public function initialize()
|
||||||
{
|
{
|
||||||
// attributes
|
// attributes
|
||||||
$this->setName('import_export_category');
|
$this->setName('import_category');
|
||||||
$this->setPhpName('ImportExportCategory');
|
$this->setPhpName('ImportCategory');
|
||||||
$this->setClassName('\\Thelia\\Model\\ImportExportCategory');
|
$this->setClassName('\\Thelia\\Model\\ImportCategory');
|
||||||
$this->setPackage('Thelia.Model');
|
$this->setPackage('Thelia.Model');
|
||||||
$this->setUseIdGenerator(true);
|
$this->setUseIdGenerator(true);
|
||||||
// columns
|
// columns
|
||||||
@@ -161,8 +161,8 @@ class ImportExportCategoryTableMap extends TableMap
|
|||||||
*/
|
*/
|
||||||
public function buildRelations()
|
public function buildRelations()
|
||||||
{
|
{
|
||||||
$this->addRelation('ImportExportType', '\\Thelia\\Model\\ImportExportType', RelationMap::ONE_TO_MANY, array('id' => 'import_export_category_id', ), 'CASCADE', 'RESTRICT', 'ImportExportTypes');
|
$this->addRelation('Import', '\\Thelia\\Model\\Import', RelationMap::ONE_TO_MANY, array('id' => 'import_category_id', ), 'CASCADE', 'RESTRICT', 'Imports');
|
||||||
$this->addRelation('ImportExportCategoryI18n', '\\Thelia\\Model\\ImportExportCategoryI18n', RelationMap::ONE_TO_MANY, array('id' => 'id', ), 'CASCADE', null, 'ImportExportCategoryI18ns');
|
$this->addRelation('ImportCategoryI18n', '\\Thelia\\Model\\ImportCategoryI18n', RelationMap::ONE_TO_MANY, array('id' => 'id', ), 'CASCADE', null, 'ImportCategoryI18ns');
|
||||||
} // buildRelations()
|
} // buildRelations()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -179,14 +179,14 @@ class ImportExportCategoryTableMap extends TableMap
|
|||||||
);
|
);
|
||||||
} // getBehaviors()
|
} // getBehaviors()
|
||||||
/**
|
/**
|
||||||
* Method to invalidate the instance pool of all tables related to import_export_category * by a foreign key with ON DELETE CASCADE
|
* Method to invalidate the instance pool of all tables related to import_category * by a foreign key with ON DELETE CASCADE
|
||||||
*/
|
*/
|
||||||
public static function clearRelatedInstancePool()
|
public static function clearRelatedInstancePool()
|
||||||
{
|
{
|
||||||
// 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.
|
||||||
ImportExportTypeTableMap::clearInstancePool();
|
ImportTableMap::clearInstancePool();
|
||||||
ImportExportCategoryI18nTableMap::clearInstancePool();
|
ImportCategoryI18nTableMap::clearInstancePool();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -245,7 +245,7 @@ class ImportExportCategoryTableMap extends TableMap
|
|||||||
*/
|
*/
|
||||||
public static function getOMClass($withPrefix = true)
|
public static function getOMClass($withPrefix = true)
|
||||||
{
|
{
|
||||||
return $withPrefix ? ImportExportCategoryTableMap::CLASS_DEFAULT : ImportExportCategoryTableMap::OM_CLASS;
|
return $withPrefix ? ImportCategoryTableMap::CLASS_DEFAULT : ImportCategoryTableMap::OM_CLASS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -259,21 +259,21 @@ class ImportExportCategoryTableMap extends TableMap
|
|||||||
*
|
*
|
||||||
* @throws PropelException Any exceptions caught during processing will be
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
* rethrown wrapped into a PropelException.
|
* rethrown wrapped into a PropelException.
|
||||||
* @return array (ImportExportCategory object, last column rank)
|
* @return array (ImportCategory object, last column rank)
|
||||||
*/
|
*/
|
||||||
public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
|
public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
|
||||||
{
|
{
|
||||||
$key = ImportExportCategoryTableMap::getPrimaryKeyHashFromRow($row, $offset, $indexType);
|
$key = ImportCategoryTableMap::getPrimaryKeyHashFromRow($row, $offset, $indexType);
|
||||||
if (null !== ($obj = ImportExportCategoryTableMap::getInstanceFromPool($key))) {
|
if (null !== ($obj = ImportCategoryTableMap::getInstanceFromPool($key))) {
|
||||||
// We no longer rehydrate the object, since this can cause data loss.
|
// We no longer rehydrate the object, since this can cause data loss.
|
||||||
// See http://www.propelorm.org/ticket/509
|
// See http://www.propelorm.org/ticket/509
|
||||||
// $obj->hydrate($row, $offset, true); // rehydrate
|
// $obj->hydrate($row, $offset, true); // rehydrate
|
||||||
$col = $offset + ImportExportCategoryTableMap::NUM_HYDRATE_COLUMNS;
|
$col = $offset + ImportCategoryTableMap::NUM_HYDRATE_COLUMNS;
|
||||||
} else {
|
} else {
|
||||||
$cls = ImportExportCategoryTableMap::OM_CLASS;
|
$cls = ImportCategoryTableMap::OM_CLASS;
|
||||||
$obj = new $cls();
|
$obj = new $cls();
|
||||||
$col = $obj->hydrate($row, $offset, false, $indexType);
|
$col = $obj->hydrate($row, $offset, false, $indexType);
|
||||||
ImportExportCategoryTableMap::addInstanceToPool($obj, $key);
|
ImportCategoryTableMap::addInstanceToPool($obj, $key);
|
||||||
}
|
}
|
||||||
|
|
||||||
return array($obj, $col);
|
return array($obj, $col);
|
||||||
@@ -296,8 +296,8 @@ class ImportExportCategoryTableMap extends TableMap
|
|||||||
$cls = static::getOMClass(false);
|
$cls = static::getOMClass(false);
|
||||||
// populate the object(s)
|
// populate the object(s)
|
||||||
while ($row = $dataFetcher->fetch()) {
|
while ($row = $dataFetcher->fetch()) {
|
||||||
$key = ImportExportCategoryTableMap::getPrimaryKeyHashFromRow($row, 0, $dataFetcher->getIndexType());
|
$key = ImportCategoryTableMap::getPrimaryKeyHashFromRow($row, 0, $dataFetcher->getIndexType());
|
||||||
if (null !== ($obj = ImportExportCategoryTableMap::getInstanceFromPool($key))) {
|
if (null !== ($obj = ImportCategoryTableMap::getInstanceFromPool($key))) {
|
||||||
// We no longer rehydrate the object, since this can cause data loss.
|
// We no longer rehydrate the object, since this can cause data loss.
|
||||||
// See http://www.propelorm.org/ticket/509
|
// See http://www.propelorm.org/ticket/509
|
||||||
// $obj->hydrate($row, 0, true); // rehydrate
|
// $obj->hydrate($row, 0, true); // rehydrate
|
||||||
@@ -306,7 +306,7 @@ class ImportExportCategoryTableMap extends TableMap
|
|||||||
$obj = new $cls();
|
$obj = new $cls();
|
||||||
$obj->hydrate($row);
|
$obj->hydrate($row);
|
||||||
$results[] = $obj;
|
$results[] = $obj;
|
||||||
ImportExportCategoryTableMap::addInstanceToPool($obj, $key);
|
ImportCategoryTableMap::addInstanceToPool($obj, $key);
|
||||||
} // if key exists
|
} // if key exists
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -327,10 +327,10 @@ class ImportExportCategoryTableMap extends TableMap
|
|||||||
public static function addSelectColumns(Criteria $criteria, $alias = null)
|
public static function addSelectColumns(Criteria $criteria, $alias = null)
|
||||||
{
|
{
|
||||||
if (null === $alias) {
|
if (null === $alias) {
|
||||||
$criteria->addSelectColumn(ImportExportCategoryTableMap::ID);
|
$criteria->addSelectColumn(ImportCategoryTableMap::ID);
|
||||||
$criteria->addSelectColumn(ImportExportCategoryTableMap::POSITION);
|
$criteria->addSelectColumn(ImportCategoryTableMap::POSITION);
|
||||||
$criteria->addSelectColumn(ImportExportCategoryTableMap::CREATED_AT);
|
$criteria->addSelectColumn(ImportCategoryTableMap::CREATED_AT);
|
||||||
$criteria->addSelectColumn(ImportExportCategoryTableMap::UPDATED_AT);
|
$criteria->addSelectColumn(ImportCategoryTableMap::UPDATED_AT);
|
||||||
} else {
|
} else {
|
||||||
$criteria->addSelectColumn($alias . '.ID');
|
$criteria->addSelectColumn($alias . '.ID');
|
||||||
$criteria->addSelectColumn($alias . '.POSITION');
|
$criteria->addSelectColumn($alias . '.POSITION');
|
||||||
@@ -348,7 +348,7 @@ class ImportExportCategoryTableMap extends TableMap
|
|||||||
*/
|
*/
|
||||||
public static function getTableMap()
|
public static function getTableMap()
|
||||||
{
|
{
|
||||||
return Propel::getServiceContainer()->getDatabaseMap(ImportExportCategoryTableMap::DATABASE_NAME)->getTable(ImportExportCategoryTableMap::TABLE_NAME);
|
return Propel::getServiceContainer()->getDatabaseMap(ImportCategoryTableMap::DATABASE_NAME)->getTable(ImportCategoryTableMap::TABLE_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -356,16 +356,16 @@ class ImportExportCategoryTableMap extends TableMap
|
|||||||
*/
|
*/
|
||||||
public static function buildTableMap()
|
public static function buildTableMap()
|
||||||
{
|
{
|
||||||
$dbMap = Propel::getServiceContainer()->getDatabaseMap(ImportExportCategoryTableMap::DATABASE_NAME);
|
$dbMap = Propel::getServiceContainer()->getDatabaseMap(ImportCategoryTableMap::DATABASE_NAME);
|
||||||
if (!$dbMap->hasTable(ImportExportCategoryTableMap::TABLE_NAME)) {
|
if (!$dbMap->hasTable(ImportCategoryTableMap::TABLE_NAME)) {
|
||||||
$dbMap->addTableObject(new ImportExportCategoryTableMap());
|
$dbMap->addTableObject(new ImportCategoryTableMap());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Performs a DELETE on the database, given a ImportExportCategory or Criteria object OR a primary key value.
|
* Performs a DELETE on the database, given a ImportCategory or Criteria object OR a primary key value.
|
||||||
*
|
*
|
||||||
* @param mixed $values Criteria or ImportExportCategory object or primary key or array of primary keys
|
* @param mixed $values Criteria or ImportCategory object or primary key or array of primary keys
|
||||||
* which is used to create the DELETE statement
|
* which is used to create the DELETE statement
|
||||||
* @param ConnectionInterface $con the connection to use
|
* @param ConnectionInterface $con the connection to use
|
||||||
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
|
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
|
||||||
@@ -376,25 +376,25 @@ class ImportExportCategoryTableMap extends TableMap
|
|||||||
public static function doDelete($values, ConnectionInterface $con = null)
|
public static function doDelete($values, ConnectionInterface $con = null)
|
||||||
{
|
{
|
||||||
if (null === $con) {
|
if (null === $con) {
|
||||||
$con = Propel::getServiceContainer()->getWriteConnection(ImportExportCategoryTableMap::DATABASE_NAME);
|
$con = Propel::getServiceContainer()->getWriteConnection(ImportCategoryTableMap::DATABASE_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($values instanceof Criteria) {
|
if ($values instanceof Criteria) {
|
||||||
// rename for clarity
|
// rename for clarity
|
||||||
$criteria = $values;
|
$criteria = $values;
|
||||||
} elseif ($values instanceof \Thelia\Model\ImportExportCategory) { // it's a model object
|
} elseif ($values instanceof \Thelia\Model\ImportCategory) { // it's a model object
|
||||||
// create criteria based on pk values
|
// create criteria based on pk values
|
||||||
$criteria = $values->buildPkeyCriteria();
|
$criteria = $values->buildPkeyCriteria();
|
||||||
} else { // it's a primary key, or an array of pks
|
} else { // it's a primary key, or an array of pks
|
||||||
$criteria = new Criteria(ImportExportCategoryTableMap::DATABASE_NAME);
|
$criteria = new Criteria(ImportCategoryTableMap::DATABASE_NAME);
|
||||||
$criteria->add(ImportExportCategoryTableMap::ID, (array) $values, Criteria::IN);
|
$criteria->add(ImportCategoryTableMap::ID, (array) $values, Criteria::IN);
|
||||||
}
|
}
|
||||||
|
|
||||||
$query = ImportExportCategoryQuery::create()->mergeWith($criteria);
|
$query = ImportCategoryQuery::create()->mergeWith($criteria);
|
||||||
|
|
||||||
if ($values instanceof Criteria) { ImportExportCategoryTableMap::clearInstancePool();
|
if ($values instanceof Criteria) { ImportCategoryTableMap::clearInstancePool();
|
||||||
} elseif (!is_object($values)) { // it's a primary key, or an array of pks
|
} elseif (!is_object($values)) { // it's a primary key, or an array of pks
|
||||||
foreach ((array) $values as $singleval) { ImportExportCategoryTableMap::removeInstanceFromPool($singleval);
|
foreach ((array) $values as $singleval) { ImportCategoryTableMap::removeInstanceFromPool($singleval);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -402,20 +402,20 @@ class ImportExportCategoryTableMap extends TableMap
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deletes all rows from the import_export_category table.
|
* Deletes all rows from the import_category table.
|
||||||
*
|
*
|
||||||
* @param ConnectionInterface $con the connection to use
|
* @param ConnectionInterface $con the connection to use
|
||||||
* @return int The number of affected rows (if supported by underlying database driver).
|
* @return int The number of affected rows (if supported by underlying database driver).
|
||||||
*/
|
*/
|
||||||
public static function doDeleteAll(ConnectionInterface $con = null)
|
public static function doDeleteAll(ConnectionInterface $con = null)
|
||||||
{
|
{
|
||||||
return ImportExportCategoryQuery::create()->doDeleteAll($con);
|
return ImportCategoryQuery::create()->doDeleteAll($con);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Performs an INSERT on the database, given a ImportExportCategory or Criteria object.
|
* Performs an INSERT on the database, given a ImportCategory or Criteria object.
|
||||||
*
|
*
|
||||||
* @param mixed $criteria Criteria or ImportExportCategory object containing data that is used to create the INSERT statement.
|
* @param mixed $criteria Criteria or ImportCategory object containing data that is used to create the INSERT statement.
|
||||||
* @param ConnectionInterface $con the ConnectionInterface connection to use
|
* @param ConnectionInterface $con the ConnectionInterface connection to use
|
||||||
* @return mixed The new primary key.
|
* @return mixed The new primary key.
|
||||||
* @throws PropelException Any exceptions caught during processing will be
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
@@ -424,22 +424,22 @@ class ImportExportCategoryTableMap extends TableMap
|
|||||||
public static function doInsert($criteria, ConnectionInterface $con = null)
|
public static function doInsert($criteria, ConnectionInterface $con = null)
|
||||||
{
|
{
|
||||||
if (null === $con) {
|
if (null === $con) {
|
||||||
$con = Propel::getServiceContainer()->getWriteConnection(ImportExportCategoryTableMap::DATABASE_NAME);
|
$con = Propel::getServiceContainer()->getWriteConnection(ImportCategoryTableMap::DATABASE_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($criteria instanceof Criteria) {
|
if ($criteria instanceof Criteria) {
|
||||||
$criteria = clone $criteria; // rename for clarity
|
$criteria = clone $criteria; // rename for clarity
|
||||||
} else {
|
} else {
|
||||||
$criteria = $criteria->buildCriteria(); // build Criteria from ImportExportCategory object
|
$criteria = $criteria->buildCriteria(); // build Criteria from ImportCategory object
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($criteria->containsKey(ImportExportCategoryTableMap::ID) && $criteria->keyContainsValue(ImportExportCategoryTableMap::ID) ) {
|
if ($criteria->containsKey(ImportCategoryTableMap::ID) && $criteria->keyContainsValue(ImportCategoryTableMap::ID) ) {
|
||||||
throw new PropelException('Cannot insert a value for auto-increment primary key ('.ImportExportCategoryTableMap::ID.')');
|
throw new PropelException('Cannot insert a value for auto-increment primary key ('.ImportCategoryTableMap::ID.')');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Set the correct dbName
|
// Set the correct dbName
|
||||||
$query = ImportExportCategoryQuery::create()->mergeWith($criteria);
|
$query = ImportCategoryQuery::create()->mergeWith($criteria);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// use transaction because $criteria could contain info
|
// use transaction because $criteria could contain info
|
||||||
@@ -455,7 +455,7 @@ class ImportExportCategoryTableMap extends TableMap
|
|||||||
return $pk;
|
return $pk;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // ImportExportCategoryTableMap
|
} // ImportCategoryTableMap
|
||||||
// This is the static code needed to register the TableMap for this table with the main Propel class.
|
// This is the static code needed to register the TableMap for this table with the main Propel class.
|
||||||
//
|
//
|
||||||
ImportExportCategoryTableMap::buildTableMap();
|
ImportCategoryTableMap::buildTableMap();
|
||||||
@@ -11,12 +11,12 @@ use Propel\Runtime\Exception\PropelException;
|
|||||||
use Propel\Runtime\Map\RelationMap;
|
use Propel\Runtime\Map\RelationMap;
|
||||||
use Propel\Runtime\Map\TableMap;
|
use Propel\Runtime\Map\TableMap;
|
||||||
use Propel\Runtime\Map\TableMapTrait;
|
use Propel\Runtime\Map\TableMapTrait;
|
||||||
use Thelia\Model\ImportExportTypeI18n;
|
use Thelia\Model\ImportI18n;
|
||||||
use Thelia\Model\ImportExportTypeI18nQuery;
|
use Thelia\Model\ImportI18nQuery;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class defines the structure of the 'import_export_type_i18n' table.
|
* This class defines the structure of the 'import_i18n' table.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
@@ -26,14 +26,14 @@ use Thelia\Model\ImportExportTypeI18nQuery;
|
|||||||
* (i.e. if it's a text column type).
|
* (i.e. if it's a text column type).
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
class ImportExportTypeI18nTableMap extends TableMap
|
class ImportI18nTableMap extends TableMap
|
||||||
{
|
{
|
||||||
use InstancePoolTrait;
|
use InstancePoolTrait;
|
||||||
use TableMapTrait;
|
use TableMapTrait;
|
||||||
/**
|
/**
|
||||||
* The (dot-path) name of this class
|
* The (dot-path) name of this class
|
||||||
*/
|
*/
|
||||||
const CLASS_NAME = 'Thelia.Model.Map.ImportExportTypeI18nTableMap';
|
const CLASS_NAME = 'Thelia.Model.Map.ImportI18nTableMap';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The default database name for this class
|
* The default database name for this class
|
||||||
@@ -43,17 +43,17 @@ class ImportExportTypeI18nTableMap extends TableMap
|
|||||||
/**
|
/**
|
||||||
* The table name for this class
|
* The table name for this class
|
||||||
*/
|
*/
|
||||||
const TABLE_NAME = 'import_export_type_i18n';
|
const TABLE_NAME = 'import_i18n';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The related Propel class for this table
|
* The related Propel class for this table
|
||||||
*/
|
*/
|
||||||
const OM_CLASS = '\\Thelia\\Model\\ImportExportTypeI18n';
|
const OM_CLASS = '\\Thelia\\Model\\ImportI18n';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A class that can be returned by this tableMap
|
* A class that can be returned by this tableMap
|
||||||
*/
|
*/
|
||||||
const CLASS_DEFAULT = 'Thelia.Model.ImportExportTypeI18n';
|
const CLASS_DEFAULT = 'Thelia.Model.ImportI18n';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The total number of columns
|
* The total number of columns
|
||||||
@@ -73,22 +73,22 @@ class ImportExportTypeI18nTableMap extends TableMap
|
|||||||
/**
|
/**
|
||||||
* the column name for the ID field
|
* the column name for the ID field
|
||||||
*/
|
*/
|
||||||
const ID = 'import_export_type_i18n.ID';
|
const ID = 'import_i18n.ID';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the column name for the LOCALE field
|
* the column name for the LOCALE field
|
||||||
*/
|
*/
|
||||||
const LOCALE = 'import_export_type_i18n.LOCALE';
|
const LOCALE = 'import_i18n.LOCALE';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the column name for the TITLE field
|
* the column name for the TITLE field
|
||||||
*/
|
*/
|
||||||
const TITLE = 'import_export_type_i18n.TITLE';
|
const TITLE = 'import_i18n.TITLE';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the column name for the DESCRIPTION field
|
* the column name for the DESCRIPTION field
|
||||||
*/
|
*/
|
||||||
const DESCRIPTION = 'import_export_type_i18n.DESCRIPTION';
|
const DESCRIPTION = 'import_i18n.DESCRIPTION';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The default string format for model objects of the related table
|
* The default string format for model objects of the related table
|
||||||
@@ -104,7 +104,7 @@ class ImportExportTypeI18nTableMap extends TableMap
|
|||||||
protected static $fieldNames = array (
|
protected static $fieldNames = array (
|
||||||
self::TYPE_PHPNAME => array('Id', 'Locale', 'Title', 'Description', ),
|
self::TYPE_PHPNAME => array('Id', 'Locale', 'Title', 'Description', ),
|
||||||
self::TYPE_STUDLYPHPNAME => array('id', 'locale', 'title', 'description', ),
|
self::TYPE_STUDLYPHPNAME => array('id', 'locale', 'title', 'description', ),
|
||||||
self::TYPE_COLNAME => array(ImportExportTypeI18nTableMap::ID, ImportExportTypeI18nTableMap::LOCALE, ImportExportTypeI18nTableMap::TITLE, ImportExportTypeI18nTableMap::DESCRIPTION, ),
|
self::TYPE_COLNAME => array(ImportI18nTableMap::ID, ImportI18nTableMap::LOCALE, ImportI18nTableMap::TITLE, ImportI18nTableMap::DESCRIPTION, ),
|
||||||
self::TYPE_RAW_COLNAME => array('ID', 'LOCALE', 'TITLE', 'DESCRIPTION', ),
|
self::TYPE_RAW_COLNAME => array('ID', 'LOCALE', 'TITLE', 'DESCRIPTION', ),
|
||||||
self::TYPE_FIELDNAME => array('id', 'locale', 'title', 'description', ),
|
self::TYPE_FIELDNAME => array('id', 'locale', 'title', 'description', ),
|
||||||
self::TYPE_NUM => array(0, 1, 2, 3, )
|
self::TYPE_NUM => array(0, 1, 2, 3, )
|
||||||
@@ -119,7 +119,7 @@ class ImportExportTypeI18nTableMap extends TableMap
|
|||||||
protected static $fieldKeys = array (
|
protected static $fieldKeys = array (
|
||||||
self::TYPE_PHPNAME => array('Id' => 0, 'Locale' => 1, 'Title' => 2, 'Description' => 3, ),
|
self::TYPE_PHPNAME => array('Id' => 0, 'Locale' => 1, 'Title' => 2, 'Description' => 3, ),
|
||||||
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'locale' => 1, 'title' => 2, 'description' => 3, ),
|
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'locale' => 1, 'title' => 2, 'description' => 3, ),
|
||||||
self::TYPE_COLNAME => array(ImportExportTypeI18nTableMap::ID => 0, ImportExportTypeI18nTableMap::LOCALE => 1, ImportExportTypeI18nTableMap::TITLE => 2, ImportExportTypeI18nTableMap::DESCRIPTION => 3, ),
|
self::TYPE_COLNAME => array(ImportI18nTableMap::ID => 0, ImportI18nTableMap::LOCALE => 1, ImportI18nTableMap::TITLE => 2, ImportI18nTableMap::DESCRIPTION => 3, ),
|
||||||
self::TYPE_RAW_COLNAME => array('ID' => 0, 'LOCALE' => 1, 'TITLE' => 2, 'DESCRIPTION' => 3, ),
|
self::TYPE_RAW_COLNAME => array('ID' => 0, 'LOCALE' => 1, 'TITLE' => 2, 'DESCRIPTION' => 3, ),
|
||||||
self::TYPE_FIELDNAME => array('id' => 0, 'locale' => 1, 'title' => 2, 'description' => 3, ),
|
self::TYPE_FIELDNAME => array('id' => 0, 'locale' => 1, 'title' => 2, 'description' => 3, ),
|
||||||
self::TYPE_NUM => array(0, 1, 2, 3, )
|
self::TYPE_NUM => array(0, 1, 2, 3, )
|
||||||
@@ -135,13 +135,13 @@ class ImportExportTypeI18nTableMap extends TableMap
|
|||||||
public function initialize()
|
public function initialize()
|
||||||
{
|
{
|
||||||
// attributes
|
// attributes
|
||||||
$this->setName('import_export_type_i18n');
|
$this->setName('import_i18n');
|
||||||
$this->setPhpName('ImportExportTypeI18n');
|
$this->setPhpName('ImportI18n');
|
||||||
$this->setClassName('\\Thelia\\Model\\ImportExportTypeI18n');
|
$this->setClassName('\\Thelia\\Model\\ImportI18n');
|
||||||
$this->setPackage('Thelia.Model');
|
$this->setPackage('Thelia.Model');
|
||||||
$this->setUseIdGenerator(false);
|
$this->setUseIdGenerator(false);
|
||||||
// columns
|
// columns
|
||||||
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'import_export_type', 'ID', true, null, null);
|
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'import', 'ID', true, null, null);
|
||||||
$this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_US');
|
$this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_US');
|
||||||
$this->addColumn('TITLE', 'Title', 'VARCHAR', true, 255, null);
|
$this->addColumn('TITLE', 'Title', 'VARCHAR', true, 255, null);
|
||||||
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
|
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
|
||||||
@@ -152,7 +152,7 @@ class ImportExportTypeI18nTableMap extends TableMap
|
|||||||
*/
|
*/
|
||||||
public function buildRelations()
|
public function buildRelations()
|
||||||
{
|
{
|
||||||
$this->addRelation('ImportExportType', '\\Thelia\\Model\\ImportExportType', RelationMap::MANY_TO_ONE, array('id' => 'id', ), 'CASCADE', null);
|
$this->addRelation('Import', '\\Thelia\\Model\\Import', RelationMap::MANY_TO_ONE, array('id' => 'id', ), 'CASCADE', null);
|
||||||
} // buildRelations()
|
} // buildRelations()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -163,7 +163,7 @@ class ImportExportTypeI18nTableMap extends TableMap
|
|||||||
* to the cache in order to ensure that the same objects are always returned by find*()
|
* to the cache in order to ensure that the same objects are always returned by find*()
|
||||||
* and findPk*() calls.
|
* and findPk*() calls.
|
||||||
*
|
*
|
||||||
* @param \Thelia\Model\ImportExportTypeI18n $obj A \Thelia\Model\ImportExportTypeI18n object.
|
* @param \Thelia\Model\ImportI18n $obj A \Thelia\Model\ImportI18n object.
|
||||||
* @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally).
|
* @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally).
|
||||||
*/
|
*/
|
||||||
public static function addInstanceToPool($obj, $key = null)
|
public static function addInstanceToPool($obj, $key = null)
|
||||||
@@ -184,12 +184,12 @@ class ImportExportTypeI18nTableMap extends TableMap
|
|||||||
* methods in your stub classes -- you may need to explicitly remove objects
|
* methods in your stub classes -- you may need to explicitly remove objects
|
||||||
* from the cache in order to prevent returning objects that no longer exist.
|
* from the cache in order to prevent returning objects that no longer exist.
|
||||||
*
|
*
|
||||||
* @param mixed $value A \Thelia\Model\ImportExportTypeI18n object or a primary key value.
|
* @param mixed $value A \Thelia\Model\ImportI18n object or a primary key value.
|
||||||
*/
|
*/
|
||||||
public static function removeInstanceFromPool($value)
|
public static function removeInstanceFromPool($value)
|
||||||
{
|
{
|
||||||
if (Propel::isInstancePoolingEnabled() && null !== $value) {
|
if (Propel::isInstancePoolingEnabled() && null !== $value) {
|
||||||
if (is_object($value) && $value instanceof \Thelia\Model\ImportExportTypeI18n) {
|
if (is_object($value) && $value instanceof \Thelia\Model\ImportI18n) {
|
||||||
$key = serialize(array((string) $value->getId(), (string) $value->getLocale()));
|
$key = serialize(array((string) $value->getId(), (string) $value->getLocale()));
|
||||||
|
|
||||||
} elseif (is_array($value) && count($value) === 2) {
|
} elseif (is_array($value) && count($value) === 2) {
|
||||||
@@ -200,7 +200,7 @@ class ImportExportTypeI18nTableMap extends TableMap
|
|||||||
|
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
$e = new PropelException("Invalid value passed to removeInstanceFromPool(). Expected primary key or \Thelia\Model\ImportExportTypeI18n object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value, true)));
|
$e = new PropelException("Invalid value passed to removeInstanceFromPool(). Expected primary key or \Thelia\Model\ImportI18n object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value, true)));
|
||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -260,7 +260,7 @@ class ImportExportTypeI18nTableMap extends TableMap
|
|||||||
*/
|
*/
|
||||||
public static function getOMClass($withPrefix = true)
|
public static function getOMClass($withPrefix = true)
|
||||||
{
|
{
|
||||||
return $withPrefix ? ImportExportTypeI18nTableMap::CLASS_DEFAULT : ImportExportTypeI18nTableMap::OM_CLASS;
|
return $withPrefix ? ImportI18nTableMap::CLASS_DEFAULT : ImportI18nTableMap::OM_CLASS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -274,21 +274,21 @@ class ImportExportTypeI18nTableMap extends TableMap
|
|||||||
*
|
*
|
||||||
* @throws PropelException Any exceptions caught during processing will be
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
* rethrown wrapped into a PropelException.
|
* rethrown wrapped into a PropelException.
|
||||||
* @return array (ImportExportTypeI18n object, last column rank)
|
* @return array (ImportI18n object, last column rank)
|
||||||
*/
|
*/
|
||||||
public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
|
public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
|
||||||
{
|
{
|
||||||
$key = ImportExportTypeI18nTableMap::getPrimaryKeyHashFromRow($row, $offset, $indexType);
|
$key = ImportI18nTableMap::getPrimaryKeyHashFromRow($row, $offset, $indexType);
|
||||||
if (null !== ($obj = ImportExportTypeI18nTableMap::getInstanceFromPool($key))) {
|
if (null !== ($obj = ImportI18nTableMap::getInstanceFromPool($key))) {
|
||||||
// We no longer rehydrate the object, since this can cause data loss.
|
// We no longer rehydrate the object, since this can cause data loss.
|
||||||
// See http://www.propelorm.org/ticket/509
|
// See http://www.propelorm.org/ticket/509
|
||||||
// $obj->hydrate($row, $offset, true); // rehydrate
|
// $obj->hydrate($row, $offset, true); // rehydrate
|
||||||
$col = $offset + ImportExportTypeI18nTableMap::NUM_HYDRATE_COLUMNS;
|
$col = $offset + ImportI18nTableMap::NUM_HYDRATE_COLUMNS;
|
||||||
} else {
|
} else {
|
||||||
$cls = ImportExportTypeI18nTableMap::OM_CLASS;
|
$cls = ImportI18nTableMap::OM_CLASS;
|
||||||
$obj = new $cls();
|
$obj = new $cls();
|
||||||
$col = $obj->hydrate($row, $offset, false, $indexType);
|
$col = $obj->hydrate($row, $offset, false, $indexType);
|
||||||
ImportExportTypeI18nTableMap::addInstanceToPool($obj, $key);
|
ImportI18nTableMap::addInstanceToPool($obj, $key);
|
||||||
}
|
}
|
||||||
|
|
||||||
return array($obj, $col);
|
return array($obj, $col);
|
||||||
@@ -311,8 +311,8 @@ class ImportExportTypeI18nTableMap extends TableMap
|
|||||||
$cls = static::getOMClass(false);
|
$cls = static::getOMClass(false);
|
||||||
// populate the object(s)
|
// populate the object(s)
|
||||||
while ($row = $dataFetcher->fetch()) {
|
while ($row = $dataFetcher->fetch()) {
|
||||||
$key = ImportExportTypeI18nTableMap::getPrimaryKeyHashFromRow($row, 0, $dataFetcher->getIndexType());
|
$key = ImportI18nTableMap::getPrimaryKeyHashFromRow($row, 0, $dataFetcher->getIndexType());
|
||||||
if (null !== ($obj = ImportExportTypeI18nTableMap::getInstanceFromPool($key))) {
|
if (null !== ($obj = ImportI18nTableMap::getInstanceFromPool($key))) {
|
||||||
// We no longer rehydrate the object, since this can cause data loss.
|
// We no longer rehydrate the object, since this can cause data loss.
|
||||||
// See http://www.propelorm.org/ticket/509
|
// See http://www.propelorm.org/ticket/509
|
||||||
// $obj->hydrate($row, 0, true); // rehydrate
|
// $obj->hydrate($row, 0, true); // rehydrate
|
||||||
@@ -321,7 +321,7 @@ class ImportExportTypeI18nTableMap extends TableMap
|
|||||||
$obj = new $cls();
|
$obj = new $cls();
|
||||||
$obj->hydrate($row);
|
$obj->hydrate($row);
|
||||||
$results[] = $obj;
|
$results[] = $obj;
|
||||||
ImportExportTypeI18nTableMap::addInstanceToPool($obj, $key);
|
ImportI18nTableMap::addInstanceToPool($obj, $key);
|
||||||
} // if key exists
|
} // if key exists
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -342,10 +342,10 @@ class ImportExportTypeI18nTableMap extends TableMap
|
|||||||
public static function addSelectColumns(Criteria $criteria, $alias = null)
|
public static function addSelectColumns(Criteria $criteria, $alias = null)
|
||||||
{
|
{
|
||||||
if (null === $alias) {
|
if (null === $alias) {
|
||||||
$criteria->addSelectColumn(ImportExportTypeI18nTableMap::ID);
|
$criteria->addSelectColumn(ImportI18nTableMap::ID);
|
||||||
$criteria->addSelectColumn(ImportExportTypeI18nTableMap::LOCALE);
|
$criteria->addSelectColumn(ImportI18nTableMap::LOCALE);
|
||||||
$criteria->addSelectColumn(ImportExportTypeI18nTableMap::TITLE);
|
$criteria->addSelectColumn(ImportI18nTableMap::TITLE);
|
||||||
$criteria->addSelectColumn(ImportExportTypeI18nTableMap::DESCRIPTION);
|
$criteria->addSelectColumn(ImportI18nTableMap::DESCRIPTION);
|
||||||
} else {
|
} else {
|
||||||
$criteria->addSelectColumn($alias . '.ID');
|
$criteria->addSelectColumn($alias . '.ID');
|
||||||
$criteria->addSelectColumn($alias . '.LOCALE');
|
$criteria->addSelectColumn($alias . '.LOCALE');
|
||||||
@@ -363,7 +363,7 @@ class ImportExportTypeI18nTableMap extends TableMap
|
|||||||
*/
|
*/
|
||||||
public static function getTableMap()
|
public static function getTableMap()
|
||||||
{
|
{
|
||||||
return Propel::getServiceContainer()->getDatabaseMap(ImportExportTypeI18nTableMap::DATABASE_NAME)->getTable(ImportExportTypeI18nTableMap::TABLE_NAME);
|
return Propel::getServiceContainer()->getDatabaseMap(ImportI18nTableMap::DATABASE_NAME)->getTable(ImportI18nTableMap::TABLE_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -371,16 +371,16 @@ class ImportExportTypeI18nTableMap extends TableMap
|
|||||||
*/
|
*/
|
||||||
public static function buildTableMap()
|
public static function buildTableMap()
|
||||||
{
|
{
|
||||||
$dbMap = Propel::getServiceContainer()->getDatabaseMap(ImportExportTypeI18nTableMap::DATABASE_NAME);
|
$dbMap = Propel::getServiceContainer()->getDatabaseMap(ImportI18nTableMap::DATABASE_NAME);
|
||||||
if (!$dbMap->hasTable(ImportExportTypeI18nTableMap::TABLE_NAME)) {
|
if (!$dbMap->hasTable(ImportI18nTableMap::TABLE_NAME)) {
|
||||||
$dbMap->addTableObject(new ImportExportTypeI18nTableMap());
|
$dbMap->addTableObject(new ImportI18nTableMap());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Performs a DELETE on the database, given a ImportExportTypeI18n or Criteria object OR a primary key value.
|
* Performs a DELETE on the database, given a ImportI18n or Criteria object OR a primary key value.
|
||||||
*
|
*
|
||||||
* @param mixed $values Criteria or ImportExportTypeI18n object or primary key or array of primary keys
|
* @param mixed $values Criteria or ImportI18n object or primary key or array of primary keys
|
||||||
* which is used to create the DELETE statement
|
* which is used to create the DELETE statement
|
||||||
* @param ConnectionInterface $con the connection to use
|
* @param ConnectionInterface $con the connection to use
|
||||||
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
|
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
|
||||||
@@ -391,17 +391,17 @@ class ImportExportTypeI18nTableMap extends TableMap
|
|||||||
public static function doDelete($values, ConnectionInterface $con = null)
|
public static function doDelete($values, ConnectionInterface $con = null)
|
||||||
{
|
{
|
||||||
if (null === $con) {
|
if (null === $con) {
|
||||||
$con = Propel::getServiceContainer()->getWriteConnection(ImportExportTypeI18nTableMap::DATABASE_NAME);
|
$con = Propel::getServiceContainer()->getWriteConnection(ImportI18nTableMap::DATABASE_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($values instanceof Criteria) {
|
if ($values instanceof Criteria) {
|
||||||
// rename for clarity
|
// rename for clarity
|
||||||
$criteria = $values;
|
$criteria = $values;
|
||||||
} elseif ($values instanceof \Thelia\Model\ImportExportTypeI18n) { // it's a model object
|
} elseif ($values instanceof \Thelia\Model\ImportI18n) { // it's a model object
|
||||||
// create criteria based on pk values
|
// create criteria based on pk values
|
||||||
$criteria = $values->buildPkeyCriteria();
|
$criteria = $values->buildPkeyCriteria();
|
||||||
} else { // it's a primary key, or an array of pks
|
} else { // it's a primary key, or an array of pks
|
||||||
$criteria = new Criteria(ImportExportTypeI18nTableMap::DATABASE_NAME);
|
$criteria = new Criteria(ImportI18nTableMap::DATABASE_NAME);
|
||||||
// primary key is composite; we therefore, expect
|
// primary key is composite; we therefore, expect
|
||||||
// the primary key passed to be an array of pkey values
|
// the primary key passed to be an array of pkey values
|
||||||
if (count($values) == count($values, COUNT_RECURSIVE)) {
|
if (count($values) == count($values, COUNT_RECURSIVE)) {
|
||||||
@@ -409,17 +409,17 @@ class ImportExportTypeI18nTableMap extends TableMap
|
|||||||
$values = array($values);
|
$values = array($values);
|
||||||
}
|
}
|
||||||
foreach ($values as $value) {
|
foreach ($values as $value) {
|
||||||
$criterion = $criteria->getNewCriterion(ImportExportTypeI18nTableMap::ID, $value[0]);
|
$criterion = $criteria->getNewCriterion(ImportI18nTableMap::ID, $value[0]);
|
||||||
$criterion->addAnd($criteria->getNewCriterion(ImportExportTypeI18nTableMap::LOCALE, $value[1]));
|
$criterion->addAnd($criteria->getNewCriterion(ImportI18nTableMap::LOCALE, $value[1]));
|
||||||
$criteria->addOr($criterion);
|
$criteria->addOr($criterion);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$query = ImportExportTypeI18nQuery::create()->mergeWith($criteria);
|
$query = ImportI18nQuery::create()->mergeWith($criteria);
|
||||||
|
|
||||||
if ($values instanceof Criteria) { ImportExportTypeI18nTableMap::clearInstancePool();
|
if ($values instanceof Criteria) { ImportI18nTableMap::clearInstancePool();
|
||||||
} elseif (!is_object($values)) { // it's a primary key, or an array of pks
|
} elseif (!is_object($values)) { // it's a primary key, or an array of pks
|
||||||
foreach ((array) $values as $singleval) { ImportExportTypeI18nTableMap::removeInstanceFromPool($singleval);
|
foreach ((array) $values as $singleval) { ImportI18nTableMap::removeInstanceFromPool($singleval);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -427,20 +427,20 @@ class ImportExportTypeI18nTableMap extends TableMap
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deletes all rows from the import_export_type_i18n table.
|
* Deletes all rows from the import_i18n table.
|
||||||
*
|
*
|
||||||
* @param ConnectionInterface $con the connection to use
|
* @param ConnectionInterface $con the connection to use
|
||||||
* @return int The number of affected rows (if supported by underlying database driver).
|
* @return int The number of affected rows (if supported by underlying database driver).
|
||||||
*/
|
*/
|
||||||
public static function doDeleteAll(ConnectionInterface $con = null)
|
public static function doDeleteAll(ConnectionInterface $con = null)
|
||||||
{
|
{
|
||||||
return ImportExportTypeI18nQuery::create()->doDeleteAll($con);
|
return ImportI18nQuery::create()->doDeleteAll($con);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Performs an INSERT on the database, given a ImportExportTypeI18n or Criteria object.
|
* Performs an INSERT on the database, given a ImportI18n or Criteria object.
|
||||||
*
|
*
|
||||||
* @param mixed $criteria Criteria or ImportExportTypeI18n object containing data that is used to create the INSERT statement.
|
* @param mixed $criteria Criteria or ImportI18n object containing data that is used to create the INSERT statement.
|
||||||
* @param ConnectionInterface $con the ConnectionInterface connection to use
|
* @param ConnectionInterface $con the ConnectionInterface connection to use
|
||||||
* @return mixed The new primary key.
|
* @return mixed The new primary key.
|
||||||
* @throws PropelException Any exceptions caught during processing will be
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
@@ -449,18 +449,18 @@ class ImportExportTypeI18nTableMap extends TableMap
|
|||||||
public static function doInsert($criteria, ConnectionInterface $con = null)
|
public static function doInsert($criteria, ConnectionInterface $con = null)
|
||||||
{
|
{
|
||||||
if (null === $con) {
|
if (null === $con) {
|
||||||
$con = Propel::getServiceContainer()->getWriteConnection(ImportExportTypeI18nTableMap::DATABASE_NAME);
|
$con = Propel::getServiceContainer()->getWriteConnection(ImportI18nTableMap::DATABASE_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($criteria instanceof Criteria) {
|
if ($criteria instanceof Criteria) {
|
||||||
$criteria = clone $criteria; // rename for clarity
|
$criteria = clone $criteria; // rename for clarity
|
||||||
} else {
|
} else {
|
||||||
$criteria = $criteria->buildCriteria(); // build Criteria from ImportExportTypeI18n object
|
$criteria = $criteria->buildCriteria(); // build Criteria from ImportI18n object
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Set the correct dbName
|
// Set the correct dbName
|
||||||
$query = ImportExportTypeI18nQuery::create()->mergeWith($criteria);
|
$query = ImportI18nQuery::create()->mergeWith($criteria);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// use transaction because $criteria could contain info
|
// use transaction because $criteria could contain info
|
||||||
@@ -476,7 +476,7 @@ class ImportExportTypeI18nTableMap extends TableMap
|
|||||||
return $pk;
|
return $pk;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // ImportExportTypeI18nTableMap
|
} // ImportI18nTableMap
|
||||||
// This is the static code needed to register the TableMap for this table with the main Propel class.
|
// This is the static code needed to register the TableMap for this table with the main Propel class.
|
||||||
//
|
//
|
||||||
ImportExportTypeI18nTableMap::buildTableMap();
|
ImportI18nTableMap::buildTableMap();
|
||||||
@@ -11,12 +11,12 @@ use Propel\Runtime\Exception\PropelException;
|
|||||||
use Propel\Runtime\Map\RelationMap;
|
use Propel\Runtime\Map\RelationMap;
|
||||||
use Propel\Runtime\Map\TableMap;
|
use Propel\Runtime\Map\TableMap;
|
||||||
use Propel\Runtime\Map\TableMapTrait;
|
use Propel\Runtime\Map\TableMapTrait;
|
||||||
use Thelia\Model\ImportExportType;
|
use Thelia\Model\Import;
|
||||||
use Thelia\Model\ImportExportTypeQuery;
|
use Thelia\Model\ImportQuery;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class defines the structure of the 'import_export_type' table.
|
* This class defines the structure of the 'import' table.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
@@ -26,14 +26,14 @@ use Thelia\Model\ImportExportTypeQuery;
|
|||||||
* (i.e. if it's a text column type).
|
* (i.e. if it's a text column type).
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
class ImportExportTypeTableMap extends TableMap
|
class ImportTableMap extends TableMap
|
||||||
{
|
{
|
||||||
use InstancePoolTrait;
|
use InstancePoolTrait;
|
||||||
use TableMapTrait;
|
use TableMapTrait;
|
||||||
/**
|
/**
|
||||||
* The (dot-path) name of this class
|
* The (dot-path) name of this class
|
||||||
*/
|
*/
|
||||||
const CLASS_NAME = 'Thelia.Model.Map.ImportExportTypeTableMap';
|
const CLASS_NAME = 'Thelia.Model.Map.ImportTableMap';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The default database name for this class
|
* The default database name for this class
|
||||||
@@ -43,22 +43,22 @@ class ImportExportTypeTableMap extends TableMap
|
|||||||
/**
|
/**
|
||||||
* The table name for this class
|
* The table name for this class
|
||||||
*/
|
*/
|
||||||
const TABLE_NAME = 'import_export_type';
|
const TABLE_NAME = 'import';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The related Propel class for this table
|
* The related Propel class for this table
|
||||||
*/
|
*/
|
||||||
const OM_CLASS = '\\Thelia\\Model\\ImportExportType';
|
const OM_CLASS = '\\Thelia\\Model\\Import';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A class that can be returned by this tableMap
|
* A class that can be returned by this tableMap
|
||||||
*/
|
*/
|
||||||
const CLASS_DEFAULT = 'Thelia.Model.ImportExportType';
|
const CLASS_DEFAULT = 'Thelia.Model.Import';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The total number of columns
|
* The total number of columns
|
||||||
*/
|
*/
|
||||||
const NUM_COLUMNS = 6;
|
const NUM_COLUMNS = 5;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The number of lazy-loaded columns
|
* The number of lazy-loaded columns
|
||||||
@@ -68,37 +68,32 @@ class ImportExportTypeTableMap 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 = 6;
|
const NUM_HYDRATE_COLUMNS = 5;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the column name for the ID field
|
* the column name for the ID field
|
||||||
*/
|
*/
|
||||||
const ID = 'import_export_type.ID';
|
const ID = 'import.ID';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the column name for the URL_ACTION field
|
* the column name for the IMPORT_CATEGORY_ID field
|
||||||
*/
|
*/
|
||||||
const URL_ACTION = 'import_export_type.URL_ACTION';
|
const IMPORT_CATEGORY_ID = 'import.IMPORT_CATEGORY_ID';
|
||||||
|
|
||||||
/**
|
|
||||||
* the column name for the IMPORT_EXPORT_CATEGORY_ID field
|
|
||||||
*/
|
|
||||||
const IMPORT_EXPORT_CATEGORY_ID = 'import_export_type.IMPORT_EXPORT_CATEGORY_ID';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the column name for the POSITION field
|
* the column name for the POSITION field
|
||||||
*/
|
*/
|
||||||
const POSITION = 'import_export_type.POSITION';
|
const POSITION = 'import.POSITION';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the column name for the CREATED_AT field
|
* the column name for the CREATED_AT field
|
||||||
*/
|
*/
|
||||||
const CREATED_AT = 'import_export_type.CREATED_AT';
|
const CREATED_AT = 'import.CREATED_AT';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the column name for the UPDATED_AT field
|
* the column name for the UPDATED_AT field
|
||||||
*/
|
*/
|
||||||
const UPDATED_AT = 'import_export_type.UPDATED_AT';
|
const UPDATED_AT = 'import.UPDATED_AT';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The default string format for model objects of the related table
|
* The default string format for model objects of the related table
|
||||||
@@ -121,12 +116,12 @@ class ImportExportTypeTableMap 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', 'UrlAction', 'ImportExportCategoryId', 'Position', 'CreatedAt', 'UpdatedAt', ),
|
self::TYPE_PHPNAME => array('Id', 'ImportCategoryId', 'Position', 'CreatedAt', 'UpdatedAt', ),
|
||||||
self::TYPE_STUDLYPHPNAME => array('id', 'urlAction', 'importExportCategoryId', 'position', 'createdAt', 'updatedAt', ),
|
self::TYPE_STUDLYPHPNAME => array('id', 'importCategoryId', 'position', 'createdAt', 'updatedAt', ),
|
||||||
self::TYPE_COLNAME => array(ImportExportTypeTableMap::ID, ImportExportTypeTableMap::URL_ACTION, ImportExportTypeTableMap::IMPORT_EXPORT_CATEGORY_ID, ImportExportTypeTableMap::POSITION, ImportExportTypeTableMap::CREATED_AT, ImportExportTypeTableMap::UPDATED_AT, ),
|
self::TYPE_COLNAME => array(ImportTableMap::ID, ImportTableMap::IMPORT_CATEGORY_ID, ImportTableMap::POSITION, ImportTableMap::CREATED_AT, ImportTableMap::UPDATED_AT, ),
|
||||||
self::TYPE_RAW_COLNAME => array('ID', 'URL_ACTION', 'IMPORT_EXPORT_CATEGORY_ID', 'POSITION', 'CREATED_AT', 'UPDATED_AT', ),
|
self::TYPE_RAW_COLNAME => array('ID', 'IMPORT_CATEGORY_ID', 'POSITION', 'CREATED_AT', 'UPDATED_AT', ),
|
||||||
self::TYPE_FIELDNAME => array('id', 'url_action', 'import_export_category_id', 'position', 'created_at', 'updated_at', ),
|
self::TYPE_FIELDNAME => array('id', 'import_category_id', 'position', 'created_at', 'updated_at', ),
|
||||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, )
|
self::TYPE_NUM => array(0, 1, 2, 3, 4, )
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -136,12 +131,12 @@ class ImportExportTypeTableMap 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, 'UrlAction' => 1, 'ImportExportCategoryId' => 2, 'Position' => 3, 'CreatedAt' => 4, 'UpdatedAt' => 5, ),
|
self::TYPE_PHPNAME => array('Id' => 0, 'ImportCategoryId' => 1, 'Position' => 2, 'CreatedAt' => 3, 'UpdatedAt' => 4, ),
|
||||||
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'urlAction' => 1, 'importExportCategoryId' => 2, 'position' => 3, 'createdAt' => 4, 'updatedAt' => 5, ),
|
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'importCategoryId' => 1, 'position' => 2, 'createdAt' => 3, 'updatedAt' => 4, ),
|
||||||
self::TYPE_COLNAME => array(ImportExportTypeTableMap::ID => 0, ImportExportTypeTableMap::URL_ACTION => 1, ImportExportTypeTableMap::IMPORT_EXPORT_CATEGORY_ID => 2, ImportExportTypeTableMap::POSITION => 3, ImportExportTypeTableMap::CREATED_AT => 4, ImportExportTypeTableMap::UPDATED_AT => 5, ),
|
self::TYPE_COLNAME => array(ImportTableMap::ID => 0, ImportTableMap::IMPORT_CATEGORY_ID => 1, ImportTableMap::POSITION => 2, ImportTableMap::CREATED_AT => 3, ImportTableMap::UPDATED_AT => 4, ),
|
||||||
self::TYPE_RAW_COLNAME => array('ID' => 0, 'URL_ACTION' => 1, 'IMPORT_EXPORT_CATEGORY_ID' => 2, 'POSITION' => 3, 'CREATED_AT' => 4, 'UPDATED_AT' => 5, ),
|
self::TYPE_RAW_COLNAME => array('ID' => 0, 'IMPORT_CATEGORY_ID' => 1, 'POSITION' => 2, 'CREATED_AT' => 3, 'UPDATED_AT' => 4, ),
|
||||||
self::TYPE_FIELDNAME => array('id' => 0, 'url_action' => 1, 'import_export_category_id' => 2, 'position' => 3, 'created_at' => 4, 'updated_at' => 5, ),
|
self::TYPE_FIELDNAME => array('id' => 0, 'import_category_id' => 1, 'position' => 2, 'created_at' => 3, 'updated_at' => 4, ),
|
||||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, )
|
self::TYPE_NUM => array(0, 1, 2, 3, 4, )
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -154,15 +149,14 @@ class ImportExportTypeTableMap extends TableMap
|
|||||||
public function initialize()
|
public function initialize()
|
||||||
{
|
{
|
||||||
// attributes
|
// attributes
|
||||||
$this->setName('import_export_type');
|
$this->setName('import');
|
||||||
$this->setPhpName('ImportExportType');
|
$this->setPhpName('Import');
|
||||||
$this->setClassName('\\Thelia\\Model\\ImportExportType');
|
$this->setClassName('\\Thelia\\Model\\Import');
|
||||||
$this->setPackage('Thelia.Model');
|
$this->setPackage('Thelia.Model');
|
||||||
$this->setUseIdGenerator(true);
|
$this->setUseIdGenerator(true);
|
||||||
// columns
|
// columns
|
||||||
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
|
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
|
||||||
$this->addColumn('URL_ACTION', 'UrlAction', 'VARCHAR', true, 255, null);
|
$this->addForeignKey('IMPORT_CATEGORY_ID', 'ImportCategoryId', 'INTEGER', 'import_category', 'ID', true, null, null);
|
||||||
$this->addForeignKey('IMPORT_EXPORT_CATEGORY_ID', 'ImportExportCategoryId', 'INTEGER', 'import_export_category', 'ID', 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);
|
||||||
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
|
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
|
||||||
@@ -173,8 +167,8 @@ class ImportExportTypeTableMap extends TableMap
|
|||||||
*/
|
*/
|
||||||
public function buildRelations()
|
public function buildRelations()
|
||||||
{
|
{
|
||||||
$this->addRelation('ImportExportCategory', '\\Thelia\\Model\\ImportExportCategory', RelationMap::MANY_TO_ONE, array('import_export_category_id' => 'id', ), 'CASCADE', 'RESTRICT');
|
$this->addRelation('ImportCategory', '\\Thelia\\Model\\ImportCategory', RelationMap::MANY_TO_ONE, array('import_category_id' => 'id', ), 'CASCADE', 'RESTRICT');
|
||||||
$this->addRelation('ImportExportTypeI18n', '\\Thelia\\Model\\ImportExportTypeI18n', RelationMap::ONE_TO_MANY, array('id' => 'id', ), 'CASCADE', null, 'ImportExportTypeI18ns');
|
$this->addRelation('ImportI18n', '\\Thelia\\Model\\ImportI18n', RelationMap::ONE_TO_MANY, array('id' => 'id', ), 'CASCADE', null, 'ImportI18ns');
|
||||||
} // buildRelations()
|
} // buildRelations()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -191,13 +185,13 @@ class ImportExportTypeTableMap extends TableMap
|
|||||||
);
|
);
|
||||||
} // getBehaviors()
|
} // getBehaviors()
|
||||||
/**
|
/**
|
||||||
* Method to invalidate the instance pool of all tables related to import_export_type * by a foreign key with ON DELETE CASCADE
|
* Method to invalidate the instance pool of all tables related to import * by a foreign key with ON DELETE CASCADE
|
||||||
*/
|
*/
|
||||||
public static function clearRelatedInstancePool()
|
public static function clearRelatedInstancePool()
|
||||||
{
|
{
|
||||||
// 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.
|
||||||
ImportExportTypeI18nTableMap::clearInstancePool();
|
ImportI18nTableMap::clearInstancePool();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -256,7 +250,7 @@ class ImportExportTypeTableMap extends TableMap
|
|||||||
*/
|
*/
|
||||||
public static function getOMClass($withPrefix = true)
|
public static function getOMClass($withPrefix = true)
|
||||||
{
|
{
|
||||||
return $withPrefix ? ImportExportTypeTableMap::CLASS_DEFAULT : ImportExportTypeTableMap::OM_CLASS;
|
return $withPrefix ? ImportTableMap::CLASS_DEFAULT : ImportTableMap::OM_CLASS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -270,21 +264,21 @@ class ImportExportTypeTableMap extends TableMap
|
|||||||
*
|
*
|
||||||
* @throws PropelException Any exceptions caught during processing will be
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
* rethrown wrapped into a PropelException.
|
* rethrown wrapped into a PropelException.
|
||||||
* @return array (ImportExportType object, last column rank)
|
* @return array (Import object, last column rank)
|
||||||
*/
|
*/
|
||||||
public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
|
public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
|
||||||
{
|
{
|
||||||
$key = ImportExportTypeTableMap::getPrimaryKeyHashFromRow($row, $offset, $indexType);
|
$key = ImportTableMap::getPrimaryKeyHashFromRow($row, $offset, $indexType);
|
||||||
if (null !== ($obj = ImportExportTypeTableMap::getInstanceFromPool($key))) {
|
if (null !== ($obj = ImportTableMap::getInstanceFromPool($key))) {
|
||||||
// We no longer rehydrate the object, since this can cause data loss.
|
// We no longer rehydrate the object, since this can cause data loss.
|
||||||
// See http://www.propelorm.org/ticket/509
|
// See http://www.propelorm.org/ticket/509
|
||||||
// $obj->hydrate($row, $offset, true); // rehydrate
|
// $obj->hydrate($row, $offset, true); // rehydrate
|
||||||
$col = $offset + ImportExportTypeTableMap::NUM_HYDRATE_COLUMNS;
|
$col = $offset + ImportTableMap::NUM_HYDRATE_COLUMNS;
|
||||||
} else {
|
} else {
|
||||||
$cls = ImportExportTypeTableMap::OM_CLASS;
|
$cls = ImportTableMap::OM_CLASS;
|
||||||
$obj = new $cls();
|
$obj = new $cls();
|
||||||
$col = $obj->hydrate($row, $offset, false, $indexType);
|
$col = $obj->hydrate($row, $offset, false, $indexType);
|
||||||
ImportExportTypeTableMap::addInstanceToPool($obj, $key);
|
ImportTableMap::addInstanceToPool($obj, $key);
|
||||||
}
|
}
|
||||||
|
|
||||||
return array($obj, $col);
|
return array($obj, $col);
|
||||||
@@ -307,8 +301,8 @@ class ImportExportTypeTableMap extends TableMap
|
|||||||
$cls = static::getOMClass(false);
|
$cls = static::getOMClass(false);
|
||||||
// populate the object(s)
|
// populate the object(s)
|
||||||
while ($row = $dataFetcher->fetch()) {
|
while ($row = $dataFetcher->fetch()) {
|
||||||
$key = ImportExportTypeTableMap::getPrimaryKeyHashFromRow($row, 0, $dataFetcher->getIndexType());
|
$key = ImportTableMap::getPrimaryKeyHashFromRow($row, 0, $dataFetcher->getIndexType());
|
||||||
if (null !== ($obj = ImportExportTypeTableMap::getInstanceFromPool($key))) {
|
if (null !== ($obj = ImportTableMap::getInstanceFromPool($key))) {
|
||||||
// We no longer rehydrate the object, since this can cause data loss.
|
// We no longer rehydrate the object, since this can cause data loss.
|
||||||
// See http://www.propelorm.org/ticket/509
|
// See http://www.propelorm.org/ticket/509
|
||||||
// $obj->hydrate($row, 0, true); // rehydrate
|
// $obj->hydrate($row, 0, true); // rehydrate
|
||||||
@@ -317,7 +311,7 @@ class ImportExportTypeTableMap extends TableMap
|
|||||||
$obj = new $cls();
|
$obj = new $cls();
|
||||||
$obj->hydrate($row);
|
$obj->hydrate($row);
|
||||||
$results[] = $obj;
|
$results[] = $obj;
|
||||||
ImportExportTypeTableMap::addInstanceToPool($obj, $key);
|
ImportTableMap::addInstanceToPool($obj, $key);
|
||||||
} // if key exists
|
} // if key exists
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -338,16 +332,14 @@ class ImportExportTypeTableMap extends TableMap
|
|||||||
public static function addSelectColumns(Criteria $criteria, $alias = null)
|
public static function addSelectColumns(Criteria $criteria, $alias = null)
|
||||||
{
|
{
|
||||||
if (null === $alias) {
|
if (null === $alias) {
|
||||||
$criteria->addSelectColumn(ImportExportTypeTableMap::ID);
|
$criteria->addSelectColumn(ImportTableMap::ID);
|
||||||
$criteria->addSelectColumn(ImportExportTypeTableMap::URL_ACTION);
|
$criteria->addSelectColumn(ImportTableMap::IMPORT_CATEGORY_ID);
|
||||||
$criteria->addSelectColumn(ImportExportTypeTableMap::IMPORT_EXPORT_CATEGORY_ID);
|
$criteria->addSelectColumn(ImportTableMap::POSITION);
|
||||||
$criteria->addSelectColumn(ImportExportTypeTableMap::POSITION);
|
$criteria->addSelectColumn(ImportTableMap::CREATED_AT);
|
||||||
$criteria->addSelectColumn(ImportExportTypeTableMap::CREATED_AT);
|
$criteria->addSelectColumn(ImportTableMap::UPDATED_AT);
|
||||||
$criteria->addSelectColumn(ImportExportTypeTableMap::UPDATED_AT);
|
|
||||||
} else {
|
} else {
|
||||||
$criteria->addSelectColumn($alias . '.ID');
|
$criteria->addSelectColumn($alias . '.ID');
|
||||||
$criteria->addSelectColumn($alias . '.URL_ACTION');
|
$criteria->addSelectColumn($alias . '.IMPORT_CATEGORY_ID');
|
||||||
$criteria->addSelectColumn($alias . '.IMPORT_EXPORT_CATEGORY_ID');
|
|
||||||
$criteria->addSelectColumn($alias . '.POSITION');
|
$criteria->addSelectColumn($alias . '.POSITION');
|
||||||
$criteria->addSelectColumn($alias . '.CREATED_AT');
|
$criteria->addSelectColumn($alias . '.CREATED_AT');
|
||||||
$criteria->addSelectColumn($alias . '.UPDATED_AT');
|
$criteria->addSelectColumn($alias . '.UPDATED_AT');
|
||||||
@@ -363,7 +355,7 @@ class ImportExportTypeTableMap extends TableMap
|
|||||||
*/
|
*/
|
||||||
public static function getTableMap()
|
public static function getTableMap()
|
||||||
{
|
{
|
||||||
return Propel::getServiceContainer()->getDatabaseMap(ImportExportTypeTableMap::DATABASE_NAME)->getTable(ImportExportTypeTableMap::TABLE_NAME);
|
return Propel::getServiceContainer()->getDatabaseMap(ImportTableMap::DATABASE_NAME)->getTable(ImportTableMap::TABLE_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -371,16 +363,16 @@ class ImportExportTypeTableMap extends TableMap
|
|||||||
*/
|
*/
|
||||||
public static function buildTableMap()
|
public static function buildTableMap()
|
||||||
{
|
{
|
||||||
$dbMap = Propel::getServiceContainer()->getDatabaseMap(ImportExportTypeTableMap::DATABASE_NAME);
|
$dbMap = Propel::getServiceContainer()->getDatabaseMap(ImportTableMap::DATABASE_NAME);
|
||||||
if (!$dbMap->hasTable(ImportExportTypeTableMap::TABLE_NAME)) {
|
if (!$dbMap->hasTable(ImportTableMap::TABLE_NAME)) {
|
||||||
$dbMap->addTableObject(new ImportExportTypeTableMap());
|
$dbMap->addTableObject(new ImportTableMap());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Performs a DELETE on the database, given a ImportExportType or Criteria object OR a primary key value.
|
* Performs a DELETE on the database, given a Import or Criteria object OR a primary key value.
|
||||||
*
|
*
|
||||||
* @param mixed $values Criteria or ImportExportType object or primary key or array of primary keys
|
* @param mixed $values Criteria or Import object or primary key or array of primary keys
|
||||||
* which is used to create the DELETE statement
|
* which is used to create the DELETE statement
|
||||||
* @param ConnectionInterface $con the connection to use
|
* @param ConnectionInterface $con the connection to use
|
||||||
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
|
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
|
||||||
@@ -391,25 +383,25 @@ class ImportExportTypeTableMap extends TableMap
|
|||||||
public static function doDelete($values, ConnectionInterface $con = null)
|
public static function doDelete($values, ConnectionInterface $con = null)
|
||||||
{
|
{
|
||||||
if (null === $con) {
|
if (null === $con) {
|
||||||
$con = Propel::getServiceContainer()->getWriteConnection(ImportExportTypeTableMap::DATABASE_NAME);
|
$con = Propel::getServiceContainer()->getWriteConnection(ImportTableMap::DATABASE_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($values instanceof Criteria) {
|
if ($values instanceof Criteria) {
|
||||||
// rename for clarity
|
// rename for clarity
|
||||||
$criteria = $values;
|
$criteria = $values;
|
||||||
} elseif ($values instanceof \Thelia\Model\ImportExportType) { // it's a model object
|
} elseif ($values instanceof \Thelia\Model\Import) { // it's a model object
|
||||||
// create criteria based on pk values
|
// create criteria based on pk values
|
||||||
$criteria = $values->buildPkeyCriteria();
|
$criteria = $values->buildPkeyCriteria();
|
||||||
} else { // it's a primary key, or an array of pks
|
} else { // it's a primary key, or an array of pks
|
||||||
$criteria = new Criteria(ImportExportTypeTableMap::DATABASE_NAME);
|
$criteria = new Criteria(ImportTableMap::DATABASE_NAME);
|
||||||
$criteria->add(ImportExportTypeTableMap::ID, (array) $values, Criteria::IN);
|
$criteria->add(ImportTableMap::ID, (array) $values, Criteria::IN);
|
||||||
}
|
}
|
||||||
|
|
||||||
$query = ImportExportTypeQuery::create()->mergeWith($criteria);
|
$query = ImportQuery::create()->mergeWith($criteria);
|
||||||
|
|
||||||
if ($values instanceof Criteria) { ImportExportTypeTableMap::clearInstancePool();
|
if ($values instanceof Criteria) { ImportTableMap::clearInstancePool();
|
||||||
} elseif (!is_object($values)) { // it's a primary key, or an array of pks
|
} elseif (!is_object($values)) { // it's a primary key, or an array of pks
|
||||||
foreach ((array) $values as $singleval) { ImportExportTypeTableMap::removeInstanceFromPool($singleval);
|
foreach ((array) $values as $singleval) { ImportTableMap::removeInstanceFromPool($singleval);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -417,20 +409,20 @@ class ImportExportTypeTableMap extends TableMap
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deletes all rows from the import_export_type table.
|
* Deletes all rows from the import table.
|
||||||
*
|
*
|
||||||
* @param ConnectionInterface $con the connection to use
|
* @param ConnectionInterface $con the connection to use
|
||||||
* @return int The number of affected rows (if supported by underlying database driver).
|
* @return int The number of affected rows (if supported by underlying database driver).
|
||||||
*/
|
*/
|
||||||
public static function doDeleteAll(ConnectionInterface $con = null)
|
public static function doDeleteAll(ConnectionInterface $con = null)
|
||||||
{
|
{
|
||||||
return ImportExportTypeQuery::create()->doDeleteAll($con);
|
return ImportQuery::create()->doDeleteAll($con);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Performs an INSERT on the database, given a ImportExportType or Criteria object.
|
* Performs an INSERT on the database, given a Import or Criteria object.
|
||||||
*
|
*
|
||||||
* @param mixed $criteria Criteria or ImportExportType object containing data that is used to create the INSERT statement.
|
* @param mixed $criteria Criteria or Import object containing data that is used to create the INSERT statement.
|
||||||
* @param ConnectionInterface $con the ConnectionInterface connection to use
|
* @param ConnectionInterface $con the ConnectionInterface connection to use
|
||||||
* @return mixed The new primary key.
|
* @return mixed The new primary key.
|
||||||
* @throws PropelException Any exceptions caught during processing will be
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
@@ -439,22 +431,22 @@ class ImportExportTypeTableMap extends TableMap
|
|||||||
public static function doInsert($criteria, ConnectionInterface $con = null)
|
public static function doInsert($criteria, ConnectionInterface $con = null)
|
||||||
{
|
{
|
||||||
if (null === $con) {
|
if (null === $con) {
|
||||||
$con = Propel::getServiceContainer()->getWriteConnection(ImportExportTypeTableMap::DATABASE_NAME);
|
$con = Propel::getServiceContainer()->getWriteConnection(ImportTableMap::DATABASE_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($criteria instanceof Criteria) {
|
if ($criteria instanceof Criteria) {
|
||||||
$criteria = clone $criteria; // rename for clarity
|
$criteria = clone $criteria; // rename for clarity
|
||||||
} else {
|
} else {
|
||||||
$criteria = $criteria->buildCriteria(); // build Criteria from ImportExportType object
|
$criteria = $criteria->buildCriteria(); // build Criteria from Import object
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($criteria->containsKey(ImportExportTypeTableMap::ID) && $criteria->keyContainsValue(ImportExportTypeTableMap::ID) ) {
|
if ($criteria->containsKey(ImportTableMap::ID) && $criteria->keyContainsValue(ImportTableMap::ID) ) {
|
||||||
throw new PropelException('Cannot insert a value for auto-increment primary key ('.ImportExportTypeTableMap::ID.')');
|
throw new PropelException('Cannot insert a value for auto-increment primary key ('.ImportTableMap::ID.')');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Set the correct dbName
|
// Set the correct dbName
|
||||||
$query = ImportExportTypeQuery::create()->mergeWith($criteria);
|
$query = ImportQuery::create()->mergeWith($criteria);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// use transaction because $criteria could contain info
|
// use transaction because $criteria could contain info
|
||||||
@@ -470,7 +462,7 @@ class ImportExportTypeTableMap extends TableMap
|
|||||||
return $pk;
|
return $pk;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // ImportExportTypeTableMap
|
} // ImportTableMap
|
||||||
// This is the static code needed to register the TableMap for this table with the main Propel class.
|
// This is the static code needed to register the TableMap for this table with the main Propel class.
|
||||||
//
|
//
|
||||||
ImportExportTypeTableMap::buildTableMap();
|
ImportTableMap::buildTableMap();
|
||||||
@@ -1512,7 +1512,7 @@
|
|||||||
|
|
||||||
<behavior name="timestampable" />
|
<behavior name="timestampable" />
|
||||||
</table>
|
</table>
|
||||||
<table name="import_export_category" namespace="Thelia\Model">
|
<table name="import_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="title" type="VARCHAR" size="255" required="true" />
|
<column name="title" type="VARCHAR" size="255" required="true" />
|
||||||
<column name="position" type="INTEGER" required="true" />
|
<column name="position" type="INTEGER" required="true" />
|
||||||
@@ -1521,18 +1521,43 @@
|
|||||||
</behavior>
|
</behavior>
|
||||||
<behavior name="timestampable" />
|
<behavior name="timestampable" />
|
||||||
</table>
|
</table>
|
||||||
<table name="import_export_type" namespace="Thelia\Model">
|
<table name="export_category" namespace="Thelia\Model">
|
||||||
|
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
|
||||||
|
<column name="title" type="VARCHAR" size="255" required="true" />
|
||||||
|
<column name="position" type="INTEGER" required="true" />
|
||||||
|
<behavior name="i18n">
|
||||||
|
<parameter name="i18n_columns" value="title" />
|
||||||
|
</behavior>
|
||||||
|
<behavior name="timestampable" />
|
||||||
|
</table>
|
||||||
|
<table name="import" 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="title" type="VARCHAR" size="255" required="true" />
|
<column name="title" type="VARCHAR" size="255" required="true" />
|
||||||
<column name="description" type="CLOB" />
|
<column name="description" type="CLOB" />
|
||||||
<column name="url_action" type="VARCHAR" size="255" required="true" />
|
<column name="import_category_id" type="INTEGER" required="true" />
|
||||||
<column name="import_export_category_id" type="INTEGER" required="true" />
|
|
||||||
<column name="position" type="INTEGER" required="true" />
|
<column name="position" type="INTEGER" required="true" />
|
||||||
<foreign-key foreignTable="import_export_category" name="fk_import_export_type_import_export_category_id" onDelete="CASCADE" onUpdate="RESTRICT">
|
<foreign-key foreignTable="import_category" name="fk_import_import_category_id" onDelete="CASCADE" onUpdate="RESTRICT">
|
||||||
<reference foreign="id" local="import_export_category_id" />
|
<reference foreign="id" local="import_category_id" />
|
||||||
</foreign-key>
|
</foreign-key>
|
||||||
<index name="idx_import_export_type_import_export_category_id">
|
<index name="idx_import_import_category_id">
|
||||||
<index-column name="import_export_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">
|
||||||
|
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
|
||||||
|
<column name="title" type="VARCHAR" size="255" required="true" />
|
||||||
|
<column name="description" type="CLOB" />
|
||||||
|
<column name="export_category_id" type="INTEGER" required="true" />
|
||||||
|
<column name="position" type="INTEGER" required="true" />
|
||||||
|
<foreign-key foreignTable="export_category" name="fk_export_export_category_id" onDelete="CASCADE" onUpdate="RESTRICT">
|
||||||
|
<reference foreign="id" local="export_category_id" />
|
||||||
|
</foreign-key>
|
||||||
|
<index name="idx_export_export_category_id">
|
||||||
|
<index-column name="export_category_id" />
|
||||||
</index>
|
</index>
|
||||||
<behavior name="i18n">
|
<behavior name="i18n">
|
||||||
<parameter name="i18n_columns" value="title, description" />
|
<parameter name="i18n_columns" value="title, description" />
|
||||||
|
|||||||
117
setup/thelia.sql
117
setup/thelia.sql
@@ -1874,12 +1874,12 @@ CREATE TABLE `form_firewall`
|
|||||||
) ENGINE=InnoDB;
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
-- ---------------------------------------------------------------------
|
-- ---------------------------------------------------------------------
|
||||||
-- import_export_category
|
-- import_category
|
||||||
-- ---------------------------------------------------------------------
|
-- ---------------------------------------------------------------------
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `import_export_category`;
|
DROP TABLE IF EXISTS `import_category`;
|
||||||
|
|
||||||
CREATE TABLE `import_export_category`
|
CREATE TABLE `import_category`
|
||||||
(
|
(
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
`position` INTEGER NOT NULL,
|
`position` INTEGER NOT NULL,
|
||||||
@@ -1889,24 +1889,60 @@ CREATE TABLE `import_export_category`
|
|||||||
) ENGINE=InnoDB;
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
-- ---------------------------------------------------------------------
|
-- ---------------------------------------------------------------------
|
||||||
-- import_export_type
|
-- export_category
|
||||||
-- ---------------------------------------------------------------------
|
-- ---------------------------------------------------------------------
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `import_export_type`;
|
DROP TABLE IF EXISTS `export_category`;
|
||||||
|
|
||||||
CREATE TABLE `import_export_type`
|
CREATE TABLE `export_category`
|
||||||
(
|
(
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
`url_action` VARCHAR(255) NOT NULL,
|
`position` INTEGER NOT NULL,
|
||||||
`import_export_category_id` INTEGER NOT NULL,
|
`created_at` DATETIME,
|
||||||
|
`updated_at` DATETIME,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
|
-- ---------------------------------------------------------------------
|
||||||
|
-- import
|
||||||
|
-- ---------------------------------------------------------------------
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `import`;
|
||||||
|
|
||||||
|
CREATE TABLE `import`
|
||||||
|
(
|
||||||
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
|
`import_category_id` INTEGER NOT NULL,
|
||||||
`position` INTEGER NOT NULL,
|
`position` INTEGER NOT NULL,
|
||||||
`created_at` DATETIME,
|
`created_at` DATETIME,
|
||||||
`updated_at` DATETIME,
|
`updated_at` DATETIME,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
INDEX `idx_import_export_type_import_export_category_id` (`import_export_category_id`),
|
INDEX `idx_import_import_category_id` (`import_category_id`),
|
||||||
CONSTRAINT `fk_import_export_type_import_export_category_id`
|
CONSTRAINT `fk_import_import_category_id`
|
||||||
FOREIGN KEY (`import_export_category_id`)
|
FOREIGN KEY (`import_category_id`)
|
||||||
REFERENCES `import_export_category` (`id`)
|
REFERENCES `import_category` (`id`)
|
||||||
|
ON UPDATE RESTRICT
|
||||||
|
ON DELETE CASCADE
|
||||||
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
|
-- ---------------------------------------------------------------------
|
||||||
|
-- export
|
||||||
|
-- ---------------------------------------------------------------------
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `export`;
|
||||||
|
|
||||||
|
CREATE TABLE `export`
|
||||||
|
(
|
||||||
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
|
`export_category_id` INTEGER NOT NULL,
|
||||||
|
`position` INTEGER NOT NULL,
|
||||||
|
`created_at` DATETIME,
|
||||||
|
`updated_at` DATETIME,
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
INDEX `idx_export_export_category_id` (`export_category_id`),
|
||||||
|
CONSTRAINT `fk_export_export_category_id`
|
||||||
|
FOREIGN KEY (`export_category_id`)
|
||||||
|
REFERENCES `export_category` (`id`)
|
||||||
ON UPDATE RESTRICT
|
ON UPDATE RESTRICT
|
||||||
ON DELETE CASCADE
|
ON DELETE CASCADE
|
||||||
) ENGINE=InnoDB;
|
) ENGINE=InnoDB;
|
||||||
@@ -2607,39 +2643,76 @@ CREATE TABLE `brand_image_i18n`
|
|||||||
) ENGINE=InnoDB;
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
-- ---------------------------------------------------------------------
|
-- ---------------------------------------------------------------------
|
||||||
-- import_export_category_i18n
|
-- import_category_i18n
|
||||||
-- ---------------------------------------------------------------------
|
-- ---------------------------------------------------------------------
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `import_export_category_i18n`;
|
DROP TABLE IF EXISTS `import_category_i18n`;
|
||||||
|
|
||||||
CREATE TABLE `import_export_category_i18n`
|
CREATE TABLE `import_category_i18n`
|
||||||
(
|
(
|
||||||
`id` INTEGER NOT NULL,
|
`id` INTEGER NOT NULL,
|
||||||
`locale` VARCHAR(5) DEFAULT 'en_US' NOT NULL,
|
`locale` VARCHAR(5) DEFAULT 'en_US' NOT NULL,
|
||||||
`title` VARCHAR(255) NOT NULL,
|
`title` VARCHAR(255) NOT NULL,
|
||||||
PRIMARY KEY (`id`,`locale`),
|
PRIMARY KEY (`id`,`locale`),
|
||||||
CONSTRAINT `import_export_category_i18n_FK_1`
|
CONSTRAINT `import_category_i18n_FK_1`
|
||||||
FOREIGN KEY (`id`)
|
FOREIGN KEY (`id`)
|
||||||
REFERENCES `import_export_category` (`id`)
|
REFERENCES `import_category` (`id`)
|
||||||
ON DELETE CASCADE
|
ON DELETE CASCADE
|
||||||
) ENGINE=InnoDB;
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
-- ---------------------------------------------------------------------
|
-- ---------------------------------------------------------------------
|
||||||
-- import_export_type_i18n
|
-- export_category_i18n
|
||||||
-- ---------------------------------------------------------------------
|
-- ---------------------------------------------------------------------
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `import_export_type_i18n`;
|
DROP TABLE IF EXISTS `export_category_i18n`;
|
||||||
|
|
||||||
CREATE TABLE `import_export_type_i18n`
|
CREATE TABLE `export_category_i18n`
|
||||||
|
(
|
||||||
|
`id` INTEGER NOT NULL,
|
||||||
|
`locale` VARCHAR(5) DEFAULT 'en_US' NOT NULL,
|
||||||
|
`title` VARCHAR(255) NOT NULL,
|
||||||
|
PRIMARY KEY (`id`,`locale`),
|
||||||
|
CONSTRAINT `export_category_i18n_FK_1`
|
||||||
|
FOREIGN KEY (`id`)
|
||||||
|
REFERENCES `export_category` (`id`)
|
||||||
|
ON DELETE CASCADE
|
||||||
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
|
-- ---------------------------------------------------------------------
|
||||||
|
-- import_i18n
|
||||||
|
-- ---------------------------------------------------------------------
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `import_i18n`;
|
||||||
|
|
||||||
|
CREATE TABLE `import_i18n`
|
||||||
(
|
(
|
||||||
`id` INTEGER NOT NULL,
|
`id` INTEGER NOT NULL,
|
||||||
`locale` VARCHAR(5) DEFAULT 'en_US' NOT NULL,
|
`locale` VARCHAR(5) DEFAULT 'en_US' NOT NULL,
|
||||||
`title` VARCHAR(255) NOT NULL,
|
`title` VARCHAR(255) NOT NULL,
|
||||||
`description` LONGTEXT,
|
`description` LONGTEXT,
|
||||||
PRIMARY KEY (`id`,`locale`),
|
PRIMARY KEY (`id`,`locale`),
|
||||||
CONSTRAINT `import_export_type_i18n_FK_1`
|
CONSTRAINT `import_i18n_FK_1`
|
||||||
FOREIGN KEY (`id`)
|
FOREIGN KEY (`id`)
|
||||||
REFERENCES `import_export_type` (`id`)
|
REFERENCES `import` (`id`)
|
||||||
|
ON DELETE CASCADE
|
||||||
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
|
-- ---------------------------------------------------------------------
|
||||||
|
-- export_i18n
|
||||||
|
-- ---------------------------------------------------------------------
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `export_i18n`;
|
||||||
|
|
||||||
|
CREATE TABLE `export_i18n`
|
||||||
|
(
|
||||||
|
`id` INTEGER NOT NULL,
|
||||||
|
`locale` VARCHAR(5) DEFAULT 'en_US' NOT NULL,
|
||||||
|
`title` VARCHAR(255) NOT NULL,
|
||||||
|
`description` LONGTEXT,
|
||||||
|
PRIMARY KEY (`id`,`locale`),
|
||||||
|
CONSTRAINT `export_i18n_FK_1`
|
||||||
|
FOREIGN KEY (`id`)
|
||||||
|
REFERENCES `export` (`id`)
|
||||||
ON DELETE CASCADE
|
ON DELETE CASCADE
|
||||||
) ENGINE=InnoDB;
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
{module_include location='tools_top'}
|
{module_include location='tools_top'}
|
||||||
|
|
||||||
{loop name="import-export-category" type="import-export-category"}
|
{loop name="export-category" type="export-category"}
|
||||||
{if $LOOP_COUNT % 3}
|
{if $LOOP_COUNT % 3}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
{/if}
|
{/if}
|
||||||
@@ -51,9 +51,11 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
{loop name="export-categ-list" type="export" category=$ID}
|
||||||
<td><a href="{url path="/admin/export"}/">n</a></td>
|
<tr>
|
||||||
</tr>
|
<td><a href="{$URL}">{$TITLE}</a></td>
|
||||||
|
</tr>
|
||||||
|
{/loop}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user