update propel in V.1.6.8

This commit is contained in:
Manuel Raynaud
2013-02-18 14:39:45 +01:00
parent cfb2d00b13
commit 4764118f3a
302 changed files with 14189 additions and 8857 deletions

View File

@@ -9,7 +9,7 @@
"require":{
"php": ">=5.4.0",
"ircmaxell/password-compat": "dev-master",
"propel/propel1" : "1.6.7",
"propel/propel1" : "1.6.*",
"psr/log" : "dev-master",
"symfony/class-loader": "2.1.*",
"symfony/config" : "2.1.*",

64
composer.lock generated
View File

@@ -7,15 +7,15 @@
"source": {
"type": "git",
"url": "https://github.com/ircmaxell/password_compat.git",
"reference": "fc4ad2d46794ace07cbf04fe654a8bf546fc6764"
"reference": "733c06c599bfeb511f54253ddb127701bce0917d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/ircmaxell/password_compat/zipball/fc4ad2d46794ace07cbf04fe654a8bf546fc6764",
"reference": "fc4ad2d46794ace07cbf04fe654a8bf546fc6764",
"url": "https://api.github.com/repos/ircmaxell/password_compat/zipball/733c06c599bfeb511f54253ddb127701bce0917d",
"reference": "733c06c599bfeb511f54253ddb127701bce0917d",
"shasum": ""
},
"time": "2013-02-04 16:45:02",
"time": "2013-02-13 16:58:34",
"type": "library",
"autoload": {
"files": [
@@ -36,28 +36,28 @@
"description": "A compatibility library for the proposed simplified password hashing algorithm: https://wiki.php.net/rfc/password_hash",
"homepage": "https://github.com/ircmaxell/password_compat",
"keywords": [
"password",
"hashing"
"hashing",
"password"
]
},
{
"name": "phing/phing",
"version": "2.4.14",
"version": "2.5.0",
"source": {
"type": "git",
"url": "https://github.com/phingofficial/phing",
"reference": "2.4.14"
"url": "https://github.com/phingofficial/phing.git",
"reference": "2.5.0"
},
"dist": {
"type": "zip",
"url": "https://github.com/phingofficial/phing/archive/2.4.14.zip",
"reference": "2.4.14",
"url": "https://api.github.com/repos/phingofficial/phing/zipball/2.5.0",
"reference": "2.5.0",
"shasum": ""
},
"require": {
"php": ">=5.2.0"
},
"time": "2012-11-29 21:23:47",
"time": "2013-02-16 14:23:57",
"bin": [
"bin/phing"
],
@@ -94,23 +94,23 @@
},
{
"name": "propel/propel1",
"version": "1.6.7",
"version": "1.6.8",
"source": {
"type": "git",
"url": "https://github.com/propelorm/Propel",
"reference": "1.6.7"
"url": "https://github.com/propelorm/Propel.git",
"reference": "1.6.8"
},
"dist": {
"type": "zip",
"url": "https://github.com/propelorm/Propel/zipball/1.6.7",
"reference": "1.6.7",
"url": "https://api.github.com/repos/propelorm/Propel/zipball/1.6.8",
"reference": "1.6.8",
"shasum": ""
},
"require": {
"php": ">=5.2.4",
"phing/phing": ">=2.4.12,2.4.*"
"phing/phing": ">=2.4,<3.0",
"php": ">=5.2.4"
},
"time": "2012-07-30 00:58:15",
"time": "2013-02-14 20:50:27",
"bin": [
"generator/bin/propel-gen",
"generator/bin/propel-gen.bat"
@@ -145,11 +145,11 @@
"description": "Propel is an open-source Object-Relational Mapping (ORM) for PHP5.",
"homepage": "http://www.propelorm.org/",
"keywords": [
"database",
"orm",
"persistence",
"Active Record",
"mapping"
"database",
"mapping",
"orm",
"persistence"
]
},
{
@@ -338,12 +338,12 @@
"php": ">=5.3.3"
},
"require-dev": {
"symfony/yaml": "2.1.*",
"symfony/config": "2.1.*"
"symfony/config": "2.1.*",
"symfony/yaml": "2.1.*"
},
"suggest": {
"symfony/yaml": "2.1.*",
"symfony/config": "2.1.*"
"symfony/config": "2.1.*",
"symfony/yaml": "2.1.*"
},
"time": "2013-01-17 21:21:51",
"type": "library",
@@ -542,15 +542,15 @@
"php": ">=5.3.3"
},
"require-dev": {
"doctrine/common": ">=2.2,<2.4-dev",
"symfony/config": "2.1.*",
"symfony/yaml": "2.1.*",
"symfony/http-kernel": "2.1.*",
"doctrine/common": ">=2.2,<2.4-dev"
"symfony/yaml": "2.1.*"
},
"suggest": {
"doctrine/common": ">=2.2,<2.4-dev",
"symfony/config": "2.1.*",
"symfony/yaml": "2.1.*",
"doctrine/common": ">=2.2,<2.4-dev"
"symfony/yaml": "2.1.*"
},
"time": "2013-01-09 08:51:07",
"type": "library",

View File

@@ -42,12 +42,12 @@ class AccessoryTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(false);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('PRODUCT_ID', 'ProductId', 'INTEGER', 'product', 'ID', true, null, null);
$this->addForeignKey('ACCESSORY', 'Accessory', 'INTEGER', 'product', '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);
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('product_id', 'ProductId', 'INTEGER', 'product', 'id', true, null, null);
$this->addForeignKey('accessory', 'Accessory', 'INTEGER', 'product', '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);
// validators
} // initialize()
@@ -69,7 +69,11 @@ class AccessoryTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
);
} // getBehaviors()

View File

@@ -42,22 +42,22 @@ class AddressTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addForeignKey('CUSTOMER_ID', 'CustomerId', 'INTEGER', 'customer', 'ID', true, null, null);
$this->addForeignKey('CUSTOMER_TITLE_ID', 'CustomerTitleId', 'INTEGER', 'customer_title', 'ID', false, null, null);
$this->addColumn('COMPANY', 'Company', 'VARCHAR', false, 255, null);
$this->addColumn('FIRSTNAME', 'Firstname', 'VARCHAR', true, 255, null);
$this->addColumn('LASTNAME', 'Lastname', 'VARCHAR', true, 255, null);
$this->addColumn('ADDRESS1', 'Address1', 'VARCHAR', true, 255, null);
$this->addColumn('ADDRESS2', 'Address2', 'VARCHAR', true, 255, null);
$this->addColumn('ADDRESS3', 'Address3', 'VARCHAR', true, 255, null);
$this->addColumn('ZIPCODE', 'Zipcode', 'VARCHAR', true, 10, null);
$this->addColumn('CITY', 'City', 'VARCHAR', true, 255, null);
$this->addColumn('COUNTRY_ID', 'CountryId', 'INTEGER', true, null, null);
$this->addColumn('PHONE', 'Phone', 'VARCHAR', false, 20, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addColumn('title', 'Title', 'VARCHAR', false, 255, null);
$this->addForeignKey('customer_id', 'CustomerId', 'INTEGER', 'customer', 'id', true, null, null);
$this->addForeignKey('customer_title_id', 'CustomerTitleId', 'INTEGER', 'customer_title', 'id', false, null, null);
$this->addColumn('company', 'Company', 'VARCHAR', false, 255, null);
$this->addColumn('firstname', 'Firstname', 'VARCHAR', true, 255, null);
$this->addColumn('lastname', 'Lastname', 'VARCHAR', true, 255, null);
$this->addColumn('address1', 'Address1', 'VARCHAR', true, 255, null);
$this->addColumn('address2', 'Address2', 'VARCHAR', true, 255, null);
$this->addColumn('address3', 'Address3', 'VARCHAR', true, 255, null);
$this->addColumn('zipcode', 'Zipcode', 'VARCHAR', true, 10, null);
$this->addColumn('city', 'City', 'VARCHAR', true, 255, null);
$this->addColumn('country_id', 'CountryId', 'INTEGER', true, null, null);
$this->addColumn('phone', 'Phone', 'VARCHAR', false, 20, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
@@ -79,7 +79,11 @@ class AddressTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
);
} // getBehaviors()

View File

@@ -42,11 +42,11 @@ class AdminGroupTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('GROUP_ID', 'GroupId', 'INTEGER', 'group', 'ID', false, null, null);
$this->addForeignKey('ADMIN_ID', 'AdminId', 'INTEGER', 'admin', 'ID', false, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('group_id', 'GroupId', 'INTEGER', 'group', 'id', false, null, null);
$this->addForeignKey('admin_id', 'AdminId', 'INTEGER', 'admin', 'id', false, null, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
@@ -68,7 +68,11 @@ class AdminGroupTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
);
} // getBehaviors()

View File

@@ -42,14 +42,14 @@ class AdminLogTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addColumn('ADMIN_LOGIN', 'AdminLogin', 'VARCHAR', false, 255, null);
$this->addColumn('ADMIN_FIRSTNAME', 'AdminFirstname', 'VARCHAR', false, 255, null);
$this->addColumn('ADMIN_LASTNAME', 'AdminLastname', 'VARCHAR', false, 255, null);
$this->addColumn('ACTION', 'Action', 'VARCHAR', false, 255, null);
$this->addColumn('REQUEST', 'Request', 'LONGVARCHAR', false, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addColumn('admin_login', 'AdminLogin', 'VARCHAR', false, 255, null);
$this->addColumn('admin_firstname', 'AdminFirstname', 'VARCHAR', false, 255, null);
$this->addColumn('admin_lastname', 'AdminLastname', 'VARCHAR', false, 255, null);
$this->addColumn('action', 'Action', 'VARCHAR', false, 255, null);
$this->addColumn('request', 'Request', 'LONGVARCHAR', false, null, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
@@ -69,7 +69,11 @@ class AdminLogTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
);
} // getBehaviors()

View File

@@ -42,15 +42,15 @@ class AdminTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addColumn('FIRSTNAME', 'Firstname', 'VARCHAR', true, 100, null);
$this->addColumn('LASTNAME', 'Lastname', 'VARCHAR', true, 100, null);
$this->addColumn('LOGIN', 'Login', 'VARCHAR', true, 100, null);
$this->addColumn('PASSWORD', 'Password', 'VARCHAR', true, 128, null);
$this->addColumn('ALGO', 'Algo', 'VARCHAR', false, 128, null);
$this->addColumn('SALT', 'Salt', 'VARCHAR', false, 128, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addColumn('firstname', 'Firstname', 'VARCHAR', true, 100, null);
$this->addColumn('lastname', 'Lastname', 'VARCHAR', true, 100, null);
$this->addColumn('login', 'Login', 'VARCHAR', true, 100, null);
$this->addColumn('password', 'Password', 'VARCHAR', true, 128, null);
$this->addColumn('algo', 'Algo', 'VARCHAR', false, 128, null);
$this->addColumn('salt', 'Salt', 'VARCHAR', false, 128, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
@@ -71,7 +71,11 @@ class AdminTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
);
} // getBehaviors()

View File

@@ -42,11 +42,11 @@ class AreaTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addColumn('NAME', 'Name', 'VARCHAR', true, 100, null);
$this->addColumn('UNIT', 'Unit', 'FLOAT', false, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addColumn('name', 'Name', 'VARCHAR', true, 100, null);
$this->addColumn('unit', 'Unit', 'FLOAT', false, null, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
@@ -68,7 +68,11 @@ class AreaTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
);
} // getBehaviors()

View File

@@ -42,12 +42,12 @@ class AttributeAvI18nTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'attribute_av', 'ID', true, null, null);
$this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_EN');
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
$this->addColumn('POSTSCRIPTUM', 'Postscriptum', 'LONGVARCHAR', false, null, null);
$this->addForeignPrimaryKey('id', 'Id', 'INTEGER' , 'attribute_av', 'id', true, null, null);
$this->addPrimaryKey('locale', 'Locale', 'VARCHAR', true, 5, 'en_US');
$this->addColumn('title', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('description', 'Description', 'CLOB', false, null, null);
$this->addColumn('chapo', 'Chapo', 'LONGVARCHAR', false, null, null);
$this->addColumn('postscriptum', 'Postscriptum', 'LONGVARCHAR', false, null, null);
// validators
} // initialize()

View File

@@ -42,11 +42,11 @@ class AttributeAvTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('ATTRIBUTE_ID', 'AttributeId', 'INTEGER', 'attribute', '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);
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('attribute_id', 'AttributeId', 'INTEGER', 'attribute', '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);
// validators
} // initialize()
@@ -69,8 +69,20 @@ class AttributeAvTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'i18n' => array('i18n_table' => '%TABLE%_i18n', 'i18n_phpname' => '%PHPNAME%I18n', 'i18n_columns' => 'title, description, chapo, postscriptum', 'locale_column' => 'locale', 'default_locale' => '', 'locale_alias' => '', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
'i18n' => array (
'i18n_table' => '%TABLE%_i18n',
'i18n_phpname' => '%PHPNAME%I18n',
'i18n_columns' => 'title, description, chapo, postscriptum',
'i18n_pk_name' => NULL,
'locale_column' => 'locale',
'default_locale' => NULL,
'locale_alias' => '',
),
);
} // getBehaviors()

View File

@@ -42,11 +42,11 @@ class AttributeCategoryTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('CATEGORY_ID', 'CategoryId', 'INTEGER', 'category', 'ID', true, null, null);
$this->addForeignKey('ATTRIBUTE_ID', 'AttributeId', 'INTEGER', 'attribute', 'ID', true, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('category_id', 'CategoryId', 'INTEGER', 'category', 'id', true, null, null);
$this->addForeignKey('attribute_id', 'AttributeId', 'INTEGER', 'attribute', 'id', true, null, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
@@ -68,7 +68,11 @@ class AttributeCategoryTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
);
} // getBehaviors()

View File

@@ -42,12 +42,12 @@ class AttributeCombinationTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addForeignPrimaryKey('ATTRIBUTE_ID', 'AttributeId', 'INTEGER' , 'attribute', 'ID', true, null, null);
$this->addForeignPrimaryKey('COMBINATION_ID', 'CombinationId', 'INTEGER' , 'combination', 'ID', true, null, null);
$this->addForeignPrimaryKey('ATTRIBUTE_AV_ID', 'AttributeAvId', 'INTEGER' , 'attribute_av', 'ID', true, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addForeignPrimaryKey('attribute_id', 'AttributeId', 'INTEGER' , 'attribute', 'id', true, null, null);
$this->addForeignPrimaryKey('combination_id', 'CombinationId', 'INTEGER' , 'combination', 'id', true, null, null);
$this->addForeignPrimaryKey('attribute_av_id', 'AttributeAvId', 'INTEGER' , 'attribute_av', 'id', true, null, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
@@ -70,7 +70,11 @@ class AttributeCombinationTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
);
} // getBehaviors()

View File

@@ -42,12 +42,12 @@ class AttributeI18nTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'attribute', 'ID', true, null, null);
$this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_EN');
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
$this->addColumn('POSTSCRIPTUM', 'Postscriptum', 'LONGVARCHAR', false, null, null);
$this->addForeignPrimaryKey('id', 'Id', 'INTEGER' , 'attribute', 'id', true, null, null);
$this->addPrimaryKey('locale', 'Locale', 'VARCHAR', true, 5, 'en_US');
$this->addColumn('title', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('description', 'Description', 'CLOB', false, null, null);
$this->addColumn('chapo', 'Chapo', 'LONGVARCHAR', false, null, null);
$this->addColumn('postscriptum', 'Postscriptum', 'LONGVARCHAR', false, null, null);
// validators
} // initialize()

View File

@@ -42,10 +42,10 @@ class AttributeTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addColumn('POSITION', 'Position', 'INTEGER', false, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addColumn('position', 'Position', 'INTEGER', false, null, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
@@ -69,8 +69,20 @@ class AttributeTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'i18n' => array('i18n_table' => '%TABLE%_i18n', 'i18n_phpname' => '%PHPNAME%I18n', 'i18n_columns' => 'title, description, chapo, postscriptum', 'locale_column' => 'locale', 'default_locale' => '', 'locale_alias' => '', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
'i18n' => array (
'i18n_table' => '%TABLE%_i18n',
'i18n_phpname' => '%PHPNAME%I18n',
'i18n_columns' => 'title, description, chapo, postscriptum',
'i18n_pk_name' => NULL,
'locale_column' => 'locale',
'default_locale' => NULL,
'locale_alias' => '',
),
);
} // getBehaviors()

View File

@@ -42,12 +42,12 @@ class CategoryI18nTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'category', 'ID', true, null, null);
$this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_EN');
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
$this->addColumn('POSTSCRIPTUM', 'Postscriptum', 'LONGVARCHAR', false, null, null);
$this->addForeignPrimaryKey('id', 'Id', 'INTEGER' , 'category', 'id', true, null, null);
$this->addPrimaryKey('locale', 'Locale', 'VARCHAR', true, 5, 'en_US');
$this->addColumn('title', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('description', 'Description', 'CLOB', false, null, null);
$this->addColumn('chapo', 'Chapo', 'LONGVARCHAR', false, null, null);
$this->addColumn('postscriptum', 'Postscriptum', 'LONGVARCHAR', false, null, null);
// validators
} // initialize()

View File

@@ -42,16 +42,16 @@ class CategoryTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addColumn('PARENT', 'Parent', 'INTEGER', false, null, null);
$this->addColumn('LINK', 'Link', 'VARCHAR', false, 255, null);
$this->addColumn('VISIBLE', 'Visible', 'TINYINT', true, null, null);
$this->addColumn('POSITION', 'Position', 'INTEGER', true, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('VERSION', 'Version', 'INTEGER', false, null, 0);
$this->addColumn('VERSION_CREATED_AT', 'VersionCreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('VERSION_CREATED_BY', 'VersionCreatedBy', 'VARCHAR', false, 100, null);
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addColumn('parent', 'Parent', 'INTEGER', false, null, null);
$this->addColumn('link', 'Link', 'VARCHAR', false, 255, null);
$this->addColumn('visible', 'Visible', 'TINYINT', true, null, null);
$this->addColumn('position', 'Position', 'INTEGER', true, null, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('version', 'Version', 'INTEGER', false, null, 0);
$this->addColumn('version_created_at', 'VersionCreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('version_created_by', 'VersionCreatedBy', 'VARCHAR', false, 100, null);
// validators
} // initialize()
@@ -80,9 +80,30 @@ class CategoryTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'i18n' => array('i18n_table' => '%TABLE%_i18n', 'i18n_phpname' => '%PHPNAME%I18n', 'i18n_columns' => 'title, description, chapo, postscriptum', 'locale_column' => 'locale', 'default_locale' => '', 'locale_alias' => '', ),
'versionable' => array('version_column' => 'version', 'version_table' => '', 'log_created_at' => 'true', 'log_created_by' => 'true', 'log_comment' => 'false', 'version_created_at_column' => 'version_created_at', 'version_created_by_column' => 'version_created_by', 'version_comment_column' => 'version_comment', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
'i18n' => array (
'i18n_table' => '%TABLE%_i18n',
'i18n_phpname' => '%PHPNAME%I18n',
'i18n_columns' => 'title, description, chapo, postscriptum',
'i18n_pk_name' => NULL,
'locale_column' => 'locale',
'default_locale' => NULL,
'locale_alias' => '',
),
'versionable' => array (
'version_column' => 'version',
'version_table' => '',
'log_created_at' => 'true',
'log_created_by' => 'true',
'log_comment' => 'false',
'version_created_at_column' => 'version_created_at',
'version_created_by_column' => 'version_created_by',
'version_comment_column' => 'version_comment',
),
);
} // getBehaviors()

View File

@@ -42,16 +42,16 @@ class CategoryVersionTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'category', 'ID', true, null, null);
$this->addColumn('PARENT', 'Parent', 'INTEGER', false, null, null);
$this->addColumn('LINK', 'Link', 'VARCHAR', false, 255, null);
$this->addColumn('VISIBLE', 'Visible', 'TINYINT', true, null, null);
$this->addColumn('POSITION', 'Position', 'INTEGER', true, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('VERSION', 'Version', 'INTEGER', true, null, 0);
$this->addColumn('VERSION_CREATED_AT', 'VersionCreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('VERSION_CREATED_BY', 'VersionCreatedBy', 'VARCHAR', false, 100, null);
$this->addForeignPrimaryKey('id', 'Id', 'INTEGER' , 'category', 'id', true, null, null);
$this->addColumn('parent', 'Parent', 'INTEGER', false, null, null);
$this->addColumn('link', 'Link', 'VARCHAR', false, 255, null);
$this->addColumn('visible', 'Visible', 'TINYINT', true, null, null);
$this->addColumn('position', 'Position', 'INTEGER', true, null, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('version', 'Version', 'INTEGER', true, null, 0);
$this->addColumn('version_created_at', 'VersionCreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('version_created_by', 'VersionCreatedBy', 'VARCHAR', false, 100, null);
// validators
} // initialize()

View File

@@ -42,10 +42,10 @@ class CombinationTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addColumn('REF', 'Ref', 'VARCHAR', false, 255, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addColumn('ref', 'Ref', 'VARCHAR', false, 255, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
@@ -67,7 +67,11 @@ class CombinationTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
);
} // getBehaviors()

View File

@@ -42,12 +42,12 @@ class ConfigI18nTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'config', 'ID', true, null, null);
$this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_EN');
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
$this->addColumn('POSTSCRIPTUM', 'Postscriptum', 'LONGVARCHAR', false, null, null);
$this->addForeignPrimaryKey('id', 'Id', 'INTEGER' , 'config', 'id', true, null, null);
$this->addPrimaryKey('locale', 'Locale', 'VARCHAR', true, 5, 'en_US');
$this->addColumn('title', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('description', 'Description', 'CLOB', false, null, null);
$this->addColumn('chapo', 'Chapo', 'LONGVARCHAR', false, null, null);
$this->addColumn('postscriptum', 'Postscriptum', 'LONGVARCHAR', false, null, null);
// validators
} // initialize()

View File

@@ -42,13 +42,13 @@ class ConfigTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addColumn('NAME', 'Name', 'VARCHAR', true, 255, null);
$this->addColumn('VALUE', 'Value', 'VARCHAR', true, 255, null);
$this->addColumn('SECURED', 'Secured', 'TINYINT', true, null, 1);
$this->addColumn('HIDDEN', 'Hidden', 'TINYINT', true, null, 1);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addColumn('name', 'Name', 'VARCHAR', true, 255, null);
$this->addColumn('value', 'Value', 'VARCHAR', true, 255, null);
$this->addColumn('secured', 'Secured', 'TINYINT', true, null, 1);
$this->addColumn('hidden', 'Hidden', 'TINYINT', true, null, 1);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
@@ -69,8 +69,20 @@ class ConfigTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'i18n' => array('i18n_table' => '%TABLE%_i18n', 'i18n_phpname' => '%PHPNAME%I18n', 'i18n_columns' => 'title, description, chapo, postscriptum', 'locale_column' => 'locale', 'default_locale' => '', 'locale_alias' => '', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
'i18n' => array (
'i18n_table' => '%TABLE%_i18n',
'i18n_phpname' => '%PHPNAME%I18n',
'i18n_columns' => 'title, description, chapo, postscriptum',
'i18n_pk_name' => NULL,
'locale_column' => 'locale',
'default_locale' => NULL,
'locale_alias' => '',
),
);
} // getBehaviors()

View File

@@ -42,13 +42,13 @@ class ContentAssocTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('CATEGORY_ID', 'CategoryId', 'INTEGER', 'category', 'ID', false, null, null);
$this->addForeignKey('PRODUCT_ID', 'ProductId', 'INTEGER', 'product', 'ID', false, null, null);
$this->addForeignKey('CONTENT_ID', 'ContentId', 'INTEGER', 'content', 'ID', false, null, null);
$this->addColumn('POSITION', 'Position', 'INTEGER', false, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('category_id', 'CategoryId', 'INTEGER', 'category', 'id', false, null, null);
$this->addForeignKey('product_id', 'ProductId', 'INTEGER', 'product', 'id', false, null, null);
$this->addForeignKey('content_id', 'ContentId', 'INTEGER', 'content', 'id', false, null, null);
$this->addColumn('position', 'Position', 'INTEGER', false, null, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
@@ -71,7 +71,11 @@ class ContentAssocTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
);
} // getBehaviors()

View File

@@ -42,10 +42,10 @@ class ContentFolderTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('CONTENT_ID', 'ContentId', 'INTEGER' , 'content', 'ID', true, null, null);
$this->addForeignPrimaryKey('FOLDER_ID', 'FolderId', 'INTEGER' , 'folder', 'ID', true, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addForeignPrimaryKey('content_id', 'ContentId', 'INTEGER' , 'content', 'id', true, null, null);
$this->addForeignPrimaryKey('folder_id', 'FolderId', 'INTEGER' , 'folder', 'id', true, null, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
@@ -67,7 +67,11 @@ class ContentFolderTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
);
} // getBehaviors()

View File

@@ -42,12 +42,12 @@ class ContentI18nTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'content', 'ID', true, null, null);
$this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_EN');
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
$this->addColumn('POSTSCRIPTUM', 'Postscriptum', 'LONGVARCHAR', false, null, null);
$this->addForeignPrimaryKey('id', 'Id', 'INTEGER' , 'content', 'id', true, null, null);
$this->addPrimaryKey('locale', 'Locale', 'VARCHAR', true, 5, 'en_US');
$this->addColumn('title', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('description', 'Description', 'CLOB', false, null, null);
$this->addColumn('chapo', 'Chapo', 'LONGVARCHAR', false, null, null);
$this->addColumn('postscriptum', 'Postscriptum', 'LONGVARCHAR', false, null, null);
// validators
} // initialize()

View File

@@ -42,14 +42,14 @@ class ContentTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addColumn('VISIBLE', 'Visible', 'TINYINT', false, null, null);
$this->addColumn('POSITION', 'Position', 'INTEGER', false, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('VERSION', 'Version', 'INTEGER', false, null, 0);
$this->addColumn('VERSION_CREATED_AT', 'VersionCreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('VERSION_CREATED_BY', 'VersionCreatedBy', 'VARCHAR', false, 100, null);
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addColumn('visible', 'Visible', 'TINYINT', false, null, null);
$this->addColumn('position', 'Position', 'INTEGER', false, null, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('version', 'Version', 'INTEGER', false, null, 0);
$this->addColumn('version_created_at', 'VersionCreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('version_created_by', 'VersionCreatedBy', 'VARCHAR', false, 100, null);
// validators
} // initialize()
@@ -76,9 +76,30 @@ class ContentTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'i18n' => array('i18n_table' => '%TABLE%_i18n', 'i18n_phpname' => '%PHPNAME%I18n', 'i18n_columns' => 'title, description, chapo, postscriptum', 'locale_column' => 'locale', 'default_locale' => '', 'locale_alias' => '', ),
'versionable' => array('version_column' => 'version', 'version_table' => '', 'log_created_at' => 'true', 'log_created_by' => 'true', 'log_comment' => 'false', 'version_created_at_column' => 'version_created_at', 'version_created_by_column' => 'version_created_by', 'version_comment_column' => 'version_comment', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
'i18n' => array (
'i18n_table' => '%TABLE%_i18n',
'i18n_phpname' => '%PHPNAME%I18n',
'i18n_columns' => 'title, description, chapo, postscriptum',
'i18n_pk_name' => NULL,
'locale_column' => 'locale',
'default_locale' => NULL,
'locale_alias' => '',
),
'versionable' => array (
'version_column' => 'version',
'version_table' => '',
'log_created_at' => 'true',
'log_created_by' => 'true',
'log_comment' => 'false',
'version_created_at_column' => 'version_created_at',
'version_created_by_column' => 'version_created_by',
'version_comment_column' => 'version_comment',
),
);
} // getBehaviors()

View File

@@ -42,14 +42,14 @@ class ContentVersionTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'content', 'ID', true, null, null);
$this->addColumn('VISIBLE', 'Visible', 'TINYINT', false, null, null);
$this->addColumn('POSITION', 'Position', 'INTEGER', false, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('VERSION', 'Version', 'INTEGER', true, null, 0);
$this->addColumn('VERSION_CREATED_AT', 'VersionCreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('VERSION_CREATED_BY', 'VersionCreatedBy', 'VARCHAR', false, 100, null);
$this->addForeignPrimaryKey('id', 'Id', 'INTEGER' , 'content', 'id', true, null, null);
$this->addColumn('visible', 'Visible', 'TINYINT', false, null, null);
$this->addColumn('position', 'Position', 'INTEGER', false, null, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('version', 'Version', 'INTEGER', true, null, 0);
$this->addColumn('version_created_at', 'VersionCreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('version_created_by', 'VersionCreatedBy', 'VARCHAR', false, 100, null);
// validators
} // initialize()

View File

@@ -42,12 +42,12 @@ class CountryI18nTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'country', 'ID', true, null, null);
$this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_EN');
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
$this->addColumn('POSTSCRIPTUM', 'Postscriptum', 'LONGVARCHAR', false, null, null);
$this->addForeignPrimaryKey('id', 'Id', 'INTEGER' , 'country', 'id', true, null, null);
$this->addPrimaryKey('locale', 'Locale', 'VARCHAR', true, 5, 'en_US');
$this->addColumn('title', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('description', 'Description', 'CLOB', false, null, null);
$this->addColumn('chapo', 'Chapo', 'LONGVARCHAR', false, null, null);
$this->addColumn('postscriptum', 'Postscriptum', 'LONGVARCHAR', false, null, null);
// validators
} // initialize()

View File

@@ -42,13 +42,13 @@ class CountryTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(false);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('AREA_ID', 'AreaId', 'INTEGER', 'area', 'ID', false, null, null);
$this->addColumn('ISOCODE', 'Isocode', 'VARCHAR', true, 4, null);
$this->addColumn('ISOALPHA2', 'Isoalpha2', 'VARCHAR', false, 2, null);
$this->addColumn('ISOALPHA3', 'Isoalpha3', 'VARCHAR', false, 4, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('area_id', 'AreaId', 'INTEGER', 'area', 'id', false, null, null);
$this->addColumn('isocode', 'Isocode', 'VARCHAR', true, 4, null);
$this->addColumn('isoalpha2', 'Isoalpha2', 'VARCHAR', false, 2, null);
$this->addColumn('isoalpha3', 'Isoalpha3', 'VARCHAR', false, 4, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
@@ -71,8 +71,20 @@ class CountryTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'i18n' => array('i18n_table' => '%TABLE%_i18n', 'i18n_phpname' => '%PHPNAME%I18n', 'i18n_columns' => 'title, description, chapo, postscriptum', 'locale_column' => 'locale', 'default_locale' => '', 'locale_alias' => '', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
'i18n' => array (
'i18n_table' => '%TABLE%_i18n',
'i18n_phpname' => '%PHPNAME%I18n',
'i18n_columns' => 'title, description, chapo, postscriptum',
'i18n_pk_name' => NULL,
'locale_column' => 'locale',
'default_locale' => NULL,
'locale_alias' => '',
),
);
} // getBehaviors()

View File

@@ -42,12 +42,12 @@ class CouponOrderTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('ORDER_ID', 'OrderId', 'INTEGER', 'order', 'ID', true, null, null);
$this->addColumn('CODE', 'Code', 'VARCHAR', true, 45, null);
$this->addColumn('VALUE', 'Value', 'FLOAT', true, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('order_id', 'OrderId', 'INTEGER', 'order', 'id', true, null, null);
$this->addColumn('code', 'Code', 'VARCHAR', true, 45, null);
$this->addColumn('value', 'Value', 'FLOAT', true, null, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
@@ -68,7 +68,11 @@ class CouponOrderTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
);
} // getBehaviors()

View File

@@ -42,13 +42,13 @@ class CouponRuleTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('COUPON_ID', 'CouponId', 'INTEGER', 'coupon', 'ID', true, null, null);
$this->addColumn('CONTROLLER', 'Controller', 'VARCHAR', false, 255, null);
$this->addColumn('OPERATION', 'Operation', 'VARCHAR', false, 255, null);
$this->addColumn('VALUE', 'Value', 'FLOAT', false, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('coupon_id', 'CouponId', 'INTEGER', 'coupon', 'id', true, null, null);
$this->addColumn('controller', 'Controller', 'VARCHAR', false, 255, null);
$this->addColumn('operation', 'Operation', 'VARCHAR', false, 255, null);
$this->addColumn('value', 'Value', 'FLOAT', false, null, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
@@ -69,7 +69,11 @@ class CouponRuleTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
);
} // getBehaviors()

View File

@@ -42,16 +42,16 @@ class CouponTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addColumn('CODE', 'Code', 'VARCHAR', true, 45, null);
$this->addColumn('ACTION', 'Action', 'VARCHAR', true, 255, null);
$this->addColumn('VALUE', 'Value', 'FLOAT', true, null, null);
$this->addColumn('USED', 'Used', 'TINYINT', false, null, null);
$this->addColumn('AVAILABLE_SINCE', 'AvailableSince', 'TIMESTAMP', false, null, null);
$this->addColumn('DATE_LIMIT', 'DateLimit', 'TIMESTAMP', false, null, null);
$this->addColumn('ACTIVATE', 'Activate', 'TINYINT', false, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addColumn('code', 'Code', 'VARCHAR', true, 45, null);
$this->addColumn('action', 'Action', 'VARCHAR', true, 255, null);
$this->addColumn('value', 'Value', 'FLOAT', true, null, null);
$this->addColumn('used', 'Used', 'TINYINT', false, null, null);
$this->addColumn('available_since', 'AvailableSince', 'TIMESTAMP', false, null, null);
$this->addColumn('date_limit', 'DateLimit', 'TIMESTAMP', false, null, null);
$this->addColumn('activate', 'Activate', 'TINYINT', false, null, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
@@ -72,7 +72,11 @@ class CouponTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
);
} // getBehaviors()

View File

@@ -42,14 +42,14 @@ class CurrencyTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addColumn('NAME', 'Name', 'VARCHAR', false, 45, null);
$this->addColumn('CODE', 'Code', 'VARCHAR', false, 45, null);
$this->addColumn('SYMBOL', 'Symbol', 'VARCHAR', false, 45, null);
$this->addColumn('RATE', 'Rate', 'FLOAT', false, null, null);
$this->addColumn('BY_DEFAULT', 'ByDefault', 'TINYINT', false, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addColumn('name', 'Name', 'VARCHAR', false, 45, null);
$this->addColumn('code', 'Code', 'VARCHAR', false, 45, null);
$this->addColumn('symbol', 'Symbol', 'VARCHAR', false, 45, null);
$this->addColumn('rate', 'Rate', 'FLOAT', false, null, null);
$this->addColumn('by_default', 'ByDefault', 'TINYINT', false, null, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
@@ -70,7 +70,11 @@ class CurrencyTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
);
} // getBehaviors()

View File

@@ -42,30 +42,30 @@ class CustomerTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addColumn('REF', 'Ref', 'VARCHAR', true, 50, null);
$this->addForeignKey('CUSTOMER_TITLE_ID', 'CustomerTitleId', 'INTEGER', 'customer_title', 'ID', false, null, null);
$this->addColumn('COMPANY', 'Company', 'VARCHAR', false, 255, null);
$this->addColumn('FIRSTNAME', 'Firstname', 'VARCHAR', true, 255, null);
$this->addColumn('LASTNAME', 'Lastname', 'VARCHAR', true, 255, null);
$this->addColumn('ADDRESS1', 'Address1', 'VARCHAR', true, 255, null);
$this->addColumn('ADDRESS2', 'Address2', 'VARCHAR', false, 255, null);
$this->addColumn('ADDRESS3', 'Address3', 'VARCHAR', false, 255, null);
$this->addColumn('ZIPCODE', 'Zipcode', 'VARCHAR', false, 10, null);
$this->addColumn('CITY', 'City', 'VARCHAR', true, 255, null);
$this->addColumn('COUNTRY_ID', 'CountryId', 'INTEGER', true, null, null);
$this->addColumn('PHONE', 'Phone', 'VARCHAR', false, 20, null);
$this->addColumn('CELLPHONE', 'Cellphone', 'VARCHAR', false, 20, null);
$this->addColumn('EMAIL', 'Email', 'VARCHAR', false, 50, null);
$this->addColumn('PASSWORD', 'Password', 'VARCHAR', false, 255, null);
$this->addColumn('ALGO', 'Algo', 'VARCHAR', false, 128, null);
$this->addColumn('SALT', 'Salt', 'VARCHAR', false, 128, null);
$this->addColumn('RESELLER', 'Reseller', 'TINYINT', false, null, null);
$this->addColumn('LANG', 'Lang', 'VARCHAR', false, 10, null);
$this->addColumn('SPONSOR', 'Sponsor', 'VARCHAR', false, 50, null);
$this->addColumn('DISCOUNT', 'Discount', 'FLOAT', false, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addColumn('ref', 'Ref', 'VARCHAR', true, 50, null);
$this->addForeignKey('customer_title_id', 'CustomerTitleId', 'INTEGER', 'customer_title', 'id', false, null, null);
$this->addColumn('company', 'Company', 'VARCHAR', false, 255, null);
$this->addColumn('firstname', 'Firstname', 'VARCHAR', true, 255, null);
$this->addColumn('lastname', 'Lastname', 'VARCHAR', true, 255, null);
$this->addColumn('address1', 'Address1', 'VARCHAR', true, 255, null);
$this->addColumn('address2', 'Address2', 'VARCHAR', false, 255, null);
$this->addColumn('address3', 'Address3', 'VARCHAR', false, 255, null);
$this->addColumn('zipcode', 'Zipcode', 'VARCHAR', false, 10, null);
$this->addColumn('city', 'City', 'VARCHAR', true, 255, null);
$this->addColumn('country_id', 'CountryId', 'INTEGER', true, null, null);
$this->addColumn('phone', 'Phone', 'VARCHAR', false, 20, null);
$this->addColumn('cellphone', 'Cellphone', 'VARCHAR', false, 20, null);
$this->addColumn('email', 'Email', 'VARCHAR', false, 50, null);
$this->addColumn('password', 'Password', 'VARCHAR', false, 255, null);
$this->addColumn('algo', 'Algo', 'VARCHAR', false, 128, null);
$this->addColumn('salt', 'Salt', 'VARCHAR', false, 128, null);
$this->addColumn('reseller', 'Reseller', 'TINYINT', false, null, null);
$this->addColumn('lang', 'Lang', 'VARCHAR', false, 10, null);
$this->addColumn('sponsor', 'Sponsor', 'VARCHAR', false, 50, null);
$this->addColumn('discount', 'Discount', 'FLOAT', false, null, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
@@ -88,7 +88,11 @@ class CustomerTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
);
} // getBehaviors()

View File

@@ -42,10 +42,10 @@ class CustomerTitleI18nTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'customer_title', 'ID', true, null, null);
$this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_EN');
$this->addColumn('SHORT', 'Short', 'VARCHAR', false, 10, null);
$this->addColumn('LONG', 'Long', 'VARCHAR', false, 45, null);
$this->addForeignPrimaryKey('id', 'Id', 'INTEGER' , 'customer_title', 'id', true, null, null);
$this->addPrimaryKey('locale', 'Locale', 'VARCHAR', true, 5, 'en_US');
$this->addColumn('short', 'Short', 'VARCHAR', false, 10, null);
$this->addColumn('long', 'Long', 'VARCHAR', false, 45, null);
// validators
} // initialize()

View File

@@ -42,11 +42,11 @@ class CustomerTitleTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addColumn('BY_DEFAULT', 'ByDefault', 'INTEGER', true, null, 0);
$this->addColumn('POSITION', 'Position', 'VARCHAR', true, 45, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addColumn('by_default', 'ByDefault', 'INTEGER', true, null, 0);
$this->addColumn('position', 'Position', 'VARCHAR', true, 45, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
@@ -69,8 +69,20 @@ class CustomerTitleTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'i18n' => array('i18n_table' => '%TABLE%_i18n', 'i18n_phpname' => '%PHPNAME%I18n', 'i18n_columns' => 'short, long', 'locale_column' => 'locale', 'default_locale' => '', 'locale_alias' => '', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
'i18n' => array (
'i18n_table' => '%TABLE%_i18n',
'i18n_phpname' => '%PHPNAME%I18n',
'i18n_columns' => 'short, long',
'i18n_pk_name' => NULL,
'locale_column' => 'locale',
'default_locale' => NULL,
'locale_alias' => '',
),
);
} // getBehaviors()

View File

@@ -42,11 +42,11 @@ class DelivzoneTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('AREA_ID', 'AreaId', 'INTEGER', 'area', 'ID', false, null, null);
$this->addColumn('DELIVERY', 'Delivery', 'VARCHAR', true, 45, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('area_id', 'AreaId', 'INTEGER', 'area', 'id', false, null, null);
$this->addColumn('delivery', 'Delivery', 'VARCHAR', true, 45, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
@@ -67,7 +67,11 @@ class DelivzoneTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
);
} // getBehaviors()

View File

@@ -42,12 +42,12 @@ class DocumentI18nTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'document', 'ID', true, null, null);
$this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_EN');
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
$this->addColumn('POSTSCRIPTUM', 'Postscriptum', 'LONGVARCHAR', false, null, null);
$this->addForeignPrimaryKey('id', 'Id', 'INTEGER' , 'document', 'id', true, null, null);
$this->addPrimaryKey('locale', 'Locale', 'VARCHAR', true, 5, 'en_US');
$this->addColumn('title', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('description', 'Description', 'CLOB', false, null, null);
$this->addColumn('chapo', 'Chapo', 'LONGVARCHAR', false, null, null);
$this->addColumn('postscriptum', 'Postscriptum', 'LONGVARCHAR', false, null, null);
// validators
} // initialize()

View File

@@ -42,15 +42,15 @@ class DocumentTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('PRODUCT_ID', 'ProductId', 'INTEGER', 'product', 'ID', false, null, null);
$this->addForeignKey('CATEGORY_ID', 'CategoryId', 'INTEGER', 'category', 'ID', false, null, null);
$this->addForeignKey('FOLDER_ID', 'FolderId', 'INTEGER', 'folder', 'ID', false, null, null);
$this->addForeignKey('CONTENT_ID', 'ContentId', 'INTEGER', 'content', 'ID', false, null, null);
$this->addColumn('FILE', 'File', 'VARCHAR', true, 255, null);
$this->addColumn('POSITION', 'Position', 'INTEGER', false, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('product_id', 'ProductId', 'INTEGER', 'product', 'id', false, null, null);
$this->addForeignKey('category_id', 'CategoryId', 'INTEGER', 'category', 'id', false, null, null);
$this->addForeignKey('folder_id', 'FolderId', 'INTEGER', 'folder', 'id', false, null, null);
$this->addForeignKey('content_id', 'ContentId', 'INTEGER', 'content', 'id', false, null, null);
$this->addColumn('file', 'File', 'VARCHAR', true, 255, null);
$this->addColumn('position', 'Position', 'INTEGER', false, null, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
@@ -75,8 +75,20 @@ class DocumentTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'i18n' => array('i18n_table' => '%TABLE%_i18n', 'i18n_phpname' => '%PHPNAME%I18n', 'i18n_columns' => 'title, description, chapo, postscriptum', 'locale_column' => 'locale', 'default_locale' => '', 'locale_alias' => '', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
'i18n' => array (
'i18n_table' => '%TABLE%_i18n',
'i18n_phpname' => '%PHPNAME%I18n',
'i18n_columns' => 'title, description, chapo, postscriptum',
'i18n_pk_name' => NULL,
'locale_column' => 'locale',
'default_locale' => NULL,
'locale_alias' => '',
),
);
} // getBehaviors()

View File

@@ -42,12 +42,12 @@ class FeatureAvI18nTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'feature_av', 'ID', true, null, null);
$this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_EN');
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
$this->addColumn('POSTSCRIPTUM', 'Postscriptum', 'LONGVARCHAR', false, null, null);
$this->addForeignPrimaryKey('id', 'Id', 'INTEGER' , 'feature_av', 'id', true, null, null);
$this->addPrimaryKey('locale', 'Locale', 'VARCHAR', true, 5, 'en_US');
$this->addColumn('title', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('description', 'Description', 'CLOB', false, null, null);
$this->addColumn('chapo', 'Chapo', 'LONGVARCHAR', false, null, null);
$this->addColumn('postscriptum', 'Postscriptum', 'LONGVARCHAR', false, null, null);
// validators
} // initialize()

View File

@@ -42,10 +42,10 @@ class FeatureAvTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('FEATURE_ID', 'FeatureId', 'INTEGER', 'feature', 'ID', true, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('feature_id', 'FeatureId', 'INTEGER', 'feature', 'id', true, null, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
@@ -68,8 +68,20 @@ class FeatureAvTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'i18n' => array('i18n_table' => '%TABLE%_i18n', 'i18n_phpname' => '%PHPNAME%I18n', 'i18n_columns' => 'title, description, chapo, postscriptum', 'locale_column' => 'locale', 'default_locale' => '', 'locale_alias' => '', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
'i18n' => array (
'i18n_table' => '%TABLE%_i18n',
'i18n_phpname' => '%PHPNAME%I18n',
'i18n_columns' => 'title, description, chapo, postscriptum',
'i18n_pk_name' => NULL,
'locale_column' => 'locale',
'default_locale' => NULL,
'locale_alias' => '',
),
);
} // getBehaviors()

View File

@@ -42,11 +42,11 @@ class FeatureCategoryTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('FEATURE_ID', 'FeatureId', 'INTEGER', 'feature', 'ID', true, null, null);
$this->addForeignKey('CATEGORY_ID', 'CategoryId', 'INTEGER', 'category', 'ID', true, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('feature_id', 'FeatureId', 'INTEGER', 'feature', 'id', true, null, null);
$this->addForeignKey('category_id', 'CategoryId', 'INTEGER', 'category', 'id', true, null, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
@@ -68,7 +68,11 @@ class FeatureCategoryTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
);
} // getBehaviors()

View File

@@ -42,12 +42,12 @@ class FeatureI18nTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'feature', 'ID', true, null, null);
$this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_EN');
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
$this->addColumn('POSTSCRIPTUM', 'Postscriptum', 'LONGVARCHAR', false, null, null);
$this->addForeignPrimaryKey('id', 'Id', 'INTEGER' , 'feature', 'id', true, null, null);
$this->addPrimaryKey('locale', 'Locale', 'VARCHAR', true, 5, 'en_US');
$this->addColumn('title', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('description', 'Description', 'CLOB', false, null, null);
$this->addColumn('chapo', 'Chapo', 'LONGVARCHAR', false, null, null);
$this->addColumn('postscriptum', 'Postscriptum', 'LONGVARCHAR', false, null, null);
// validators
} // initialize()

View File

@@ -42,14 +42,14 @@ class FeatureProdTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('PRODUCT_ID', 'ProductId', 'INTEGER', 'product', 'ID', true, null, null);
$this->addForeignKey('FEATURE_ID', 'FeatureId', 'INTEGER', 'feature', 'ID', true, null, null);
$this->addForeignKey('FEATURE_AV_ID', 'FeatureAvId', 'INTEGER', 'feature_av', 'ID', false, null, null);
$this->addColumn('BY_DEFAULT', 'ByDefault', 'VARCHAR', false, 255, null);
$this->addColumn('POSITION', 'Position', 'INTEGER', false, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('product_id', 'ProductId', 'INTEGER', 'product', 'id', true, null, null);
$this->addForeignKey('feature_id', 'FeatureId', 'INTEGER', 'feature', 'id', true, null, null);
$this->addForeignKey('feature_av_id', 'FeatureAvId', 'INTEGER', 'feature_av', 'id', false, null, null);
$this->addColumn('by_default', 'ByDefault', 'VARCHAR', false, 255, null);
$this->addColumn('position', 'Position', 'INTEGER', false, null, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
@@ -72,7 +72,11 @@ class FeatureProdTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
);
} // getBehaviors()

View File

@@ -42,11 +42,11 @@ class FeatureTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addColumn('VISIBLE', 'Visible', 'INTEGER', false, null, 0);
$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);
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addColumn('visible', 'Visible', 'INTEGER', false, null, 0);
$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);
// validators
} // initialize()
@@ -70,8 +70,20 @@ class FeatureTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'i18n' => array('i18n_table' => '%TABLE%_i18n', 'i18n_phpname' => '%PHPNAME%I18n', 'i18n_columns' => 'title, description, chapo, postscriptum', 'locale_column' => 'locale', 'default_locale' => '', 'locale_alias' => '', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
'i18n' => array (
'i18n_table' => '%TABLE%_i18n',
'i18n_phpname' => '%PHPNAME%I18n',
'i18n_columns' => 'title, description, chapo, postscriptum',
'i18n_pk_name' => NULL,
'locale_column' => 'locale',
'default_locale' => NULL,
'locale_alias' => '',
),
);
} // getBehaviors()

View File

@@ -42,12 +42,12 @@ class FolderI18nTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'folder', 'ID', true, null, null);
$this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_EN');
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
$this->addColumn('POSTSCRIPTUM', 'Postscriptum', 'LONGVARCHAR', false, null, null);
$this->addForeignPrimaryKey('id', 'Id', 'INTEGER' , 'folder', 'id', true, null, null);
$this->addPrimaryKey('locale', 'Locale', 'VARCHAR', true, 5, 'en_US');
$this->addColumn('title', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('description', 'Description', 'CLOB', false, null, null);
$this->addColumn('chapo', 'Chapo', 'LONGVARCHAR', false, null, null);
$this->addColumn('postscriptum', 'Postscriptum', 'LONGVARCHAR', false, null, null);
// validators
} // initialize()

View File

@@ -42,16 +42,16 @@ class FolderTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addColumn('PARENT', 'Parent', 'INTEGER', true, null, null);
$this->addColumn('LINK', 'Link', 'VARCHAR', false, 255, null);
$this->addColumn('VISIBLE', 'Visible', 'TINYINT', false, null, null);
$this->addColumn('POSITION', 'Position', 'INTEGER', false, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('VERSION', 'Version', 'INTEGER', false, null, 0);
$this->addColumn('VERSION_CREATED_AT', 'VersionCreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('VERSION_CREATED_BY', 'VersionCreatedBy', 'VARCHAR', false, 100, null);
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addColumn('parent', 'Parent', 'INTEGER', true, null, null);
$this->addColumn('link', 'Link', 'VARCHAR', false, 255, null);
$this->addColumn('visible', 'Visible', 'TINYINT', false, null, null);
$this->addColumn('position', 'Position', 'INTEGER', false, null, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('version', 'Version', 'INTEGER', false, null, 0);
$this->addColumn('version_created_at', 'VersionCreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('version_created_by', 'VersionCreatedBy', 'VARCHAR', false, 100, null);
// validators
} // initialize()
@@ -77,9 +77,30 @@ class FolderTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'i18n' => array('i18n_table' => '%TABLE%_i18n', 'i18n_phpname' => '%PHPNAME%I18n', 'i18n_columns' => 'title, description, chapo, postscriptum', 'locale_column' => 'locale', 'default_locale' => '', 'locale_alias' => '', ),
'versionable' => array('version_column' => 'version', 'version_table' => '', 'log_created_at' => 'true', 'log_created_by' => 'true', 'log_comment' => 'false', 'version_created_at_column' => 'version_created_at', 'version_created_by_column' => 'version_created_by', 'version_comment_column' => 'version_comment', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
'i18n' => array (
'i18n_table' => '%TABLE%_i18n',
'i18n_phpname' => '%PHPNAME%I18n',
'i18n_columns' => 'title, description, chapo, postscriptum',
'i18n_pk_name' => NULL,
'locale_column' => 'locale',
'default_locale' => NULL,
'locale_alias' => '',
),
'versionable' => array (
'version_column' => 'version',
'version_table' => '',
'log_created_at' => 'true',
'log_created_by' => 'true',
'log_comment' => 'false',
'version_created_at_column' => 'version_created_at',
'version_created_by_column' => 'version_created_by',
'version_comment_column' => 'version_comment',
),
);
} // getBehaviors()

View File

@@ -42,16 +42,16 @@ class FolderVersionTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'folder', 'ID', true, null, null);
$this->addColumn('PARENT', 'Parent', 'INTEGER', true, null, null);
$this->addColumn('LINK', 'Link', 'VARCHAR', false, 255, null);
$this->addColumn('VISIBLE', 'Visible', 'TINYINT', false, null, null);
$this->addColumn('POSITION', 'Position', 'INTEGER', false, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('VERSION', 'Version', 'INTEGER', true, null, 0);
$this->addColumn('VERSION_CREATED_AT', 'VersionCreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('VERSION_CREATED_BY', 'VersionCreatedBy', 'VARCHAR', false, 100, null);
$this->addForeignPrimaryKey('id', 'Id', 'INTEGER' , 'folder', 'id', true, null, null);
$this->addColumn('parent', 'Parent', 'INTEGER', true, null, null);
$this->addColumn('link', 'Link', 'VARCHAR', false, 255, null);
$this->addColumn('visible', 'Visible', 'TINYINT', false, null, null);
$this->addColumn('position', 'Position', 'INTEGER', false, null, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('version', 'Version', 'INTEGER', true, null, 0);
$this->addColumn('version_created_at', 'VersionCreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('version_created_by', 'VersionCreatedBy', 'VARCHAR', false, 100, null);
// validators
} // initialize()

View File

@@ -42,12 +42,12 @@ class GroupI18nTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'group', 'ID', true, null, null);
$this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_EN');
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
$this->addColumn('POSTSCRIPTUM', 'Postscriptum', 'LONGVARCHAR', false, null, null);
$this->addForeignPrimaryKey('id', 'Id', 'INTEGER' , 'group', 'id', true, null, null);
$this->addPrimaryKey('locale', 'Locale', 'VARCHAR', true, 5, 'en_US');
$this->addColumn('title', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('description', 'Description', 'CLOB', false, null, null);
$this->addColumn('chapo', 'Chapo', 'LONGVARCHAR', false, null, null);
$this->addColumn('postscriptum', 'Postscriptum', 'LONGVARCHAR', false, null, null);
// validators
} // initialize()

View File

@@ -42,12 +42,12 @@ class GroupModuleTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('GROUP_ID', 'GroupId', 'INTEGER', 'group', 'ID', true, null, null);
$this->addForeignKey('MODULE_ID', 'ModuleId', 'INTEGER', 'module', 'ID', false, null, null);
$this->addColumn('ACCESS', 'Access', 'TINYINT', false, null, 0);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('group_id', 'GroupId', 'INTEGER', 'group', 'id', true, null, null);
$this->addForeignKey('module_id', 'ModuleId', 'INTEGER', 'module', 'id', false, null, null);
$this->addColumn('access', 'Access', 'TINYINT', false, null, 0);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
@@ -69,7 +69,11 @@ class GroupModuleTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
);
} // getBehaviors()

View File

@@ -42,13 +42,13 @@ class GroupResourceTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('GROUP_ID', 'GroupId', 'INTEGER', 'group', 'ID', true, null, null);
$this->addForeignKey('RESOURCE_ID', 'ResourceId', 'INTEGER', 'resource', 'ID', true, null, null);
$this->addColumn('READ', 'Read', 'TINYINT', false, null, 0);
$this->addColumn('WRITE', 'Write', 'TINYINT', false, null, 0);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('group_id', 'GroupId', 'INTEGER', 'group', 'id', true, null, null);
$this->addForeignKey('resource_id', 'ResourceId', 'INTEGER', 'resource', 'id', true, null, null);
$this->addColumn('read', 'Read', 'TINYINT', false, null, 0);
$this->addColumn('write', 'Write', 'TINYINT', false, null, 0);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
@@ -70,7 +70,11 @@ class GroupResourceTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
);
} // getBehaviors()

View File

@@ -42,10 +42,10 @@ class GroupTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addColumn('CODE', 'Code', 'VARCHAR', true, 30, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addColumn('code', 'Code', 'VARCHAR', true, 30, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
@@ -69,8 +69,20 @@ class GroupTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'i18n' => array('i18n_table' => '%TABLE%_i18n', 'i18n_phpname' => '%PHPNAME%I18n', 'i18n_columns' => 'title, description, chapo, postscriptum', 'locale_column' => 'locale', 'default_locale' => '', 'locale_alias' => '', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
'i18n' => array (
'i18n_table' => '%TABLE%_i18n',
'i18n_phpname' => '%PHPNAME%I18n',
'i18n_columns' => 'title, description, chapo, postscriptum',
'i18n_pk_name' => NULL,
'locale_column' => 'locale',
'default_locale' => NULL,
'locale_alias' => '',
),
);
} // getBehaviors()

View File

@@ -42,12 +42,12 @@ class ImageI18nTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'image', 'ID', true, null, null);
$this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_EN');
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
$this->addColumn('POSTSCRIPTUM', 'Postscriptum', 'LONGVARCHAR', false, null, null);
$this->addForeignPrimaryKey('id', 'Id', 'INTEGER' , 'image', 'id', true, null, null);
$this->addPrimaryKey('locale', 'Locale', 'VARCHAR', true, 5, 'en_US');
$this->addColumn('title', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('description', 'Description', 'CLOB', false, null, null);
$this->addColumn('chapo', 'Chapo', 'LONGVARCHAR', false, null, null);
$this->addColumn('postscriptum', 'Postscriptum', 'LONGVARCHAR', false, null, null);
// validators
} // initialize()

View File

@@ -42,15 +42,15 @@ class ImageTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('PRODUCT_ID', 'ProductId', 'INTEGER', 'product', 'ID', false, null, null);
$this->addForeignKey('CATEGORY_ID', 'CategoryId', 'INTEGER', 'category', 'ID', false, null, null);
$this->addForeignKey('FOLDER_ID', 'FolderId', 'INTEGER', 'folder', 'ID', false, null, null);
$this->addForeignKey('CONTENT_ID', 'ContentId', 'INTEGER', 'content', 'ID', false, null, null);
$this->addColumn('FILE', 'File', 'VARCHAR', true, 255, null);
$this->addColumn('POSITION', 'Position', 'INTEGER', false, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('product_id', 'ProductId', 'INTEGER', 'product', 'id', false, null, null);
$this->addForeignKey('category_id', 'CategoryId', 'INTEGER', 'category', 'id', false, null, null);
$this->addForeignKey('folder_id', 'FolderId', 'INTEGER', 'folder', 'id', false, null, null);
$this->addForeignKey('content_id', 'ContentId', 'INTEGER', 'content', 'id', false, null, null);
$this->addColumn('file', 'File', 'VARCHAR', true, 255, null);
$this->addColumn('position', 'Position', 'INTEGER', false, null, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
@@ -75,8 +75,20 @@ class ImageTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'i18n' => array('i18n_table' => '%TABLE%_i18n', 'i18n_phpname' => '%PHPNAME%I18n', 'i18n_columns' => 'title, description, chapo, postscriptum', 'locale_column' => 'locale', 'default_locale' => '', 'locale_alias' => '', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
'i18n' => array (
'i18n_table' => '%TABLE%_i18n',
'i18n_phpname' => '%PHPNAME%I18n',
'i18n_columns' => 'title, description, chapo, postscriptum',
'i18n_pk_name' => NULL,
'locale_column' => 'locale',
'default_locale' => NULL,
'locale_alias' => '',
),
);
} // getBehaviors()

View File

@@ -42,14 +42,14 @@ class LangTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 100, null);
$this->addColumn('CODE', 'Code', 'VARCHAR', false, 10, null);
$this->addColumn('LOCALE', 'Locale', 'VARCHAR', false, 45, null);
$this->addColumn('URL', 'Url', 'VARCHAR', false, 255, null);
$this->addColumn('BY_DEFAULT', 'ByDefault', 'TINYINT', false, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addColumn('title', 'Title', 'VARCHAR', false, 100, null);
$this->addColumn('code', 'Code', 'VARCHAR', false, 10, null);
$this->addColumn('locale', 'Locale', 'VARCHAR', false, 45, null);
$this->addColumn('url', 'Url', 'VARCHAR', false, 255, null);
$this->addColumn('by_default', 'ByDefault', 'TINYINT', false, null, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
@@ -69,7 +69,11 @@ class LangTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
);
} // getBehaviors()

View File

@@ -42,11 +42,11 @@ class MessageI18nTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'message', 'ID', true, null, null);
$this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_EN');
$this->addColumn('TITLE', 'Title', 'LONGVARCHAR', false, null, null);
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
$this->addColumn('DESCRIPTION_HTML', 'DescriptionHtml', 'CLOB', false, null, null);
$this->addForeignPrimaryKey('id', 'Id', 'INTEGER' , 'message', 'id', true, null, null);
$this->addPrimaryKey('locale', 'Locale', 'VARCHAR', true, 5, 'en_US');
$this->addColumn('title', 'Title', 'LONGVARCHAR', false, null, null);
$this->addColumn('description', 'Description', 'CLOB', false, null, null);
$this->addColumn('description_html', 'DescriptionHtml', 'CLOB', false, null, null);
// validators
} // initialize()

View File

@@ -42,15 +42,15 @@ class MessageTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addColumn('CODE', 'Code', 'VARCHAR', true, 45, null);
$this->addColumn('SECURED', 'Secured', 'TINYINT', false, null, null);
$this->addColumn('REF', 'Ref', 'VARCHAR', false, 255, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('VERSION', 'Version', 'INTEGER', false, null, 0);
$this->addColumn('VERSION_CREATED_AT', 'VersionCreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('VERSION_CREATED_BY', 'VersionCreatedBy', 'VARCHAR', false, 100, null);
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addColumn('code', 'Code', 'VARCHAR', true, 45, null);
$this->addColumn('secured', 'Secured', 'TINYINT', false, null, null);
$this->addColumn('ref', 'Ref', 'VARCHAR', false, 255, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('version', 'Version', 'INTEGER', false, null, 0);
$this->addColumn('version_created_at', 'VersionCreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('version_created_by', 'VersionCreatedBy', 'VARCHAR', false, 100, null);
// validators
} // initialize()
@@ -72,9 +72,30 @@ class MessageTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'i18n' => array('i18n_table' => '%TABLE%_i18n', 'i18n_phpname' => '%PHPNAME%I18n', 'i18n_columns' => 'title, description, description_html', 'locale_column' => 'locale', 'default_locale' => '', 'locale_alias' => '', ),
'versionable' => array('version_column' => 'version', 'version_table' => '', 'log_created_at' => 'true', 'log_created_by' => 'true', 'log_comment' => 'false', 'version_created_at_column' => 'version_created_at', 'version_created_by_column' => 'version_created_by', 'version_comment_column' => 'version_comment', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
'i18n' => array (
'i18n_table' => '%TABLE%_i18n',
'i18n_phpname' => '%PHPNAME%I18n',
'i18n_columns' => 'title, description, description_html',
'i18n_pk_name' => NULL,
'locale_column' => 'locale',
'default_locale' => NULL,
'locale_alias' => '',
),
'versionable' => array (
'version_column' => 'version',
'version_table' => '',
'log_created_at' => 'true',
'log_created_by' => 'true',
'log_comment' => 'false',
'version_created_at_column' => 'version_created_at',
'version_created_by_column' => 'version_created_by',
'version_comment_column' => 'version_comment',
),
);
} // getBehaviors()

View File

@@ -42,15 +42,15 @@ class MessageVersionTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'message', 'ID', true, null, null);
$this->addColumn('CODE', 'Code', 'VARCHAR', true, 45, null);
$this->addColumn('SECURED', 'Secured', 'TINYINT', false, null, null);
$this->addColumn('REF', 'Ref', 'VARCHAR', false, 255, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('VERSION', 'Version', 'INTEGER', true, null, 0);
$this->addColumn('VERSION_CREATED_AT', 'VersionCreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('VERSION_CREATED_BY', 'VersionCreatedBy', 'VARCHAR', false, 100, null);
$this->addForeignPrimaryKey('id', 'Id', 'INTEGER' , 'message', 'id', true, null, null);
$this->addColumn('code', 'Code', 'VARCHAR', true, 45, null);
$this->addColumn('secured', 'Secured', 'TINYINT', false, null, null);
$this->addColumn('ref', 'Ref', 'VARCHAR', false, 255, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('version', 'Version', 'INTEGER', true, null, 0);
$this->addColumn('version_created_at', 'VersionCreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('version_created_by', 'VersionCreatedBy', 'VARCHAR', false, 100, null);
// validators
} // initialize()

View File

@@ -42,12 +42,12 @@ class ModuleI18nTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'module', 'ID', true, null, null);
$this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_EN');
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
$this->addColumn('POSTSCRIPTUM', 'Postscriptum', 'LONGVARCHAR', false, null, null);
$this->addForeignPrimaryKey('id', 'Id', 'INTEGER' , 'module', 'id', true, null, null);
$this->addPrimaryKey('locale', 'Locale', 'VARCHAR', true, 5, 'en_US');
$this->addColumn('title', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('description', 'Description', 'CLOB', false, null, null);
$this->addColumn('chapo', 'Chapo', 'LONGVARCHAR', false, null, null);
$this->addColumn('postscriptum', 'Postscriptum', 'LONGVARCHAR', false, null, null);
// validators
} // initialize()

View File

@@ -42,13 +42,13 @@ class ModuleTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(false);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addColumn('CODE', 'Code', 'VARCHAR', true, 55, null);
$this->addColumn(' TYPE', ' type', 'TINYINT', true, null, null);
$this->addColumn('ACTIVATE', 'Activate', 'TINYINT', false, null, null);
$this->addColumn('POSITION', 'Position', 'INTEGER', false, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addColumn('code', 'Code', 'VARCHAR', true, 55, null);
$this->addColumn(' type', ' type', 'TINYINT', true, null, null);
$this->addColumn('activate', 'Activate', 'TINYINT', false, null, null);
$this->addColumn('position', 'Position', 'INTEGER', false, null, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
@@ -70,8 +70,20 @@ class ModuleTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'i18n' => array('i18n_table' => '%TABLE%_i18n', 'i18n_phpname' => '%PHPNAME%I18n', 'i18n_columns' => 'title, description, chapo, postscriptum', 'locale_column' => 'locale', 'default_locale' => '', 'locale_alias' => '', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
'i18n' => array (
'i18n_table' => '%TABLE%_i18n',
'i18n_phpname' => '%PHPNAME%I18n',
'i18n_columns' => 'title, description, chapo, postscriptum',
'i18n_pk_name' => NULL,
'locale_column' => 'locale',
'default_locale' => NULL,
'locale_alias' => '',
),
);
} // getBehaviors()

View File

@@ -42,20 +42,20 @@ class OrderAddressTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addColumn('CUSTOMER_TITLE_ID', 'CustomerTitleId', 'INTEGER', false, null, null);
$this->addColumn('COMPANY', 'Company', 'VARCHAR', false, 255, null);
$this->addColumn('FIRSTNAME', 'Firstname', 'VARCHAR', true, 255, null);
$this->addColumn('LASTNAME', 'Lastname', 'VARCHAR', true, 255, null);
$this->addColumn('ADDRESS1', 'Address1', 'VARCHAR', true, 255, null);
$this->addColumn('ADDRESS2', 'Address2', 'VARCHAR', false, 255, null);
$this->addColumn('ADDRESS3', 'Address3', 'VARCHAR', false, 255, null);
$this->addColumn('ZIPCODE', 'Zipcode', 'VARCHAR', true, 10, null);
$this->addColumn('CITY', 'City', 'VARCHAR', true, 255, null);
$this->addColumn('PHONE', 'Phone', 'VARCHAR', false, 20, null);
$this->addColumn('COUNTRY_ID', 'CountryId', 'INTEGER', true, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addColumn('customer_title_id', 'CustomerTitleId', 'INTEGER', false, null, null);
$this->addColumn('company', 'Company', 'VARCHAR', false, 255, null);
$this->addColumn('firstname', 'Firstname', 'VARCHAR', true, 255, null);
$this->addColumn('lastname', 'Lastname', 'VARCHAR', true, 255, null);
$this->addColumn('address1', 'Address1', 'VARCHAR', true, 255, null);
$this->addColumn('address2', 'Address2', 'VARCHAR', false, 255, null);
$this->addColumn('address3', 'Address3', 'VARCHAR', false, 255, null);
$this->addColumn('zipcode', 'Zipcode', 'VARCHAR', true, 10, null);
$this->addColumn('city', 'City', 'VARCHAR', true, 255, null);
$this->addColumn('phone', 'Phone', 'VARCHAR', false, 20, null);
$this->addColumn('country_id', 'CountryId', 'INTEGER', true, null, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
@@ -77,7 +77,11 @@ class OrderAddressTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
);
} // getBehaviors()

View File

@@ -42,12 +42,12 @@ class OrderFeatureTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('ORDER_PRODUCT_ID', 'OrderProductId', 'INTEGER', 'order_product', 'ID', true, null, null);
$this->addColumn('FEATURE_DESC', 'FeatureDesc', 'VARCHAR', false, 255, null);
$this->addColumn('FEATURE_AV_DESC', 'FeatureAvDesc', 'VARCHAR', false, 255, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('order_product_id', 'OrderProductId', 'INTEGER', 'order_product', 'id', true, null, null);
$this->addColumn('feature_desc', 'FeatureDesc', 'VARCHAR', false, 255, null);
$this->addColumn('feature_av_desc', 'FeatureAvDesc', 'VARCHAR', false, 255, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
@@ -68,7 +68,11 @@ class OrderFeatureTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
);
} // getBehaviors()

View File

@@ -42,18 +42,18 @@ class OrderProductTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('ORDER_ID', 'OrderId', 'INTEGER', 'order', 'ID', true, null, null);
$this->addColumn('PRODUCT_REF', 'ProductRef', 'VARCHAR', false, 255, null);
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'LONGVARCHAR', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
$this->addColumn('QUANTITY', 'Quantity', 'FLOAT', true, null, null);
$this->addColumn('PRICE', 'Price', 'FLOAT', true, null, null);
$this->addColumn('TAX', 'Tax', 'FLOAT', false, null, null);
$this->addColumn('PARENT', 'Parent', 'INTEGER', false, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('order_id', 'OrderId', 'INTEGER', 'order', 'id', true, null, null);
$this->addColumn('product_ref', 'ProductRef', 'VARCHAR', false, 255, null);
$this->addColumn('title', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('description', 'Description', 'LONGVARCHAR', false, null, null);
$this->addColumn('chapo', 'Chapo', 'LONGVARCHAR', false, null, null);
$this->addColumn('quantity', 'Quantity', 'FLOAT', true, null, null);
$this->addColumn('price', 'Price', 'FLOAT', true, null, null);
$this->addColumn('tax', 'Tax', 'FLOAT', false, null, null);
$this->addColumn('parent', 'Parent', 'INTEGER', false, null, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
@@ -75,7 +75,11 @@ class OrderProductTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
);
} // getBehaviors()

View File

@@ -42,12 +42,12 @@ class OrderStatusI18nTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'order_status', 'ID', true, null, null);
$this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_EN');
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
$this->addColumn('POSTSCRIPTUM', 'Postscriptum', 'LONGVARCHAR', false, null, null);
$this->addForeignPrimaryKey('id', 'Id', 'INTEGER' , 'order_status', 'id', true, null, null);
$this->addPrimaryKey('locale', 'Locale', 'VARCHAR', true, 5, 'en_US');
$this->addColumn('title', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('description', 'Description', 'CLOB', false, null, null);
$this->addColumn('chapo', 'Chapo', 'LONGVARCHAR', false, null, null);
$this->addColumn('postscriptum', 'Postscriptum', 'LONGVARCHAR', false, null, null);
// validators
} // initialize()

View File

@@ -42,10 +42,10 @@ class OrderStatusTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addColumn('CODE', 'Code', 'VARCHAR', false, 45, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addColumn('code', 'Code', 'VARCHAR', false, 45, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
@@ -67,8 +67,20 @@ class OrderStatusTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'i18n' => array('i18n_table' => '%TABLE%_i18n', 'i18n_phpname' => '%PHPNAME%I18n', 'i18n_columns' => 'title, description, chapo, postscriptum', 'locale_column' => 'locale', 'default_locale' => '', 'locale_alias' => '', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
'i18n' => array (
'i18n_table' => '%TABLE%_i18n',
'i18n_phpname' => '%PHPNAME%I18n',
'i18n_columns' => 'title, description, chapo, postscriptum',
'i18n_pk_name' => NULL,
'locale_column' => 'locale',
'default_locale' => NULL,
'locale_alias' => '',
),
);
} // getBehaviors()

View File

@@ -42,24 +42,24 @@ class OrderTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addColumn('REF', 'Ref', 'VARCHAR', false, 45, null);
$this->addForeignKey('CUSTOMER_ID', 'CustomerId', 'INTEGER', 'customer', 'ID', true, null, null);
$this->addForeignKey('ADDRESS_INVOICE', 'AddressInvoice', 'INTEGER', 'order_address', 'ID', false, null, null);
$this->addForeignKey('ADDRESS_DELIVERY', 'AddressDelivery', 'INTEGER', 'order_address', 'ID', false, null, null);
$this->addColumn('INVOICE_DATE', 'InvoiceDate', 'DATE', false, null, null);
$this->addForeignKey('CURRENCY_ID', 'CurrencyId', 'INTEGER', 'currency', 'ID', false, null, null);
$this->addColumn('CURRENCY_RATE', 'CurrencyRate', 'FLOAT', true, null, null);
$this->addColumn('TRANSACTION', 'Transaction', 'VARCHAR', false, 100, null);
$this->addColumn('DELIVERY_NUM', 'DeliveryNum', 'VARCHAR', false, 100, null);
$this->addColumn('INVOICE', 'Invoice', 'VARCHAR', false, 100, null);
$this->addColumn('POSTAGE', 'Postage', 'FLOAT', false, null, null);
$this->addColumn('PAYMENT', 'Payment', 'VARCHAR', true, 45, null);
$this->addColumn('CARRIER', 'Carrier', 'VARCHAR', true, 45, null);
$this->addForeignKey('STATUS_ID', 'StatusId', 'INTEGER', 'order_status', 'ID', false, null, null);
$this->addColumn('LANG', 'Lang', 'VARCHAR', true, 10, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addColumn('ref', 'Ref', 'VARCHAR', false, 45, null);
$this->addForeignKey('customer_id', 'CustomerId', 'INTEGER', 'customer', 'id', true, null, null);
$this->addForeignKey('address_invoice', 'AddressInvoice', 'INTEGER', 'order_address', 'id', false, null, null);
$this->addForeignKey('address_delivery', 'AddressDelivery', 'INTEGER', 'order_address', 'id', false, null, null);
$this->addColumn('invoice_date', 'InvoiceDate', 'DATE', false, null, null);
$this->addForeignKey('currency_id', 'CurrencyId', 'INTEGER', 'currency', 'id', false, null, null);
$this->addColumn('currency_rate', 'CurrencyRate', 'FLOAT', true, null, null);
$this->addColumn('transaction', 'Transaction', 'VARCHAR', false, 100, null);
$this->addColumn('delivery_num', 'DeliveryNum', 'VARCHAR', false, 100, null);
$this->addColumn('invoice', 'Invoice', 'VARCHAR', false, 100, null);
$this->addColumn('postage', 'Postage', 'FLOAT', false, null, null);
$this->addColumn('payment', 'Payment', 'VARCHAR', true, 45, null);
$this->addColumn('carrier', 'Carrier', 'VARCHAR', true, 45, null);
$this->addForeignKey('status_id', 'StatusId', 'INTEGER', 'order_status', 'id', false, null, null);
$this->addColumn('lang', 'Lang', 'VARCHAR', true, 10, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
@@ -86,7 +86,11 @@ class OrderTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
);
} // getBehaviors()

View File

@@ -42,10 +42,10 @@ class ProductCategoryTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('PRODUCT_ID', 'ProductId', 'INTEGER' , 'product', 'ID', true, null, null);
$this->addForeignPrimaryKey('CATEGORY_ID', 'CategoryId', 'INTEGER' , 'category', 'ID', true, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addForeignPrimaryKey('product_id', 'ProductId', 'INTEGER' , 'product', 'id', true, null, null);
$this->addForeignPrimaryKey('category_id', 'CategoryId', 'INTEGER' , 'category', 'id', true, null, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
@@ -67,7 +67,11 @@ class ProductCategoryTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
);
} // getBehaviors()

View File

@@ -42,12 +42,12 @@ class ProductI18nTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'product', 'ID', true, null, null);
$this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_EN');
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
$this->addColumn('POSTSCRIPTUM', 'Postscriptum', 'LONGVARCHAR', false, null, null);
$this->addForeignPrimaryKey('id', 'Id', 'INTEGER' , 'product', 'id', true, null, null);
$this->addPrimaryKey('locale', 'Locale', 'VARCHAR', true, 5, 'en_US');
$this->addColumn('title', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('description', 'Description', 'CLOB', false, null, null);
$this->addColumn('chapo', 'Chapo', 'LONGVARCHAR', false, null, null);
$this->addColumn('postscriptum', 'Postscriptum', 'LONGVARCHAR', false, null, null);
// validators
} // initialize()

View File

@@ -42,23 +42,23 @@ class ProductTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('TAX_RULE_ID', 'TaxRuleId', 'INTEGER', 'tax_rule', 'ID', false, null, null);
$this->addColumn('REF', 'Ref', 'VARCHAR', true, 255, null);
$this->addColumn('PRICE', 'Price', 'FLOAT', true, null, null);
$this->addColumn('PRICE2', 'Price2', 'FLOAT', false, null, null);
$this->addColumn('ECOTAX', 'Ecotax', 'FLOAT', false, null, null);
$this->addColumn('NEWNESS', 'Newness', 'TINYINT', false, null, 0);
$this->addColumn('PROMO', 'Promo', 'TINYINT', false, null, 0);
$this->addColumn('STOCK', 'Stock', 'INTEGER', false, null, 0);
$this->addColumn('VISIBLE', 'Visible', 'TINYINT', true, null, 0);
$this->addColumn('WEIGHT', 'Weight', 'FLOAT', false, 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);
$this->addColumn('VERSION', 'Version', 'INTEGER', false, null, 0);
$this->addColumn('VERSION_CREATED_AT', 'VersionCreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('VERSION_CREATED_BY', 'VersionCreatedBy', 'VARCHAR', false, 100, null);
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('tax_rule_id', 'TaxRuleId', 'INTEGER', 'tax_rule', 'id', false, null, null);
$this->addColumn('ref', 'Ref', 'VARCHAR', true, 255, null);
$this->addColumn('price', 'Price', 'FLOAT', true, null, null);
$this->addColumn('price2', 'Price2', 'FLOAT', false, null, null);
$this->addColumn('ecotax', 'Ecotax', 'FLOAT', false, null, null);
$this->addColumn('newness', 'Newness', 'TINYINT', false, null, 0);
$this->addColumn('promo', 'Promo', 'TINYINT', false, null, 0);
$this->addColumn('stock', 'Stock', 'INTEGER', false, null, 0);
$this->addColumn('visible', 'Visible', 'TINYINT', true, null, 0);
$this->addColumn('weight', 'Weight', 'FLOAT', false, 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);
$this->addColumn('version', 'Version', 'INTEGER', false, null, 0);
$this->addColumn('version_created_at', 'VersionCreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('version_created_by', 'VersionCreatedBy', 'VARCHAR', false, 100, null);
// validators
} // initialize()
@@ -90,9 +90,30 @@ class ProductTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'i18n' => array('i18n_table' => '%TABLE%_i18n', 'i18n_phpname' => '%PHPNAME%I18n', 'i18n_columns' => 'title, description, chapo, postscriptum', 'locale_column' => 'locale', 'default_locale' => '', 'locale_alias' => '', ),
'versionable' => array('version_column' => 'version', 'version_table' => '', 'log_created_at' => 'true', 'log_created_by' => 'true', 'log_comment' => 'false', 'version_created_at_column' => 'version_created_at', 'version_created_by_column' => 'version_created_by', 'version_comment_column' => 'version_comment', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
'i18n' => array (
'i18n_table' => '%TABLE%_i18n',
'i18n_phpname' => '%PHPNAME%I18n',
'i18n_columns' => 'title, description, chapo, postscriptum',
'i18n_pk_name' => NULL,
'locale_column' => 'locale',
'default_locale' => NULL,
'locale_alias' => '',
),
'versionable' => array (
'version_column' => 'version',
'version_table' => '',
'log_created_at' => 'true',
'log_created_by' => 'true',
'log_comment' => 'false',
'version_created_at_column' => 'version_created_at',
'version_created_by_column' => 'version_created_by',
'version_comment_column' => 'version_comment',
),
);
} // getBehaviors()

View File

@@ -42,23 +42,23 @@ class ProductVersionTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'product', 'ID', true, null, null);
$this->addColumn('TAX_RULE_ID', 'TaxRuleId', 'INTEGER', false, null, null);
$this->addColumn('REF', 'Ref', 'VARCHAR', true, 255, null);
$this->addColumn('PRICE', 'Price', 'FLOAT', true, null, null);
$this->addColumn('PRICE2', 'Price2', 'FLOAT', false, null, null);
$this->addColumn('ECOTAX', 'Ecotax', 'FLOAT', false, null, null);
$this->addColumn('NEWNESS', 'Newness', 'TINYINT', false, null, 0);
$this->addColumn('PROMO', 'Promo', 'TINYINT', false, null, 0);
$this->addColumn('STOCK', 'Stock', 'INTEGER', false, null, 0);
$this->addColumn('VISIBLE', 'Visible', 'TINYINT', true, null, 0);
$this->addColumn('WEIGHT', 'Weight', 'FLOAT', false, 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);
$this->addPrimaryKey('VERSION', 'Version', 'INTEGER', true, null, 0);
$this->addColumn('VERSION_CREATED_AT', 'VersionCreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('VERSION_CREATED_BY', 'VersionCreatedBy', 'VARCHAR', false, 100, null);
$this->addForeignPrimaryKey('id', 'Id', 'INTEGER' , 'product', 'id', true, null, null);
$this->addColumn('tax_rule_id', 'TaxRuleId', 'INTEGER', false, null, null);
$this->addColumn('ref', 'Ref', 'VARCHAR', true, 255, null);
$this->addColumn('price', 'Price', 'FLOAT', true, null, null);
$this->addColumn('price2', 'Price2', 'FLOAT', false, null, null);
$this->addColumn('ecotax', 'Ecotax', 'FLOAT', false, null, null);
$this->addColumn('newness', 'Newness', 'TINYINT', false, null, 0);
$this->addColumn('promo', 'Promo', 'TINYINT', false, null, 0);
$this->addColumn('stock', 'Stock', 'INTEGER', false, null, 0);
$this->addColumn('visible', 'Visible', 'TINYINT', true, null, 0);
$this->addColumn('weight', 'Weight', 'FLOAT', false, 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);
$this->addPrimaryKey('version', 'Version', 'INTEGER', true, null, 0);
$this->addColumn('version_created_at', 'VersionCreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('version_created_by', 'VersionCreatedBy', 'VARCHAR', false, 100, null);
// validators
} // initialize()

View File

@@ -42,12 +42,12 @@ class ResourceI18nTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'resource', 'ID', true, null, null);
$this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_EN');
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
$this->addColumn('POSTSCRIPTUM', 'Postscriptum', 'LONGVARCHAR', false, null, null);
$this->addForeignPrimaryKey('id', 'Id', 'INTEGER' , 'resource', 'id', true, null, null);
$this->addPrimaryKey('locale', 'Locale', 'VARCHAR', true, 5, 'en_US');
$this->addColumn('title', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('description', 'Description', 'CLOB', false, null, null);
$this->addColumn('chapo', 'Chapo', 'LONGVARCHAR', false, null, null);
$this->addColumn('postscriptum', 'Postscriptum', 'LONGVARCHAR', false, null, null);
// validators
} // initialize()

View File

@@ -42,10 +42,10 @@ class ResourceTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addColumn('CODE', 'Code', 'VARCHAR', true, 30, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addColumn('code', 'Code', 'VARCHAR', true, 30, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
@@ -67,8 +67,20 @@ class ResourceTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'i18n' => array('i18n_table' => '%TABLE%_i18n', 'i18n_phpname' => '%PHPNAME%I18n', 'i18n_columns' => 'title, description, chapo, postscriptum', 'locale_column' => 'locale', 'default_locale' => '', 'locale_alias' => '', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
'i18n' => array (
'i18n_table' => '%TABLE%_i18n',
'i18n_phpname' => '%PHPNAME%I18n',
'i18n_columns' => 'title, description, chapo, postscriptum',
'i18n_pk_name' => NULL,
'locale_column' => 'locale',
'default_locale' => NULL,
'locale_alias' => '',
),
);
} // getBehaviors()

View File

@@ -42,14 +42,14 @@ class RewritingTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(false);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addColumn('URL', 'Url', 'VARCHAR', true, 255, null);
$this->addForeignKey('PRODUCT_ID', 'ProductId', 'INTEGER', 'product', 'ID', false, null, null);
$this->addForeignKey('CATEGORY_ID', 'CategoryId', 'INTEGER', 'category', 'ID', false, null, null);
$this->addForeignKey('FOLDER_ID', 'FolderId', 'INTEGER', 'folder', 'ID', false, null, null);
$this->addForeignKey('CONTENT_ID', 'ContentId', 'INTEGER', 'content', 'ID', false, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addColumn('url', 'Url', 'VARCHAR', true, 255, null);
$this->addForeignKey('product_id', 'ProductId', 'INTEGER', 'product', 'id', false, null, null);
$this->addForeignKey('category_id', 'CategoryId', 'INTEGER', 'category', 'id', false, null, null);
$this->addForeignKey('folder_id', 'FolderId', 'INTEGER', 'folder', 'id', false, null, null);
$this->addForeignKey('content_id', 'ContentId', 'INTEGER', 'content', 'id', false, null, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
@@ -73,7 +73,11 @@ class RewritingTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
);
} // getBehaviors()

View File

@@ -42,13 +42,13 @@ class StockTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('COMBINATION_ID', 'CombinationId', 'INTEGER', 'combination', 'ID', false, null, null);
$this->addForeignKey('PRODUCT_ID', 'ProductId', 'INTEGER', 'product', 'ID', true, null, null);
$this->addColumn('INCREASE', 'Increase', 'FLOAT', false, null, null);
$this->addColumn('VALUE', 'Value', 'FLOAT', true, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('combination_id', 'CombinationId', 'INTEGER', 'combination', 'id', false, null, null);
$this->addForeignKey('product_id', 'ProductId', 'INTEGER', 'product', 'id', true, null, null);
$this->addColumn('increase', 'Increase', 'FLOAT', false, null, null);
$this->addColumn('value', 'Value', 'FLOAT', true, null, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
@@ -70,7 +70,11 @@ class StockTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
);
} // getBehaviors()

View File

@@ -42,10 +42,10 @@ class TaxI18nTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'tax', 'ID', true, null, null);
$this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_EN');
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'LONGVARCHAR', false, null, null);
$this->addForeignPrimaryKey('id', 'Id', 'INTEGER' , 'tax', 'id', true, null, null);
$this->addPrimaryKey('locale', 'Locale', 'VARCHAR', true, 5, 'en_US');
$this->addColumn('title', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('description', 'Description', 'LONGVARCHAR', false, null, null);
// validators
} // initialize()

View File

@@ -42,13 +42,13 @@ class TaxRuleCountryTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(false);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('TAX_RULE_ID', 'TaxRuleId', 'INTEGER', 'tax_rule', 'ID', false, null, null);
$this->addForeignKey('COUNTRY_ID', 'CountryId', 'INTEGER', 'country', 'ID', false, null, null);
$this->addForeignKey('TAX_ID', 'TaxId', 'INTEGER', 'tax', 'ID', false, null, null);
$this->addColumn('NONE', 'None', 'TINYINT', false, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('tax_rule_id', 'TaxRuleId', 'INTEGER', 'tax_rule', 'id', false, null, null);
$this->addForeignKey('country_id', 'CountryId', 'INTEGER', 'country', 'id', false, null, null);
$this->addForeignKey('tax_id', 'TaxId', 'INTEGER', 'tax', 'id', false, null, null);
$this->addColumn('none', 'None', 'TINYINT', false, null, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
@@ -71,7 +71,11 @@ class TaxRuleCountryTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
);
} // getBehaviors()

View File

@@ -42,8 +42,8 @@ class TaxRuleI18nTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'tax_rule', 'ID', true, null, null);
$this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_EN');
$this->addForeignPrimaryKey('id', 'Id', 'INTEGER' , 'tax_rule', 'id', true, null, null);
$this->addPrimaryKey('locale', 'Locale', 'VARCHAR', true, 5, 'en_US');
// validators
} // initialize()

View File

@@ -42,12 +42,12 @@ class TaxRuleTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addColumn('CODE', 'Code', 'VARCHAR', false, 45, null);
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'LONGVARCHAR', false, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addColumn('code', 'Code', 'VARCHAR', false, 45, null);
$this->addColumn('title', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('description', 'Description', 'LONGVARCHAR', false, null, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
@@ -70,8 +70,20 @@ class TaxRuleTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'i18n' => array('i18n_table' => '%TABLE%_i18n', 'i18n_phpname' => '%PHPNAME%I18n', 'i18n_columns' => '', 'locale_column' => 'locale', 'default_locale' => '', 'locale_alias' => '', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
'i18n' => array (
'i18n_table' => '%TABLE%_i18n',
'i18n_phpname' => '%PHPNAME%I18n',
'i18n_columns' => '',
'i18n_pk_name' => NULL,
'locale_column' => 'locale',
'default_locale' => NULL,
'locale_alias' => '',
),
);
} // getBehaviors()

View File

@@ -42,10 +42,10 @@ class TaxTableMap extends TableMap
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addColumn('RATE', 'Rate', 'FLOAT', true, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addColumn('rate', 'Rate', 'FLOAT', true, null, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
@@ -67,8 +67,20 @@ class TaxTableMap extends TableMap
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
'i18n' => array('i18n_table' => '%TABLE%_i18n', 'i18n_phpname' => '%PHPNAME%I18n', 'i18n_columns' => 'title, description', 'locale_column' => 'locale', 'default_locale' => '', 'locale_alias' => '', ),
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
'i18n' => array (
'i18n_table' => '%TABLE%_i18n',
'i18n_phpname' => '%PHPNAME%I18n',
'i18n_columns' => 'title, description',
'i18n_pk_name' => NULL,
'locale_column' => 'locale',
'default_locale' => NULL,
'locale_alias' => '',
),
);
} // getBehaviors()

View File

@@ -107,6 +107,12 @@ abstract class BaseAccessory extends BaseObject implements Persistent
*/
protected $alreadyInValidation = false;
/**
* Flag to prevent endless clearAllReferences($deep=true) loop, if this object is referenced
* @var boolean
*/
protected $alreadyInClearAllReferencesDeep = false;
/**
* Get the [id] column value.
*
@@ -166,22 +172,25 @@ abstract class BaseAccessory extends BaseObject implements Persistent
// while technically this is not a default value of null,
// this seems to be closest in meaning.
return null;
} else {
try {
$dt = new DateTime($this->created_at);
} catch (Exception $x) {
throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->created_at, true), $x);
}
}
try {
$dt = new DateTime($this->created_at);
} catch (Exception $x) {
throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->created_at, true), $x);
}
if ($format === null) {
// Because propel.useDateTimeClass is true, we return a DateTime object.
return $dt;
} elseif (strpos($format, '%') !== false) {
return strftime($format, $dt->format('U'));
} else {
return $dt->format($format);
}
if (strpos($format, '%') !== false) {
return strftime($format, $dt->format('U'));
}
return $dt->format($format);
}
/**
@@ -203,22 +212,25 @@ abstract class BaseAccessory extends BaseObject implements Persistent
// while technically this is not a default value of null,
// this seems to be closest in meaning.
return null;
} else {
try {
$dt = new DateTime($this->updated_at);
} catch (Exception $x) {
throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->updated_at, true), $x);
}
}
try {
$dt = new DateTime($this->updated_at);
} catch (Exception $x) {
throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->updated_at, true), $x);
}
if ($format === null) {
// Because propel.useDateTimeClass is true, we return a DateTime object.
return $dt;
} elseif (strpos($format, '%') !== false) {
return strftime($format, $dt->format('U'));
} else {
return $dt->format($format);
}
if (strpos($format, '%') !== false) {
return strftime($format, $dt->format('U'));
}
return $dt->format($format);
}
/**
@@ -229,7 +241,7 @@ abstract class BaseAccessory extends BaseObject implements Persistent
*/
public function setId($v)
{
if ($v !== null) {
if ($v !== null && is_numeric($v)) {
$v = (int) $v;
}
@@ -250,7 +262,7 @@ abstract class BaseAccessory extends BaseObject implements Persistent
*/
public function setProductId($v)
{
if ($v !== null) {
if ($v !== null && is_numeric($v)) {
$v = (int) $v;
}
@@ -275,7 +287,7 @@ abstract class BaseAccessory extends BaseObject implements Persistent
*/
public function setAccessory($v)
{
if ($v !== null) {
if ($v !== null && is_numeric($v)) {
$v = (int) $v;
}
@@ -300,7 +312,7 @@ abstract class BaseAccessory extends BaseObject implements Persistent
*/
public function setPosition($v)
{
if ($v !== null) {
if ($v !== null && is_numeric($v)) {
$v = (int) $v;
}
@@ -404,7 +416,7 @@ abstract class BaseAccessory extends BaseObject implements Persistent
if ($rehydrate) {
$this->ensureConsistency();
}
$this->postHydrate($row, $startcol, $rehydrate);
return $startcol + 6; // 6 = AccessoryPeer::NUM_HYDRATE_COLUMNS.
} catch (Exception $e) {
@@ -652,22 +664,22 @@ abstract class BaseAccessory extends BaseObject implements Persistent
// check the columns in natural order for more readable SQL queries
if ($this->isColumnModified(AccessoryPeer::ID)) {
$modifiedColumns[':p' . $index++] = '`ID`';
$modifiedColumns[':p' . $index++] = '`id`';
}
if ($this->isColumnModified(AccessoryPeer::PRODUCT_ID)) {
$modifiedColumns[':p' . $index++] = '`PRODUCT_ID`';
$modifiedColumns[':p' . $index++] = '`product_id`';
}
if ($this->isColumnModified(AccessoryPeer::ACCESSORY)) {
$modifiedColumns[':p' . $index++] = '`ACCESSORY`';
$modifiedColumns[':p' . $index++] = '`accessory`';
}
if ($this->isColumnModified(AccessoryPeer::POSITION)) {
$modifiedColumns[':p' . $index++] = '`POSITION`';
$modifiedColumns[':p' . $index++] = '`position`';
}
if ($this->isColumnModified(AccessoryPeer::CREATED_AT)) {
$modifiedColumns[':p' . $index++] = '`CREATED_AT`';
$modifiedColumns[':p' . $index++] = '`created_at`';
}
if ($this->isColumnModified(AccessoryPeer::UPDATED_AT)) {
$modifiedColumns[':p' . $index++] = '`UPDATED_AT`';
$modifiedColumns[':p' . $index++] = '`updated_at`';
}
$sql = sprintf(
@@ -680,22 +692,22 @@ abstract class BaseAccessory extends BaseObject implements Persistent
$stmt = $con->prepare($sql);
foreach ($modifiedColumns as $identifier => $columnName) {
switch ($columnName) {
case '`ID`':
case '`id`':
$stmt->bindValue($identifier, $this->id, PDO::PARAM_INT);
break;
case '`PRODUCT_ID`':
case '`product_id`':
$stmt->bindValue($identifier, $this->product_id, PDO::PARAM_INT);
break;
case '`ACCESSORY`':
case '`accessory`':
$stmt->bindValue($identifier, $this->accessory, PDO::PARAM_INT);
break;
case '`POSITION`':
case '`position`':
$stmt->bindValue($identifier, $this->position, PDO::PARAM_INT);
break;
case '`CREATED_AT`':
case '`created_at`':
$stmt->bindValue($identifier, $this->created_at, PDO::PARAM_STR);
break;
case '`UPDATED_AT`':
case '`updated_at`':
$stmt->bindValue($identifier, $this->updated_at, PDO::PARAM_STR);
break;
}
@@ -759,11 +771,11 @@ abstract class BaseAccessory extends BaseObject implements Persistent
$this->validationFailures = array();
return true;
} else {
$this->validationFailures = $res;
return false;
}
$this->validationFailures = $res;
return false;
}
/**
@@ -1161,12 +1173,13 @@ abstract class BaseAccessory extends BaseObject implements Persistent
* Get the associated Product object
*
* @param PropelPDO $con Optional Connection object.
* @param $doQuery Executes a query to get the object if required
* @return Product The associated Product object.
* @throws PropelException
*/
public function getProductRelatedByProductId(PropelPDO $con = null)
public function getProductRelatedByProductId(PropelPDO $con = null, $doQuery = true)
{
if ($this->aProductRelatedByProductId === null && ($this->product_id !== null)) {
if ($this->aProductRelatedByProductId === null && ($this->product_id !== null) && $doQuery) {
$this->aProductRelatedByProductId = ProductQuery::create()->findPk($this->product_id, $con);
/* The following can be used additionally to
guarantee the related object contains a reference
@@ -1212,12 +1225,13 @@ abstract class BaseAccessory extends BaseObject implements Persistent
* Get the associated Product object
*
* @param PropelPDO $con Optional Connection object.
* @param $doQuery Executes a query to get the object if required
* @return Product The associated Product object.
* @throws PropelException
*/
public function getProductRelatedByAccessory(PropelPDO $con = null)
public function getProductRelatedByAccessory(PropelPDO $con = null, $doQuery = true)
{
if ($this->aProductRelatedByAccessory === null && ($this->accessory !== null)) {
if ($this->aProductRelatedByAccessory === null && ($this->accessory !== null) && $doQuery) {
$this->aProductRelatedByAccessory = ProductQuery::create()->findPk($this->accessory, $con);
/* The following can be used additionally to
guarantee the related object contains a reference
@@ -1244,6 +1258,7 @@ abstract class BaseAccessory extends BaseObject implements Persistent
$this->updated_at = null;
$this->alreadyInSave = false;
$this->alreadyInValidation = false;
$this->alreadyInClearAllReferencesDeep = false;
$this->clearAllReferences();
$this->resetModified();
$this->setNew(true);
@@ -1261,7 +1276,16 @@ abstract class BaseAccessory extends BaseObject implements Persistent
*/
public function clearAllReferences($deep = false)
{
if ($deep) {
if ($deep && !$this->alreadyInClearAllReferencesDeep) {
$this->alreadyInClearAllReferencesDeep = true;
if ($this->aProductRelatedByProductId instanceof Persistent) {
$this->aProductRelatedByProductId->clearAllReferences($deep);
}
if ($this->aProductRelatedByAccessory instanceof Persistent) {
$this->aProductRelatedByAccessory->clearAllReferences($deep);
}
$this->alreadyInClearAllReferencesDeep = false;
} // if ($deep)
$this->aProductRelatedByProductId = null;

View File

@@ -45,23 +45,23 @@ abstract class BaseAccessoryPeer
/** The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS) */
const NUM_HYDRATE_COLUMNS = 6;
/** the column name for the ID field */
const ID = 'accessory.ID';
/** the column name for the id field */
const ID = 'accessory.id';
/** the column name for the PRODUCT_ID field */
const PRODUCT_ID = 'accessory.PRODUCT_ID';
/** the column name for the product_id field */
const PRODUCT_ID = 'accessory.product_id';
/** the column name for the ACCESSORY field */
const ACCESSORY = 'accessory.ACCESSORY';
/** the column name for the accessory field */
const ACCESSORY = 'accessory.accessory';
/** the column name for the POSITION field */
const POSITION = 'accessory.POSITION';
/** the column name for the position field */
const POSITION = 'accessory.position';
/** the column name for the CREATED_AT field */
const CREATED_AT = 'accessory.CREATED_AT';
/** the column name for the created_at field */
const CREATED_AT = 'accessory.created_at';
/** the column name for the UPDATED_AT field */
const UPDATED_AT = 'accessory.UPDATED_AT';
/** the column name for the updated_at field */
const UPDATED_AT = 'accessory.updated_at';
/** The default string format for model objects of the related table **/
const DEFAULT_STRING_FORMAT = 'YAML';
@@ -183,12 +183,12 @@ abstract class BaseAccessoryPeer
$criteria->addSelectColumn(AccessoryPeer::CREATED_AT);
$criteria->addSelectColumn(AccessoryPeer::UPDATED_AT);
} else {
$criteria->addSelectColumn($alias . '.ID');
$criteria->addSelectColumn($alias . '.PRODUCT_ID');
$criteria->addSelectColumn($alias . '.ACCESSORY');
$criteria->addSelectColumn($alias . '.POSITION');
$criteria->addSelectColumn($alias . '.CREATED_AT');
$criteria->addSelectColumn($alias . '.UPDATED_AT');
$criteria->addSelectColumn($alias . '.id');
$criteria->addSelectColumn($alias . '.product_id');
$criteria->addSelectColumn($alias . '.accessory');
$criteria->addSelectColumn($alias . '.position');
$criteria->addSelectColumn($alias . '.created_at');
$criteria->addSelectColumn($alias . '.updated_at');
}
}
@@ -272,7 +272,7 @@ abstract class BaseAccessoryPeer
/**
* Prepares the Criteria object and uses the parent doSelect() method to execute a PDOStatement.
*
* Use this method directly if you want to work with an executed statement durirectly (for example
* Use this method directly if you want to work with an executed statement directly (for example
* to perform your own object hydration).
*
* @param Criteria $criteria The Criteria object used to build the SELECT statement.
@@ -377,8 +377,15 @@ abstract class BaseAccessoryPeer
*
* @return void
*/
public static function clearInstancePool()
public static function clearInstancePool($and_clear_all_references = false)
{
if ($and_clear_all_references)
{
foreach (AccessoryPeer::$instances as $instance)
{
$instance->clearAllReferences(true);
}
}
AccessoryPeer::$instances = array();
}
@@ -1092,7 +1099,7 @@ abstract class BaseAccessoryPeer
*
* @return string ClassName
*/
public static function getOMClass()
public static function getOMClass($row = 0, $colnum = 0)
{
return AccessoryPeer::OM_CLASS;
}

View File

@@ -51,7 +51,6 @@ use Thelia\Model\Product;
* @method Accessory findOne(PropelPDO $con = null) Return the first Accessory matching the query
* @method Accessory findOneOrCreate(PropelPDO $con = null) Return the first Accessory matching the query, or a new Accessory object populated from the query conditions when no match is found
*
* @method Accessory findOneById(int $id) Return the first Accessory filtered by the id column
* @method Accessory findOneByProductId(int $product_id) Return the first Accessory filtered by the product_id column
* @method Accessory findOneByAccessory(int $accessory) Return the first Accessory filtered by the accessory column
* @method Accessory findOneByPosition(int $position) Return the first Accessory filtered by the position column
@@ -85,7 +84,7 @@ abstract class BaseAccessoryQuery extends ModelCriteria
* Returns a new AccessoryQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param AccessoryQuery|Criteria $criteria Optional Criteria to build the query from
* @param AccessoryQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return AccessoryQuery
*/
@@ -141,6 +140,20 @@ abstract class BaseAccessoryQuery extends ModelCriteria
}
}
/**
* Alias of findPk to use instance pooling
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return Accessory A model object, or null if the key is not found
* @throws PropelException
*/
public function findOneById($key, $con = null)
{
return $this->findPk($key, $con);
}
/**
* Find object by primary key using raw SQL to go fast.
* Bypass doSelect() and the object formatter by using generated code.
@@ -148,12 +161,12 @@ abstract class BaseAccessoryQuery extends ModelCriteria
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return Accessory A model object, or null if the key is not found
* @throws PropelException
* @return Accessory A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT `ID`, `PRODUCT_ID`, `ACCESSORY`, `POSITION`, `CREATED_AT`, `UPDATED_AT` FROM `accessory` WHERE `ID` = :p0';
$sql = 'SELECT `id`, `product_id`, `accessory`, `position`, `created_at`, `updated_at` FROM `accessory` WHERE `id` = :p0';
try {
$stmt = $con->prepare($sql);
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
@@ -249,7 +262,8 @@ abstract class BaseAccessoryQuery extends ModelCriteria
* <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
* $query->filterById(array('min' => 12)); // WHERE id >= 12
* $query->filterById(array('max' => 12)); // WHERE id <= 12
* </code>
*
* @param mixed $id The value to use as filter.
@@ -262,8 +276,22 @@ abstract class BaseAccessoryQuery extends ModelCriteria
*/
public function filterById($id = null, $comparison = null)
{
if (is_array($id) && null === $comparison) {
$comparison = Criteria::IN;
if (is_array($id)) {
$useMinMax = false;
if (isset($id['min'])) {
$this->addUsingAlias(AccessoryPeer::ID, $id['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($id['max'])) {
$this->addUsingAlias(AccessoryPeer::ID, $id['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(AccessoryPeer::ID, $id, $comparison);
@@ -276,7 +304,8 @@ abstract class BaseAccessoryQuery extends ModelCriteria
* <code>
* $query->filterByProductId(1234); // WHERE product_id = 1234
* $query->filterByProductId(array(12, 34)); // WHERE product_id IN (12, 34)
* $query->filterByProductId(array('min' => 12)); // WHERE product_id > 12
* $query->filterByProductId(array('min' => 12)); // WHERE product_id >= 12
* $query->filterByProductId(array('max' => 12)); // WHERE product_id <= 12
* </code>
*
* @see filterByProductRelatedByProductId()
@@ -319,7 +348,8 @@ abstract class BaseAccessoryQuery extends ModelCriteria
* <code>
* $query->filterByAccessory(1234); // WHERE accessory = 1234
* $query->filterByAccessory(array(12, 34)); // WHERE accessory IN (12, 34)
* $query->filterByAccessory(array('min' => 12)); // WHERE accessory > 12
* $query->filterByAccessory(array('min' => 12)); // WHERE accessory >= 12
* $query->filterByAccessory(array('max' => 12)); // WHERE accessory <= 12
* </code>
*
* @see filterByProductRelatedByAccessory()
@@ -362,7 +392,8 @@ abstract class BaseAccessoryQuery extends ModelCriteria
* <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
* $query->filterByPosition(array('min' => 12)); // WHERE position >= 12
* $query->filterByPosition(array('max' => 12)); // WHERE position <= 12
* </code>
*
* @param mixed $position The value to use as filter.
@@ -488,8 +519,8 @@ abstract class BaseAccessoryQuery extends ModelCriteria
* @param Product|PropelObjectCollection $product The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return AccessoryQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
* @return AccessoryQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByProductRelatedByProductId($product, $comparison = null)
{
@@ -564,8 +595,8 @@ abstract class BaseAccessoryQuery extends ModelCriteria
* @param Product|PropelObjectCollection $product The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return AccessoryQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
* @return AccessoryQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByProductRelatedByAccessory($product, $comparison = null)
{

View File

@@ -169,6 +169,12 @@ abstract class BaseAddress extends BaseObject implements Persistent
*/
protected $alreadyInValidation = false;
/**
* Flag to prevent endless clearAllReferences($deep=true) loop, if this object is referenced
* @var boolean
*/
protected $alreadyInClearAllReferencesDeep = false;
/**
* Get the [id] column value.
*
@@ -328,22 +334,25 @@ abstract class BaseAddress extends BaseObject implements Persistent
// while technically this is not a default value of null,
// this seems to be closest in meaning.
return null;
} else {
try {
$dt = new DateTime($this->created_at);
} catch (Exception $x) {
throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->created_at, true), $x);
}
}
try {
$dt = new DateTime($this->created_at);
} catch (Exception $x) {
throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->created_at, true), $x);
}
if ($format === null) {
// Because propel.useDateTimeClass is true, we return a DateTime object.
return $dt;
} elseif (strpos($format, '%') !== false) {
return strftime($format, $dt->format('U'));
} else {
return $dt->format($format);
}
if (strpos($format, '%') !== false) {
return strftime($format, $dt->format('U'));
}
return $dt->format($format);
}
/**
@@ -365,22 +374,25 @@ abstract class BaseAddress extends BaseObject implements Persistent
// while technically this is not a default value of null,
// this seems to be closest in meaning.
return null;
} else {
try {
$dt = new DateTime($this->updated_at);
} catch (Exception $x) {
throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->updated_at, true), $x);
}
}
try {
$dt = new DateTime($this->updated_at);
} catch (Exception $x) {
throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->updated_at, true), $x);
}
if ($format === null) {
// Because propel.useDateTimeClass is true, we return a DateTime object.
return $dt;
} elseif (strpos($format, '%') !== false) {
return strftime($format, $dt->format('U'));
} else {
return $dt->format($format);
}
if (strpos($format, '%') !== false) {
return strftime($format, $dt->format('U'));
}
return $dt->format($format);
}
/**
@@ -391,7 +403,7 @@ abstract class BaseAddress extends BaseObject implements Persistent
*/
public function setId($v)
{
if ($v !== null) {
if ($v !== null && is_numeric($v)) {
$v = (int) $v;
}
@@ -412,7 +424,7 @@ abstract class BaseAddress extends BaseObject implements Persistent
*/
public function setTitle($v)
{
if ($v !== null) {
if ($v !== null && is_numeric($v)) {
$v = (string) $v;
}
@@ -433,7 +445,7 @@ abstract class BaseAddress extends BaseObject implements Persistent
*/
public function setCustomerId($v)
{
if ($v !== null) {
if ($v !== null && is_numeric($v)) {
$v = (int) $v;
}
@@ -458,7 +470,7 @@ abstract class BaseAddress extends BaseObject implements Persistent
*/
public function setCustomerTitleId($v)
{
if ($v !== null) {
if ($v !== null && is_numeric($v)) {
$v = (int) $v;
}
@@ -483,7 +495,7 @@ abstract class BaseAddress extends BaseObject implements Persistent
*/
public function setCompany($v)
{
if ($v !== null) {
if ($v !== null && is_numeric($v)) {
$v = (string) $v;
}
@@ -504,7 +516,7 @@ abstract class BaseAddress extends BaseObject implements Persistent
*/
public function setFirstname($v)
{
if ($v !== null) {
if ($v !== null && is_numeric($v)) {
$v = (string) $v;
}
@@ -525,7 +537,7 @@ abstract class BaseAddress extends BaseObject implements Persistent
*/
public function setLastname($v)
{
if ($v !== null) {
if ($v !== null && is_numeric($v)) {
$v = (string) $v;
}
@@ -546,7 +558,7 @@ abstract class BaseAddress extends BaseObject implements Persistent
*/
public function setAddress1($v)
{
if ($v !== null) {
if ($v !== null && is_numeric($v)) {
$v = (string) $v;
}
@@ -567,7 +579,7 @@ abstract class BaseAddress extends BaseObject implements Persistent
*/
public function setAddress2($v)
{
if ($v !== null) {
if ($v !== null && is_numeric($v)) {
$v = (string) $v;
}
@@ -588,7 +600,7 @@ abstract class BaseAddress extends BaseObject implements Persistent
*/
public function setAddress3($v)
{
if ($v !== null) {
if ($v !== null && is_numeric($v)) {
$v = (string) $v;
}
@@ -609,7 +621,7 @@ abstract class BaseAddress extends BaseObject implements Persistent
*/
public function setZipcode($v)
{
if ($v !== null) {
if ($v !== null && is_numeric($v)) {
$v = (string) $v;
}
@@ -630,7 +642,7 @@ abstract class BaseAddress extends BaseObject implements Persistent
*/
public function setCity($v)
{
if ($v !== null) {
if ($v !== null && is_numeric($v)) {
$v = (string) $v;
}
@@ -651,7 +663,7 @@ abstract class BaseAddress extends BaseObject implements Persistent
*/
public function setCountryId($v)
{
if ($v !== null) {
if ($v !== null && is_numeric($v)) {
$v = (int) $v;
}
@@ -672,7 +684,7 @@ abstract class BaseAddress extends BaseObject implements Persistent
*/
public function setPhone($v)
{
if ($v !== null) {
if ($v !== null && is_numeric($v)) {
$v = (string) $v;
}
@@ -786,7 +798,7 @@ abstract class BaseAddress extends BaseObject implements Persistent
if ($rehydrate) {
$this->ensureConsistency();
}
$this->postHydrate($row, $startcol, $rehydrate);
return $startcol + 16; // 16 = AddressPeer::NUM_HYDRATE_COLUMNS.
} catch (Exception $e) {
@@ -1038,52 +1050,52 @@ abstract class BaseAddress extends BaseObject implements Persistent
// check the columns in natural order for more readable SQL queries
if ($this->isColumnModified(AddressPeer::ID)) {
$modifiedColumns[':p' . $index++] = '`ID`';
$modifiedColumns[':p' . $index++] = '`id`';
}
if ($this->isColumnModified(AddressPeer::TITLE)) {
$modifiedColumns[':p' . $index++] = '`TITLE`';
$modifiedColumns[':p' . $index++] = '`title`';
}
if ($this->isColumnModified(AddressPeer::CUSTOMER_ID)) {
$modifiedColumns[':p' . $index++] = '`CUSTOMER_ID`';
$modifiedColumns[':p' . $index++] = '`customer_id`';
}
if ($this->isColumnModified(AddressPeer::CUSTOMER_TITLE_ID)) {
$modifiedColumns[':p' . $index++] = '`CUSTOMER_TITLE_ID`';
$modifiedColumns[':p' . $index++] = '`customer_title_id`';
}
if ($this->isColumnModified(AddressPeer::COMPANY)) {
$modifiedColumns[':p' . $index++] = '`COMPANY`';
$modifiedColumns[':p' . $index++] = '`company`';
}
if ($this->isColumnModified(AddressPeer::FIRSTNAME)) {
$modifiedColumns[':p' . $index++] = '`FIRSTNAME`';
$modifiedColumns[':p' . $index++] = '`firstname`';
}
if ($this->isColumnModified(AddressPeer::LASTNAME)) {
$modifiedColumns[':p' . $index++] = '`LASTNAME`';
$modifiedColumns[':p' . $index++] = '`lastname`';
}
if ($this->isColumnModified(AddressPeer::ADDRESS1)) {
$modifiedColumns[':p' . $index++] = '`ADDRESS1`';
$modifiedColumns[':p' . $index++] = '`address1`';
}
if ($this->isColumnModified(AddressPeer::ADDRESS2)) {
$modifiedColumns[':p' . $index++] = '`ADDRESS2`';
$modifiedColumns[':p' . $index++] = '`address2`';
}
if ($this->isColumnModified(AddressPeer::ADDRESS3)) {
$modifiedColumns[':p' . $index++] = '`ADDRESS3`';
$modifiedColumns[':p' . $index++] = '`address3`';
}
if ($this->isColumnModified(AddressPeer::ZIPCODE)) {
$modifiedColumns[':p' . $index++] = '`ZIPCODE`';
$modifiedColumns[':p' . $index++] = '`zipcode`';
}
if ($this->isColumnModified(AddressPeer::CITY)) {
$modifiedColumns[':p' . $index++] = '`CITY`';
$modifiedColumns[':p' . $index++] = '`city`';
}
if ($this->isColumnModified(AddressPeer::COUNTRY_ID)) {
$modifiedColumns[':p' . $index++] = '`COUNTRY_ID`';
$modifiedColumns[':p' . $index++] = '`country_id`';
}
if ($this->isColumnModified(AddressPeer::PHONE)) {
$modifiedColumns[':p' . $index++] = '`PHONE`';
$modifiedColumns[':p' . $index++] = '`phone`';
}
if ($this->isColumnModified(AddressPeer::CREATED_AT)) {
$modifiedColumns[':p' . $index++] = '`CREATED_AT`';
$modifiedColumns[':p' . $index++] = '`created_at`';
}
if ($this->isColumnModified(AddressPeer::UPDATED_AT)) {
$modifiedColumns[':p' . $index++] = '`UPDATED_AT`';
$modifiedColumns[':p' . $index++] = '`updated_at`';
}
$sql = sprintf(
@@ -1096,52 +1108,52 @@ abstract class BaseAddress extends BaseObject implements Persistent
$stmt = $con->prepare($sql);
foreach ($modifiedColumns as $identifier => $columnName) {
switch ($columnName) {
case '`ID`':
case '`id`':
$stmt->bindValue($identifier, $this->id, PDO::PARAM_INT);
break;
case '`TITLE`':
case '`title`':
$stmt->bindValue($identifier, $this->title, PDO::PARAM_STR);
break;
case '`CUSTOMER_ID`':
case '`customer_id`':
$stmt->bindValue($identifier, $this->customer_id, PDO::PARAM_INT);
break;
case '`CUSTOMER_TITLE_ID`':
case '`customer_title_id`':
$stmt->bindValue($identifier, $this->customer_title_id, PDO::PARAM_INT);
break;
case '`COMPANY`':
case '`company`':
$stmt->bindValue($identifier, $this->company, PDO::PARAM_STR);
break;
case '`FIRSTNAME`':
case '`firstname`':
$stmt->bindValue($identifier, $this->firstname, PDO::PARAM_STR);
break;
case '`LASTNAME`':
case '`lastname`':
$stmt->bindValue($identifier, $this->lastname, PDO::PARAM_STR);
break;
case '`ADDRESS1`':
case '`address1`':
$stmt->bindValue($identifier, $this->address1, PDO::PARAM_STR);
break;
case '`ADDRESS2`':
case '`address2`':
$stmt->bindValue($identifier, $this->address2, PDO::PARAM_STR);
break;
case '`ADDRESS3`':
case '`address3`':
$stmt->bindValue($identifier, $this->address3, PDO::PARAM_STR);
break;
case '`ZIPCODE`':
case '`zipcode`':
$stmt->bindValue($identifier, $this->zipcode, PDO::PARAM_STR);
break;
case '`CITY`':
case '`city`':
$stmt->bindValue($identifier, $this->city, PDO::PARAM_STR);
break;
case '`COUNTRY_ID`':
case '`country_id`':
$stmt->bindValue($identifier, $this->country_id, PDO::PARAM_INT);
break;
case '`PHONE`':
case '`phone`':
$stmt->bindValue($identifier, $this->phone, PDO::PARAM_STR);
break;
case '`CREATED_AT`':
case '`created_at`':
$stmt->bindValue($identifier, $this->created_at, PDO::PARAM_STR);
break;
case '`UPDATED_AT`':
case '`updated_at`':
$stmt->bindValue($identifier, $this->updated_at, PDO::PARAM_STR);
break;
}
@@ -1212,11 +1224,11 @@ abstract class BaseAddress extends BaseObject implements Persistent
$this->validationFailures = array();
return true;
} else {
$this->validationFailures = $res;
return false;
}
$this->validationFailures = $res;
return false;
}
/**
@@ -1714,12 +1726,13 @@ abstract class BaseAddress extends BaseObject implements Persistent
* Get the associated Customer object
*
* @param PropelPDO $con Optional Connection object.
* @param $doQuery Executes a query to get the object if required
* @return Customer The associated Customer object.
* @throws PropelException
*/
public function getCustomer(PropelPDO $con = null)
public function getCustomer(PropelPDO $con = null, $doQuery = true)
{
if ($this->aCustomer === null && ($this->customer_id !== null)) {
if ($this->aCustomer === null && ($this->customer_id !== null) && $doQuery) {
$this->aCustomer = CustomerQuery::create()->findPk($this->customer_id, $con);
/* The following can be used additionally to
guarantee the related object contains a reference
@@ -1765,12 +1778,13 @@ abstract class BaseAddress extends BaseObject implements Persistent
* Get the associated CustomerTitle object
*
* @param PropelPDO $con Optional Connection object.
* @param $doQuery Executes a query to get the object if required
* @return CustomerTitle The associated CustomerTitle object.
* @throws PropelException
*/
public function getCustomerTitle(PropelPDO $con = null)
public function getCustomerTitle(PropelPDO $con = null, $doQuery = true)
{
if ($this->aCustomerTitle === null && ($this->customer_title_id !== null)) {
if ($this->aCustomerTitle === null && ($this->customer_title_id !== null) && $doQuery) {
$this->aCustomerTitle = CustomerTitleQuery::create()->findPk($this->customer_title_id, $con);
/* The following can be used additionally to
guarantee the related object contains a reference
@@ -1807,6 +1821,7 @@ abstract class BaseAddress extends BaseObject implements Persistent
$this->updated_at = null;
$this->alreadyInSave = false;
$this->alreadyInValidation = false;
$this->alreadyInClearAllReferencesDeep = false;
$this->clearAllReferences();
$this->resetModified();
$this->setNew(true);
@@ -1824,7 +1839,16 @@ abstract class BaseAddress extends BaseObject implements Persistent
*/
public function clearAllReferences($deep = false)
{
if ($deep) {
if ($deep && !$this->alreadyInClearAllReferencesDeep) {
$this->alreadyInClearAllReferencesDeep = true;
if ($this->aCustomer instanceof Persistent) {
$this->aCustomer->clearAllReferences($deep);
}
if ($this->aCustomerTitle instanceof Persistent) {
$this->aCustomerTitle->clearAllReferences($deep);
}
$this->alreadyInClearAllReferencesDeep = false;
} // if ($deep)
$this->aCustomer = null;

View File

@@ -46,53 +46,53 @@ abstract class BaseAddressPeer
/** The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS) */
const NUM_HYDRATE_COLUMNS = 16;
/** the column name for the ID field */
const ID = 'address.ID';
/** the column name for the id field */
const ID = 'address.id';
/** the column name for the TITLE field */
const TITLE = 'address.TITLE';
/** the column name for the title field */
const TITLE = 'address.title';
/** the column name for the CUSTOMER_ID field */
const CUSTOMER_ID = 'address.CUSTOMER_ID';
/** the column name for the customer_id field */
const CUSTOMER_ID = 'address.customer_id';
/** the column name for the CUSTOMER_TITLE_ID field */
const CUSTOMER_TITLE_ID = 'address.CUSTOMER_TITLE_ID';
/** the column name for the customer_title_id field */
const CUSTOMER_TITLE_ID = 'address.customer_title_id';
/** the column name for the COMPANY field */
const COMPANY = 'address.COMPANY';
/** the column name for the company field */
const COMPANY = 'address.company';
/** the column name for the FIRSTNAME field */
const FIRSTNAME = 'address.FIRSTNAME';
/** the column name for the firstname field */
const FIRSTNAME = 'address.firstname';
/** the column name for the LASTNAME field */
const LASTNAME = 'address.LASTNAME';
/** the column name for the lastname field */
const LASTNAME = 'address.lastname';
/** the column name for the ADDRESS1 field */
const ADDRESS1 = 'address.ADDRESS1';
/** the column name for the address1 field */
const ADDRESS1 = 'address.address1';
/** the column name for the ADDRESS2 field */
const ADDRESS2 = 'address.ADDRESS2';
/** the column name for the address2 field */
const ADDRESS2 = 'address.address2';
/** the column name for the ADDRESS3 field */
const ADDRESS3 = 'address.ADDRESS3';
/** the column name for the address3 field */
const ADDRESS3 = 'address.address3';
/** the column name for the ZIPCODE field */
const ZIPCODE = 'address.ZIPCODE';
/** the column name for the zipcode field */
const ZIPCODE = 'address.zipcode';
/** the column name for the CITY field */
const CITY = 'address.CITY';
/** the column name for the city field */
const CITY = 'address.city';
/** the column name for the COUNTRY_ID field */
const COUNTRY_ID = 'address.COUNTRY_ID';
/** the column name for the country_id field */
const COUNTRY_ID = 'address.country_id';
/** the column name for the PHONE field */
const PHONE = 'address.PHONE';
/** the column name for the phone field */
const PHONE = 'address.phone';
/** the column name for the CREATED_AT field */
const CREATED_AT = 'address.CREATED_AT';
/** the column name for the created_at field */
const CREATED_AT = 'address.created_at';
/** the column name for the UPDATED_AT field */
const UPDATED_AT = 'address.UPDATED_AT';
/** the column name for the updated_at field */
const UPDATED_AT = 'address.updated_at';
/** The default string format for model objects of the related table **/
const DEFAULT_STRING_FORMAT = 'YAML';
@@ -224,22 +224,22 @@ abstract class BaseAddressPeer
$criteria->addSelectColumn(AddressPeer::CREATED_AT);
$criteria->addSelectColumn(AddressPeer::UPDATED_AT);
} else {
$criteria->addSelectColumn($alias . '.ID');
$criteria->addSelectColumn($alias . '.TITLE');
$criteria->addSelectColumn($alias . '.CUSTOMER_ID');
$criteria->addSelectColumn($alias . '.CUSTOMER_TITLE_ID');
$criteria->addSelectColumn($alias . '.COMPANY');
$criteria->addSelectColumn($alias . '.FIRSTNAME');
$criteria->addSelectColumn($alias . '.LASTNAME');
$criteria->addSelectColumn($alias . '.ADDRESS1');
$criteria->addSelectColumn($alias . '.ADDRESS2');
$criteria->addSelectColumn($alias . '.ADDRESS3');
$criteria->addSelectColumn($alias . '.ZIPCODE');
$criteria->addSelectColumn($alias . '.CITY');
$criteria->addSelectColumn($alias . '.COUNTRY_ID');
$criteria->addSelectColumn($alias . '.PHONE');
$criteria->addSelectColumn($alias . '.CREATED_AT');
$criteria->addSelectColumn($alias . '.UPDATED_AT');
$criteria->addSelectColumn($alias . '.id');
$criteria->addSelectColumn($alias . '.title');
$criteria->addSelectColumn($alias . '.customer_id');
$criteria->addSelectColumn($alias . '.customer_title_id');
$criteria->addSelectColumn($alias . '.company');
$criteria->addSelectColumn($alias . '.firstname');
$criteria->addSelectColumn($alias . '.lastname');
$criteria->addSelectColumn($alias . '.address1');
$criteria->addSelectColumn($alias . '.address2');
$criteria->addSelectColumn($alias . '.address3');
$criteria->addSelectColumn($alias . '.zipcode');
$criteria->addSelectColumn($alias . '.city');
$criteria->addSelectColumn($alias . '.country_id');
$criteria->addSelectColumn($alias . '.phone');
$criteria->addSelectColumn($alias . '.created_at');
$criteria->addSelectColumn($alias . '.updated_at');
}
}
@@ -323,7 +323,7 @@ abstract class BaseAddressPeer
/**
* Prepares the Criteria object and uses the parent doSelect() method to execute a PDOStatement.
*
* Use this method directly if you want to work with an executed statement durirectly (for example
* Use this method directly if you want to work with an executed statement directly (for example
* to perform your own object hydration).
*
* @param Criteria $criteria The Criteria object used to build the SELECT statement.
@@ -428,8 +428,15 @@ abstract class BaseAddressPeer
*
* @return void
*/
public static function clearInstancePool()
public static function clearInstancePool($and_clear_all_references = false)
{
if ($and_clear_all_references)
{
foreach (AddressPeer::$instances as $instance)
{
$instance->clearAllReferences(true);
}
}
AddressPeer::$instances = array();
}
@@ -1195,7 +1202,7 @@ abstract class BaseAddressPeer
*
* @return string ClassName
*/
public static function getOMClass()
public static function getOMClass($row = 0, $colnum = 0)
{
return AddressPeer::OM_CLASS;
}

View File

@@ -72,7 +72,6 @@ use Thelia\Model\CustomerTitle;
* @method Address findOne(PropelPDO $con = null) Return the first Address matching the query
* @method Address findOneOrCreate(PropelPDO $con = null) Return the first Address matching the query, or a new Address object populated from the query conditions when no match is found
*
* @method Address findOneById(int $id) Return the first Address filtered by the id column
* @method Address findOneByTitle(string $title) Return the first Address filtered by the title column
* @method Address findOneByCustomerId(int $customer_id) Return the first Address filtered by the customer_id column
* @method Address findOneByCustomerTitleId(int $customer_title_id) Return the first Address filtered by the customer_title_id column
@@ -126,7 +125,7 @@ abstract class BaseAddressQuery extends ModelCriteria
* Returns a new AddressQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param AddressQuery|Criteria $criteria Optional Criteria to build the query from
* @param AddressQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return AddressQuery
*/
@@ -182,6 +181,20 @@ abstract class BaseAddressQuery extends ModelCriteria
}
}
/**
* Alias of findPk to use instance pooling
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return Address A model object, or null if the key is not found
* @throws PropelException
*/
public function findOneById($key, $con = null)
{
return $this->findPk($key, $con);
}
/**
* Find object by primary key using raw SQL to go fast.
* Bypass doSelect() and the object formatter by using generated code.
@@ -189,12 +202,12 @@ abstract class BaseAddressQuery extends ModelCriteria
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return Address A model object, or null if the key is not found
* @throws PropelException
* @return Address A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT `ID`, `TITLE`, `CUSTOMER_ID`, `CUSTOMER_TITLE_ID`, `COMPANY`, `FIRSTNAME`, `LASTNAME`, `ADDRESS1`, `ADDRESS2`, `ADDRESS3`, `ZIPCODE`, `CITY`, `COUNTRY_ID`, `PHONE`, `CREATED_AT`, `UPDATED_AT` FROM `address` WHERE `ID` = :p0';
$sql = 'SELECT `id`, `title`, `customer_id`, `customer_title_id`, `company`, `firstname`, `lastname`, `address1`, `address2`, `address3`, `zipcode`, `city`, `country_id`, `phone`, `created_at`, `updated_at` FROM `address` WHERE `id` = :p0';
try {
$stmt = $con->prepare($sql);
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
@@ -290,7 +303,8 @@ abstract class BaseAddressQuery extends ModelCriteria
* <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
* $query->filterById(array('min' => 12)); // WHERE id >= 12
* $query->filterById(array('max' => 12)); // WHERE id <= 12
* </code>
*
* @param mixed $id The value to use as filter.
@@ -303,8 +317,22 @@ abstract class BaseAddressQuery extends ModelCriteria
*/
public function filterById($id = null, $comparison = null)
{
if (is_array($id) && null === $comparison) {
$comparison = Criteria::IN;
if (is_array($id)) {
$useMinMax = false;
if (isset($id['min'])) {
$this->addUsingAlias(AddressPeer::ID, $id['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($id['max'])) {
$this->addUsingAlias(AddressPeer::ID, $id['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(AddressPeer::ID, $id, $comparison);
@@ -346,7 +374,8 @@ abstract class BaseAddressQuery extends ModelCriteria
* <code>
* $query->filterByCustomerId(1234); // WHERE customer_id = 1234
* $query->filterByCustomerId(array(12, 34)); // WHERE customer_id IN (12, 34)
* $query->filterByCustomerId(array('min' => 12)); // WHERE customer_id > 12
* $query->filterByCustomerId(array('min' => 12)); // WHERE customer_id >= 12
* $query->filterByCustomerId(array('max' => 12)); // WHERE customer_id <= 12
* </code>
*
* @see filterByCustomer()
@@ -389,7 +418,8 @@ abstract class BaseAddressQuery extends ModelCriteria
* <code>
* $query->filterByCustomerTitleId(1234); // WHERE customer_title_id = 1234
* $query->filterByCustomerTitleId(array(12, 34)); // WHERE customer_title_id IN (12, 34)
* $query->filterByCustomerTitleId(array('min' => 12)); // WHERE customer_title_id > 12
* $query->filterByCustomerTitleId(array('min' => 12)); // WHERE customer_title_id >= 12
* $query->filterByCustomerTitleId(array('max' => 12)); // WHERE customer_title_id <= 12
* </code>
*
* @see filterByCustomerTitle()
@@ -664,7 +694,8 @@ abstract class BaseAddressQuery extends ModelCriteria
* <code>
* $query->filterByCountryId(1234); // WHERE country_id = 1234
* $query->filterByCountryId(array(12, 34)); // WHERE country_id IN (12, 34)
* $query->filterByCountryId(array('min' => 12)); // WHERE country_id > 12
* $query->filterByCountryId(array('min' => 12)); // WHERE country_id >= 12
* $query->filterByCountryId(array('max' => 12)); // WHERE country_id <= 12
* </code>
*
* @param mixed $countryId The value to use as filter.
@@ -819,8 +850,8 @@ abstract class BaseAddressQuery extends ModelCriteria
* @param Customer|PropelObjectCollection $customer The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return AddressQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
* @return AddressQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByCustomer($customer, $comparison = null)
{
@@ -895,8 +926,8 @@ abstract class BaseAddressQuery extends ModelCriteria
* @param CustomerTitle|PropelObjectCollection $customerTitle The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return AddressQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
* @return AddressQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByCustomerTitle($customerTitle, $comparison = null)
{

View File

@@ -123,6 +123,12 @@ abstract class BaseAdmin extends BaseObject implements Persistent
*/
protected $alreadyInValidation = false;
/**
* Flag to prevent endless clearAllReferences($deep=true) loop, if this object is referenced
* @var boolean
*/
protected $alreadyInClearAllReferencesDeep = false;
/**
* An array of objects scheduled for deletion.
* @var PropelObjectCollection
@@ -218,22 +224,25 @@ abstract class BaseAdmin extends BaseObject implements Persistent
// while technically this is not a default value of null,
// this seems to be closest in meaning.
return null;
} else {
try {
$dt = new DateTime($this->created_at);
} catch (Exception $x) {
throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->created_at, true), $x);
}
}
try {
$dt = new DateTime($this->created_at);
} catch (Exception $x) {
throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->created_at, true), $x);
}
if ($format === null) {
// Because propel.useDateTimeClass is true, we return a DateTime object.
return $dt;
} elseif (strpos($format, '%') !== false) {
return strftime($format, $dt->format('U'));
} else {
return $dt->format($format);
}
if (strpos($format, '%') !== false) {
return strftime($format, $dt->format('U'));
}
return $dt->format($format);
}
/**
@@ -255,22 +264,25 @@ abstract class BaseAdmin extends BaseObject implements Persistent
// while technically this is not a default value of null,
// this seems to be closest in meaning.
return null;
} else {
try {
$dt = new DateTime($this->updated_at);
} catch (Exception $x) {
throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->updated_at, true), $x);
}
}
try {
$dt = new DateTime($this->updated_at);
} catch (Exception $x) {
throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->updated_at, true), $x);
}
if ($format === null) {
// Because propel.useDateTimeClass is true, we return a DateTime object.
return $dt;
} elseif (strpos($format, '%') !== false) {
return strftime($format, $dt->format('U'));
} else {
return $dt->format($format);
}
if (strpos($format, '%') !== false) {
return strftime($format, $dt->format('U'));
}
return $dt->format($format);
}
/**
@@ -281,7 +293,7 @@ abstract class BaseAdmin extends BaseObject implements Persistent
*/
public function setId($v)
{
if ($v !== null) {
if ($v !== null && is_numeric($v)) {
$v = (int) $v;
}
@@ -302,7 +314,7 @@ abstract class BaseAdmin extends BaseObject implements Persistent
*/
public function setFirstname($v)
{
if ($v !== null) {
if ($v !== null && is_numeric($v)) {
$v = (string) $v;
}
@@ -323,7 +335,7 @@ abstract class BaseAdmin extends BaseObject implements Persistent
*/
public function setLastname($v)
{
if ($v !== null) {
if ($v !== null && is_numeric($v)) {
$v = (string) $v;
}
@@ -344,7 +356,7 @@ abstract class BaseAdmin extends BaseObject implements Persistent
*/
public function setLogin($v)
{
if ($v !== null) {
if ($v !== null && is_numeric($v)) {
$v = (string) $v;
}
@@ -365,7 +377,7 @@ abstract class BaseAdmin extends BaseObject implements Persistent
*/
public function setPassword($v)
{
if ($v !== null) {
if ($v !== null && is_numeric($v)) {
$v = (string) $v;
}
@@ -386,7 +398,7 @@ abstract class BaseAdmin extends BaseObject implements Persistent
*/
public function setAlgo($v)
{
if ($v !== null) {
if ($v !== null && is_numeric($v)) {
$v = (string) $v;
}
@@ -407,7 +419,7 @@ abstract class BaseAdmin extends BaseObject implements Persistent
*/
public function setSalt($v)
{
if ($v !== null) {
if ($v !== null && is_numeric($v)) {
$v = (string) $v;
}
@@ -514,7 +526,7 @@ abstract class BaseAdmin extends BaseObject implements Persistent
if ($rehydrate) {
$this->ensureConsistency();
}
$this->postHydrate($row, $startcol, $rehydrate);
return $startcol + 9; // 9 = AdminPeer::NUM_HYDRATE_COLUMNS.
} catch (Exception $e) {
@@ -726,7 +738,7 @@ abstract class BaseAdmin extends BaseObject implements Persistent
if ($this->collAdminGroups !== null) {
foreach ($this->collAdminGroups as $referrerFK) {
if (!$referrerFK->isDeleted()) {
if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) {
$affectedRows += $referrerFK->save($con);
}
}
@@ -759,31 +771,31 @@ abstract class BaseAdmin extends BaseObject implements Persistent
// check the columns in natural order for more readable SQL queries
if ($this->isColumnModified(AdminPeer::ID)) {
$modifiedColumns[':p' . $index++] = '`ID`';
$modifiedColumns[':p' . $index++] = '`id`';
}
if ($this->isColumnModified(AdminPeer::FIRSTNAME)) {
$modifiedColumns[':p' . $index++] = '`FIRSTNAME`';
$modifiedColumns[':p' . $index++] = '`firstname`';
}
if ($this->isColumnModified(AdminPeer::LASTNAME)) {
$modifiedColumns[':p' . $index++] = '`LASTNAME`';
$modifiedColumns[':p' . $index++] = '`lastname`';
}
if ($this->isColumnModified(AdminPeer::LOGIN)) {
$modifiedColumns[':p' . $index++] = '`LOGIN`';
$modifiedColumns[':p' . $index++] = '`login`';
}
if ($this->isColumnModified(AdminPeer::PASSWORD)) {
$modifiedColumns[':p' . $index++] = '`PASSWORD`';
$modifiedColumns[':p' . $index++] = '`password`';
}
if ($this->isColumnModified(AdminPeer::ALGO)) {
$modifiedColumns[':p' . $index++] = '`ALGO`';
$modifiedColumns[':p' . $index++] = '`algo`';
}
if ($this->isColumnModified(AdminPeer::SALT)) {
$modifiedColumns[':p' . $index++] = '`SALT`';
$modifiedColumns[':p' . $index++] = '`salt`';
}
if ($this->isColumnModified(AdminPeer::CREATED_AT)) {
$modifiedColumns[':p' . $index++] = '`CREATED_AT`';
$modifiedColumns[':p' . $index++] = '`created_at`';
}
if ($this->isColumnModified(AdminPeer::UPDATED_AT)) {
$modifiedColumns[':p' . $index++] = '`UPDATED_AT`';
$modifiedColumns[':p' . $index++] = '`updated_at`';
}
$sql = sprintf(
@@ -796,31 +808,31 @@ abstract class BaseAdmin extends BaseObject implements Persistent
$stmt = $con->prepare($sql);
foreach ($modifiedColumns as $identifier => $columnName) {
switch ($columnName) {
case '`ID`':
case '`id`':
$stmt->bindValue($identifier, $this->id, PDO::PARAM_INT);
break;
case '`FIRSTNAME`':
case '`firstname`':
$stmt->bindValue($identifier, $this->firstname, PDO::PARAM_STR);
break;
case '`LASTNAME`':
case '`lastname`':
$stmt->bindValue($identifier, $this->lastname, PDO::PARAM_STR);
break;
case '`LOGIN`':
case '`login`':
$stmt->bindValue($identifier, $this->login, PDO::PARAM_STR);
break;
case '`PASSWORD`':
case '`password`':
$stmt->bindValue($identifier, $this->password, PDO::PARAM_STR);
break;
case '`ALGO`':
case '`algo`':
$stmt->bindValue($identifier, $this->algo, PDO::PARAM_STR);
break;
case '`SALT`':
case '`salt`':
$stmt->bindValue($identifier, $this->salt, PDO::PARAM_STR);
break;
case '`CREATED_AT`':
case '`created_at`':
$stmt->bindValue($identifier, $this->created_at, PDO::PARAM_STR);
break;
case '`UPDATED_AT`':
case '`updated_at`':
$stmt->bindValue($identifier, $this->updated_at, PDO::PARAM_STR);
break;
}
@@ -891,11 +903,11 @@ abstract class BaseAdmin extends BaseObject implements Persistent
$this->validationFailures = array();
return true;
} else {
$this->validationFailures = $res;
return false;
}
$this->validationFailures = $res;
return false;
}
/**
@@ -1306,13 +1318,15 @@ abstract class BaseAdmin extends BaseObject implements Persistent
* This does not modify the database; however, it will remove any associated objects, causing
* them to be refetched by subsequent calls to accessor method.
*
* @return void
* @return Admin The current object (for fluent API support)
* @see addAdminGroups()
*/
public function clearAdminGroups()
{
$this->collAdminGroups = null; // important to set this to null since that means it is uninitialized
$this->collAdminGroupsPartial = null;
return $this;
}
/**
@@ -1384,6 +1398,7 @@ abstract class BaseAdmin extends BaseObject implements Persistent
$this->collAdminGroupsPartial = true;
}
$collAdminGroups->getInternalIterator()->rewind();
return $collAdminGroups;
}
@@ -1411,12 +1426,15 @@ abstract class BaseAdmin extends BaseObject implements Persistent
*
* @param PropelCollection $adminGroups A Propel collection.
* @param PropelPDO $con Optional connection object
* @return Admin The current object (for fluent API support)
*/
public function setAdminGroups(PropelCollection $adminGroups, PropelPDO $con = null)
{
$this->adminGroupsScheduledForDeletion = $this->getAdminGroups(new Criteria(), $con)->diff($adminGroups);
$adminGroupsToDelete = $this->getAdminGroups(new Criteria(), $con)->diff($adminGroups);
foreach ($this->adminGroupsScheduledForDeletion as $adminGroupRemoved) {
$this->adminGroupsScheduledForDeletion = unserialize(serialize($adminGroupsToDelete));
foreach ($adminGroupsToDelete as $adminGroupRemoved) {
$adminGroupRemoved->setAdmin(null);
}
@@ -1427,6 +1445,8 @@ abstract class BaseAdmin extends BaseObject implements Persistent
$this->collAdminGroups = $adminGroups;
$this->collAdminGroupsPartial = false;
return $this;
}
/**
@@ -1444,22 +1464,22 @@ abstract class BaseAdmin extends BaseObject implements Persistent
if (null === $this->collAdminGroups || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collAdminGroups) {
return 0;
} else {
if($partial && !$criteria) {
return count($this->getAdminGroups());
}
$query = AdminGroupQuery::create(null, $criteria);
if ($distinct) {
$query->distinct();
}
return $query
->filterByAdmin($this)
->count($con);
}
} else {
return count($this->collAdminGroups);
if($partial && !$criteria) {
return count($this->getAdminGroups());
}
$query = AdminGroupQuery::create(null, $criteria);
if ($distinct) {
$query->distinct();
}
return $query
->filterByAdmin($this)
->count($con);
}
return count($this->collAdminGroups);
}
/**
@@ -1475,7 +1495,7 @@ abstract class BaseAdmin extends BaseObject implements Persistent
$this->initAdminGroups();
$this->collAdminGroupsPartial = true;
}
if (!$this->collAdminGroups->contains($l)) { // only add it if the **same** object is not already associated
if (!in_array($l, $this->collAdminGroups->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
$this->doAddAdminGroup($l);
}
@@ -1493,6 +1513,7 @@ abstract class BaseAdmin extends BaseObject implements Persistent
/**
* @param AdminGroup $adminGroup The adminGroup object to remove.
* @return Admin The current object (for fluent API support)
*/
public function removeAdminGroup($adminGroup)
{
@@ -1505,6 +1526,8 @@ abstract class BaseAdmin extends BaseObject implements Persistent
$this->adminGroupsScheduledForDeletion[]= $adminGroup;
$adminGroup->setAdmin(null);
}
return $this;
}
@@ -1548,6 +1571,7 @@ abstract class BaseAdmin extends BaseObject implements Persistent
$this->updated_at = null;
$this->alreadyInSave = false;
$this->alreadyInValidation = false;
$this->alreadyInClearAllReferencesDeep = false;
$this->clearAllReferences();
$this->resetModified();
$this->setNew(true);
@@ -1565,12 +1589,15 @@ abstract class BaseAdmin extends BaseObject implements Persistent
*/
public function clearAllReferences($deep = false)
{
if ($deep) {
if ($deep && !$this->alreadyInClearAllReferencesDeep) {
$this->alreadyInClearAllReferencesDeep = true;
if ($this->collAdminGroups) {
foreach ($this->collAdminGroups as $o) {
$o->clearAllReferences($deep);
}
}
$this->alreadyInClearAllReferencesDeep = false;
} // if ($deep)
if ($this->collAdminGroups instanceof PropelCollection) {

View File

@@ -103,6 +103,12 @@ abstract class BaseAdminGroup extends BaseObject implements Persistent
*/
protected $alreadyInValidation = false;
/**
* Flag to prevent endless clearAllReferences($deep=true) loop, if this object is referenced
* @var boolean
*/
protected $alreadyInClearAllReferencesDeep = false;
/**
* Get the [id] column value.
*
@@ -152,22 +158,25 @@ abstract class BaseAdminGroup extends BaseObject implements Persistent
// while technically this is not a default value of null,
// this seems to be closest in meaning.
return null;
} else {
try {
$dt = new DateTime($this->created_at);
} catch (Exception $x) {
throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->created_at, true), $x);
}
}
try {
$dt = new DateTime($this->created_at);
} catch (Exception $x) {
throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->created_at, true), $x);
}
if ($format === null) {
// Because propel.useDateTimeClass is true, we return a DateTime object.
return $dt;
} elseif (strpos($format, '%') !== false) {
return strftime($format, $dt->format('U'));
} else {
return $dt->format($format);
}
if (strpos($format, '%') !== false) {
return strftime($format, $dt->format('U'));
}
return $dt->format($format);
}
/**
@@ -189,22 +198,25 @@ abstract class BaseAdminGroup extends BaseObject implements Persistent
// while technically this is not a default value of null,
// this seems to be closest in meaning.
return null;
} else {
try {
$dt = new DateTime($this->updated_at);
} catch (Exception $x) {
throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->updated_at, true), $x);
}
}
try {
$dt = new DateTime($this->updated_at);
} catch (Exception $x) {
throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->updated_at, true), $x);
}
if ($format === null) {
// Because propel.useDateTimeClass is true, we return a DateTime object.
return $dt;
} elseif (strpos($format, '%') !== false) {
return strftime($format, $dt->format('U'));
} else {
return $dt->format($format);
}
if (strpos($format, '%') !== false) {
return strftime($format, $dt->format('U'));
}
return $dt->format($format);
}
/**
@@ -215,7 +227,7 @@ abstract class BaseAdminGroup extends BaseObject implements Persistent
*/
public function setId($v)
{
if ($v !== null) {
if ($v !== null && is_numeric($v)) {
$v = (int) $v;
}
@@ -236,7 +248,7 @@ abstract class BaseAdminGroup extends BaseObject implements Persistent
*/
public function setGroupId($v)
{
if ($v !== null) {
if ($v !== null && is_numeric($v)) {
$v = (int) $v;
}
@@ -261,7 +273,7 @@ abstract class BaseAdminGroup extends BaseObject implements Persistent
*/
public function setAdminId($v)
{
if ($v !== null) {
if ($v !== null && is_numeric($v)) {
$v = (int) $v;
}
@@ -368,7 +380,7 @@ abstract class BaseAdminGroup extends BaseObject implements Persistent
if ($rehydrate) {
$this->ensureConsistency();
}
$this->postHydrate($row, $startcol, $rehydrate);
return $startcol + 5; // 5 = AdminGroupPeer::NUM_HYDRATE_COLUMNS.
} catch (Exception $e) {
@@ -620,19 +632,19 @@ abstract class BaseAdminGroup extends BaseObject implements Persistent
// check the columns in natural order for more readable SQL queries
if ($this->isColumnModified(AdminGroupPeer::ID)) {
$modifiedColumns[':p' . $index++] = '`ID`';
$modifiedColumns[':p' . $index++] = '`id`';
}
if ($this->isColumnModified(AdminGroupPeer::GROUP_ID)) {
$modifiedColumns[':p' . $index++] = '`GROUP_ID`';
$modifiedColumns[':p' . $index++] = '`group_id`';
}
if ($this->isColumnModified(AdminGroupPeer::ADMIN_ID)) {
$modifiedColumns[':p' . $index++] = '`ADMIN_ID`';
$modifiedColumns[':p' . $index++] = '`admin_id`';
}
if ($this->isColumnModified(AdminGroupPeer::CREATED_AT)) {
$modifiedColumns[':p' . $index++] = '`CREATED_AT`';
$modifiedColumns[':p' . $index++] = '`created_at`';
}
if ($this->isColumnModified(AdminGroupPeer::UPDATED_AT)) {
$modifiedColumns[':p' . $index++] = '`UPDATED_AT`';
$modifiedColumns[':p' . $index++] = '`updated_at`';
}
$sql = sprintf(
@@ -645,19 +657,19 @@ abstract class BaseAdminGroup extends BaseObject implements Persistent
$stmt = $con->prepare($sql);
foreach ($modifiedColumns as $identifier => $columnName) {
switch ($columnName) {
case '`ID`':
case '`id`':
$stmt->bindValue($identifier, $this->id, PDO::PARAM_INT);
break;
case '`GROUP_ID`':
case '`group_id`':
$stmt->bindValue($identifier, $this->group_id, PDO::PARAM_INT);
break;
case '`ADMIN_ID`':
case '`admin_id`':
$stmt->bindValue($identifier, $this->admin_id, PDO::PARAM_INT);
break;
case '`CREATED_AT`':
case '`created_at`':
$stmt->bindValue($identifier, $this->created_at, PDO::PARAM_STR);
break;
case '`UPDATED_AT`':
case '`updated_at`':
$stmt->bindValue($identifier, $this->updated_at, PDO::PARAM_STR);
break;
}
@@ -728,11 +740,11 @@ abstract class BaseAdminGroup extends BaseObject implements Persistent
$this->validationFailures = array();
return true;
} else {
$this->validationFailures = $res;
return false;
}
$this->validationFailures = $res;
return false;
}
/**
@@ -1120,12 +1132,13 @@ abstract class BaseAdminGroup extends BaseObject implements Persistent
* Get the associated Group object
*
* @param PropelPDO $con Optional Connection object.
* @param $doQuery Executes a query to get the object if required
* @return Group The associated Group object.
* @throws PropelException
*/
public function getGroup(PropelPDO $con = null)
public function getGroup(PropelPDO $con = null, $doQuery = true)
{
if ($this->aGroup === null && ($this->group_id !== null)) {
if ($this->aGroup === null && ($this->group_id !== null) && $doQuery) {
$this->aGroup = GroupQuery::create()->findPk($this->group_id, $con);
/* The following can be used additionally to
guarantee the related object contains a reference
@@ -1171,12 +1184,13 @@ abstract class BaseAdminGroup extends BaseObject implements Persistent
* Get the associated Admin object
*
* @param PropelPDO $con Optional Connection object.
* @param $doQuery Executes a query to get the object if required
* @return Admin The associated Admin object.
* @throws PropelException
*/
public function getAdmin(PropelPDO $con = null)
public function getAdmin(PropelPDO $con = null, $doQuery = true)
{
if ($this->aAdmin === null && ($this->admin_id !== null)) {
if ($this->aAdmin === null && ($this->admin_id !== null) && $doQuery) {
$this->aAdmin = AdminQuery::create()->findPk($this->admin_id, $con);
/* The following can be used additionally to
guarantee the related object contains a reference
@@ -1202,6 +1216,7 @@ abstract class BaseAdminGroup extends BaseObject implements Persistent
$this->updated_at = null;
$this->alreadyInSave = false;
$this->alreadyInValidation = false;
$this->alreadyInClearAllReferencesDeep = false;
$this->clearAllReferences();
$this->resetModified();
$this->setNew(true);
@@ -1219,7 +1234,16 @@ abstract class BaseAdminGroup extends BaseObject implements Persistent
*/
public function clearAllReferences($deep = false)
{
if ($deep) {
if ($deep && !$this->alreadyInClearAllReferencesDeep) {
$this->alreadyInClearAllReferencesDeep = true;
if ($this->aGroup instanceof Persistent) {
$this->aGroup->clearAllReferences($deep);
}
if ($this->aAdmin instanceof Persistent) {
$this->aAdmin->clearAllReferences($deep);
}
$this->alreadyInClearAllReferencesDeep = false;
} // if ($deep)
$this->aGroup = null;

View File

@@ -46,20 +46,20 @@ abstract class BaseAdminGroupPeer
/** 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 = 'admin_group.ID';
/** the column name for the id field */
const ID = 'admin_group.id';
/** the column name for the GROUP_ID field */
const GROUP_ID = 'admin_group.GROUP_ID';
/** the column name for the group_id field */
const GROUP_ID = 'admin_group.group_id';
/** the column name for the ADMIN_ID field */
const ADMIN_ID = 'admin_group.ADMIN_ID';
/** the column name for the admin_id field */
const ADMIN_ID = 'admin_group.admin_id';
/** the column name for the CREATED_AT field */
const CREATED_AT = 'admin_group.CREATED_AT';
/** the column name for the created_at field */
const CREATED_AT = 'admin_group.created_at';
/** the column name for the UPDATED_AT field */
const UPDATED_AT = 'admin_group.UPDATED_AT';
/** the column name for the updated_at field */
const UPDATED_AT = 'admin_group.updated_at';
/** The default string format for model objects of the related table **/
const DEFAULT_STRING_FORMAT = 'YAML';
@@ -180,11 +180,11 @@ abstract class BaseAdminGroupPeer
$criteria->addSelectColumn(AdminGroupPeer::CREATED_AT);
$criteria->addSelectColumn(AdminGroupPeer::UPDATED_AT);
} else {
$criteria->addSelectColumn($alias . '.ID');
$criteria->addSelectColumn($alias . '.GROUP_ID');
$criteria->addSelectColumn($alias . '.ADMIN_ID');
$criteria->addSelectColumn($alias . '.CREATED_AT');
$criteria->addSelectColumn($alias . '.UPDATED_AT');
$criteria->addSelectColumn($alias . '.id');
$criteria->addSelectColumn($alias . '.group_id');
$criteria->addSelectColumn($alias . '.admin_id');
$criteria->addSelectColumn($alias . '.created_at');
$criteria->addSelectColumn($alias . '.updated_at');
}
}
@@ -268,7 +268,7 @@ abstract class BaseAdminGroupPeer
/**
* Prepares the Criteria object and uses the parent doSelect() method to execute a PDOStatement.
*
* Use this method directly if you want to work with an executed statement durirectly (for example
* Use this method directly if you want to work with an executed statement directly (for example
* to perform your own object hydration).
*
* @param Criteria $criteria The Criteria object used to build the SELECT statement.
@@ -373,8 +373,15 @@ abstract class BaseAdminGroupPeer
*
* @return void
*/
public static function clearInstancePool()
public static function clearInstancePool($and_clear_all_references = false)
{
if ($and_clear_all_references)
{
foreach (AdminGroupPeer::$instances as $instance)
{
$instance->clearAllReferences(true);
}
}
AdminGroupPeer::$instances = array();
}
@@ -1140,7 +1147,7 @@ abstract class BaseAdminGroupPeer
*
* @return string ClassName
*/
public static function getOMClass()
public static function getOMClass($row = 0, $colnum = 0)
{
return AdminGroupPeer::OM_CLASS;
}

View File

@@ -50,7 +50,6 @@ use Thelia\Model\Group;
* @method AdminGroup findOne(PropelPDO $con = null) Return the first AdminGroup matching the query
* @method AdminGroup findOneOrCreate(PropelPDO $con = null) Return the first AdminGroup matching the query, or a new AdminGroup object populated from the query conditions when no match is found
*
* @method AdminGroup findOneById(int $id) Return the first AdminGroup filtered by the id column
* @method AdminGroup findOneByGroupId(int $group_id) Return the first AdminGroup filtered by the group_id column
* @method AdminGroup findOneByAdminId(int $admin_id) Return the first AdminGroup filtered by the admin_id column
* @method AdminGroup findOneByCreatedAt(string $created_at) Return the first AdminGroup filtered by the created_at column
@@ -82,7 +81,7 @@ abstract class BaseAdminGroupQuery extends ModelCriteria
* Returns a new AdminGroupQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param AdminGroupQuery|Criteria $criteria Optional Criteria to build the query from
* @param AdminGroupQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return AdminGroupQuery
*/
@@ -138,6 +137,20 @@ abstract class BaseAdminGroupQuery extends ModelCriteria
}
}
/**
* Alias of findPk to use instance pooling
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return AdminGroup A model object, or null if the key is not found
* @throws PropelException
*/
public function findOneById($key, $con = null)
{
return $this->findPk($key, $con);
}
/**
* Find object by primary key using raw SQL to go fast.
* Bypass doSelect() and the object formatter by using generated code.
@@ -145,12 +158,12 @@ abstract class BaseAdminGroupQuery extends ModelCriteria
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return AdminGroup A model object, or null if the key is not found
* @throws PropelException
* @return AdminGroup A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT `ID`, `GROUP_ID`, `ADMIN_ID`, `CREATED_AT`, `UPDATED_AT` FROM `admin_group` WHERE `ID` = :p0';
$sql = 'SELECT `id`, `group_id`, `admin_id`, `created_at`, `updated_at` FROM `admin_group` WHERE `id` = :p0';
try {
$stmt = $con->prepare($sql);
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
@@ -246,7 +259,8 @@ abstract class BaseAdminGroupQuery extends ModelCriteria
* <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
* $query->filterById(array('min' => 12)); // WHERE id >= 12
* $query->filterById(array('max' => 12)); // WHERE id <= 12
* </code>
*
* @param mixed $id The value to use as filter.
@@ -259,8 +273,22 @@ abstract class BaseAdminGroupQuery extends ModelCriteria
*/
public function filterById($id = null, $comparison = null)
{
if (is_array($id) && null === $comparison) {
$comparison = Criteria::IN;
if (is_array($id)) {
$useMinMax = false;
if (isset($id['min'])) {
$this->addUsingAlias(AdminGroupPeer::ID, $id['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($id['max'])) {
$this->addUsingAlias(AdminGroupPeer::ID, $id['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(AdminGroupPeer::ID, $id, $comparison);
@@ -273,7 +301,8 @@ abstract class BaseAdminGroupQuery extends ModelCriteria
* <code>
* $query->filterByGroupId(1234); // WHERE group_id = 1234
* $query->filterByGroupId(array(12, 34)); // WHERE group_id IN (12, 34)
* $query->filterByGroupId(array('min' => 12)); // WHERE group_id > 12
* $query->filterByGroupId(array('min' => 12)); // WHERE group_id >= 12
* $query->filterByGroupId(array('max' => 12)); // WHERE group_id <= 12
* </code>
*
* @see filterByGroup()
@@ -316,7 +345,8 @@ abstract class BaseAdminGroupQuery extends ModelCriteria
* <code>
* $query->filterByAdminId(1234); // WHERE admin_id = 1234
* $query->filterByAdminId(array(12, 34)); // WHERE admin_id IN (12, 34)
* $query->filterByAdminId(array('min' => 12)); // WHERE admin_id > 12
* $query->filterByAdminId(array('min' => 12)); // WHERE admin_id >= 12
* $query->filterByAdminId(array('max' => 12)); // WHERE admin_id <= 12
* </code>
*
* @see filterByAdmin()
@@ -444,8 +474,8 @@ abstract class BaseAdminGroupQuery extends ModelCriteria
* @param Group|PropelObjectCollection $group The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return AdminGroupQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
* @return AdminGroupQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByGroup($group, $comparison = null)
{
@@ -520,8 +550,8 @@ abstract class BaseAdminGroupQuery extends ModelCriteria
* @param Admin|PropelObjectCollection $admin The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return AdminGroupQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
* @return AdminGroupQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByAdmin($admin, $comparison = null)
{

View File

@@ -107,6 +107,12 @@ abstract class BaseAdminLog extends BaseObject implements Persistent
*/
protected $alreadyInValidation = false;
/**
* Flag to prevent endless clearAllReferences($deep=true) loop, if this object is referenced
* @var boolean
*/
protected $alreadyInClearAllReferencesDeep = false;
/**
* Get the [id] column value.
*
@@ -186,22 +192,25 @@ abstract class BaseAdminLog extends BaseObject implements Persistent
// while technically this is not a default value of null,
// this seems to be closest in meaning.
return null;
} else {
try {
$dt = new DateTime($this->created_at);
} catch (Exception $x) {
throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->created_at, true), $x);
}
}
try {
$dt = new DateTime($this->created_at);
} catch (Exception $x) {
throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->created_at, true), $x);
}
if ($format === null) {
// Because propel.useDateTimeClass is true, we return a DateTime object.
return $dt;
} elseif (strpos($format, '%') !== false) {
return strftime($format, $dt->format('U'));
} else {
return $dt->format($format);
}
if (strpos($format, '%') !== false) {
return strftime($format, $dt->format('U'));
}
return $dt->format($format);
}
/**
@@ -223,22 +232,25 @@ abstract class BaseAdminLog extends BaseObject implements Persistent
// while technically this is not a default value of null,
// this seems to be closest in meaning.
return null;
} else {
try {
$dt = new DateTime($this->updated_at);
} catch (Exception $x) {
throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->updated_at, true), $x);
}
}
try {
$dt = new DateTime($this->updated_at);
} catch (Exception $x) {
throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->updated_at, true), $x);
}
if ($format === null) {
// Because propel.useDateTimeClass is true, we return a DateTime object.
return $dt;
} elseif (strpos($format, '%') !== false) {
return strftime($format, $dt->format('U'));
} else {
return $dt->format($format);
}
if (strpos($format, '%') !== false) {
return strftime($format, $dt->format('U'));
}
return $dt->format($format);
}
/**
@@ -249,7 +261,7 @@ abstract class BaseAdminLog extends BaseObject implements Persistent
*/
public function setId($v)
{
if ($v !== null) {
if ($v !== null && is_numeric($v)) {
$v = (int) $v;
}
@@ -270,7 +282,7 @@ abstract class BaseAdminLog extends BaseObject implements Persistent
*/
public function setAdminLogin($v)
{
if ($v !== null) {
if ($v !== null && is_numeric($v)) {
$v = (string) $v;
}
@@ -291,7 +303,7 @@ abstract class BaseAdminLog extends BaseObject implements Persistent
*/
public function setAdminFirstname($v)
{
if ($v !== null) {
if ($v !== null && is_numeric($v)) {
$v = (string) $v;
}
@@ -312,7 +324,7 @@ abstract class BaseAdminLog extends BaseObject implements Persistent
*/
public function setAdminLastname($v)
{
if ($v !== null) {
if ($v !== null && is_numeric($v)) {
$v = (string) $v;
}
@@ -333,7 +345,7 @@ abstract class BaseAdminLog extends BaseObject implements Persistent
*/
public function setAction($v)
{
if ($v !== null) {
if ($v !== null && is_numeric($v)) {
$v = (string) $v;
}
@@ -354,7 +366,7 @@ abstract class BaseAdminLog extends BaseObject implements Persistent
*/
public function setRequest($v)
{
if ($v !== null) {
if ($v !== null && is_numeric($v)) {
$v = (string) $v;
}
@@ -460,7 +472,7 @@ abstract class BaseAdminLog extends BaseObject implements Persistent
if ($rehydrate) {
$this->ensureConsistency();
}
$this->postHydrate($row, $startcol, $rehydrate);
return $startcol + 8; // 8 = AdminLogPeer::NUM_HYDRATE_COLUMNS.
} catch (Exception $e) {
@@ -685,28 +697,28 @@ abstract class BaseAdminLog extends BaseObject implements Persistent
// check the columns in natural order for more readable SQL queries
if ($this->isColumnModified(AdminLogPeer::ID)) {
$modifiedColumns[':p' . $index++] = '`ID`';
$modifiedColumns[':p' . $index++] = '`id`';
}
if ($this->isColumnModified(AdminLogPeer::ADMIN_LOGIN)) {
$modifiedColumns[':p' . $index++] = '`ADMIN_LOGIN`';
$modifiedColumns[':p' . $index++] = '`admin_login`';
}
if ($this->isColumnModified(AdminLogPeer::ADMIN_FIRSTNAME)) {
$modifiedColumns[':p' . $index++] = '`ADMIN_FIRSTNAME`';
$modifiedColumns[':p' . $index++] = '`admin_firstname`';
}
if ($this->isColumnModified(AdminLogPeer::ADMIN_LASTNAME)) {
$modifiedColumns[':p' . $index++] = '`ADMIN_LASTNAME`';
$modifiedColumns[':p' . $index++] = '`admin_lastname`';
}
if ($this->isColumnModified(AdminLogPeer::ACTION)) {
$modifiedColumns[':p' . $index++] = '`ACTION`';
$modifiedColumns[':p' . $index++] = '`action`';
}
if ($this->isColumnModified(AdminLogPeer::REQUEST)) {
$modifiedColumns[':p' . $index++] = '`REQUEST`';
$modifiedColumns[':p' . $index++] = '`request`';
}
if ($this->isColumnModified(AdminLogPeer::CREATED_AT)) {
$modifiedColumns[':p' . $index++] = '`CREATED_AT`';
$modifiedColumns[':p' . $index++] = '`created_at`';
}
if ($this->isColumnModified(AdminLogPeer::UPDATED_AT)) {
$modifiedColumns[':p' . $index++] = '`UPDATED_AT`';
$modifiedColumns[':p' . $index++] = '`updated_at`';
}
$sql = sprintf(
@@ -719,28 +731,28 @@ abstract class BaseAdminLog extends BaseObject implements Persistent
$stmt = $con->prepare($sql);
foreach ($modifiedColumns as $identifier => $columnName) {
switch ($columnName) {
case '`ID`':
case '`id`':
$stmt->bindValue($identifier, $this->id, PDO::PARAM_INT);
break;
case '`ADMIN_LOGIN`':
case '`admin_login`':
$stmt->bindValue($identifier, $this->admin_login, PDO::PARAM_STR);
break;
case '`ADMIN_FIRSTNAME`':
case '`admin_firstname`':
$stmt->bindValue($identifier, $this->admin_firstname, PDO::PARAM_STR);
break;
case '`ADMIN_LASTNAME`':
case '`admin_lastname`':
$stmt->bindValue($identifier, $this->admin_lastname, PDO::PARAM_STR);
break;
case '`ACTION`':
case '`action`':
$stmt->bindValue($identifier, $this->action, PDO::PARAM_STR);
break;
case '`REQUEST`':
case '`request`':
$stmt->bindValue($identifier, $this->request, PDO::PARAM_STR);
break;
case '`CREATED_AT`':
case '`created_at`':
$stmt->bindValue($identifier, $this->created_at, PDO::PARAM_STR);
break;
case '`UPDATED_AT`':
case '`updated_at`':
$stmt->bindValue($identifier, $this->updated_at, PDO::PARAM_STR);
break;
}
@@ -811,11 +823,11 @@ abstract class BaseAdminLog extends BaseObject implements Persistent
$this->validationFailures = array();
return true;
} else {
$this->validationFailures = $res;
return false;
}
$this->validationFailures = $res;
return false;
}
/**
@@ -1177,6 +1189,7 @@ abstract class BaseAdminLog extends BaseObject implements Persistent
$this->updated_at = null;
$this->alreadyInSave = false;
$this->alreadyInValidation = false;
$this->alreadyInClearAllReferencesDeep = false;
$this->clearAllReferences();
$this->resetModified();
$this->setNew(true);
@@ -1194,7 +1207,10 @@ abstract class BaseAdminLog extends BaseObject implements Persistent
*/
public function clearAllReferences($deep = false)
{
if ($deep) {
if ($deep && !$this->alreadyInClearAllReferencesDeep) {
$this->alreadyInClearAllReferencesDeep = true;
$this->alreadyInClearAllReferencesDeep = false;
} // if ($deep)
}

View File

@@ -44,29 +44,29 @@ abstract class BaseAdminLogPeer
/** The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS) */
const NUM_HYDRATE_COLUMNS = 8;
/** the column name for the ID field */
const ID = 'admin_log.ID';
/** the column name for the id field */
const ID = 'admin_log.id';
/** the column name for the ADMIN_LOGIN field */
const ADMIN_LOGIN = 'admin_log.ADMIN_LOGIN';
/** the column name for the admin_login field */
const ADMIN_LOGIN = 'admin_log.admin_login';
/** the column name for the ADMIN_FIRSTNAME field */
const ADMIN_FIRSTNAME = 'admin_log.ADMIN_FIRSTNAME';
/** the column name for the admin_firstname field */
const ADMIN_FIRSTNAME = 'admin_log.admin_firstname';
/** the column name for the ADMIN_LASTNAME field */
const ADMIN_LASTNAME = 'admin_log.ADMIN_LASTNAME';
/** the column name for the admin_lastname field */
const ADMIN_LASTNAME = 'admin_log.admin_lastname';
/** the column name for the ACTION field */
const ACTION = 'admin_log.ACTION';
/** the column name for the action field */
const ACTION = 'admin_log.action';
/** the column name for the REQUEST field */
const REQUEST = 'admin_log.REQUEST';
/** the column name for the request field */
const REQUEST = 'admin_log.request';
/** the column name for the CREATED_AT field */
const CREATED_AT = 'admin_log.CREATED_AT';
/** the column name for the created_at field */
const CREATED_AT = 'admin_log.created_at';
/** the column name for the UPDATED_AT field */
const UPDATED_AT = 'admin_log.UPDATED_AT';
/** the column name for the updated_at field */
const UPDATED_AT = 'admin_log.updated_at';
/** The default string format for model objects of the related table **/
const DEFAULT_STRING_FORMAT = 'YAML';
@@ -190,14 +190,14 @@ abstract class BaseAdminLogPeer
$criteria->addSelectColumn(AdminLogPeer::CREATED_AT);
$criteria->addSelectColumn(AdminLogPeer::UPDATED_AT);
} else {
$criteria->addSelectColumn($alias . '.ID');
$criteria->addSelectColumn($alias . '.ADMIN_LOGIN');
$criteria->addSelectColumn($alias . '.ADMIN_FIRSTNAME');
$criteria->addSelectColumn($alias . '.ADMIN_LASTNAME');
$criteria->addSelectColumn($alias . '.ACTION');
$criteria->addSelectColumn($alias . '.REQUEST');
$criteria->addSelectColumn($alias . '.CREATED_AT');
$criteria->addSelectColumn($alias . '.UPDATED_AT');
$criteria->addSelectColumn($alias . '.id');
$criteria->addSelectColumn($alias . '.admin_login');
$criteria->addSelectColumn($alias . '.admin_firstname');
$criteria->addSelectColumn($alias . '.admin_lastname');
$criteria->addSelectColumn($alias . '.action');
$criteria->addSelectColumn($alias . '.request');
$criteria->addSelectColumn($alias . '.created_at');
$criteria->addSelectColumn($alias . '.updated_at');
}
}
@@ -281,7 +281,7 @@ abstract class BaseAdminLogPeer
/**
* Prepares the Criteria object and uses the parent doSelect() method to execute a PDOStatement.
*
* Use this method directly if you want to work with an executed statement durirectly (for example
* Use this method directly if you want to work with an executed statement directly (for example
* to perform your own object hydration).
*
* @param Criteria $criteria The Criteria object used to build the SELECT statement.
@@ -386,8 +386,15 @@ abstract class BaseAdminLogPeer
*
* @return void
*/
public static function clearInstancePool()
public static function clearInstancePool($and_clear_all_references = false)
{
if ($and_clear_all_references)
{
foreach (AdminLogPeer::$instances as $instance)
{
$instance->clearAllReferences(true);
}
}
AdminLogPeer::$instances = array();
}
@@ -522,7 +529,7 @@ abstract class BaseAdminLogPeer
*
* @return string ClassName
*/
public static function getOMClass()
public static function getOMClass($row = 0, $colnum = 0)
{
return AdminLogPeer::OM_CLASS;
}

View File

@@ -44,7 +44,6 @@ use Thelia\Model\AdminLogQuery;
* @method AdminLog findOne(PropelPDO $con = null) Return the first AdminLog matching the query
* @method AdminLog findOneOrCreate(PropelPDO $con = null) Return the first AdminLog matching the query, or a new AdminLog object populated from the query conditions when no match is found
*
* @method AdminLog findOneById(int $id) Return the first AdminLog filtered by the id column
* @method AdminLog findOneByAdminLogin(string $admin_login) Return the first AdminLog filtered by the admin_login column
* @method AdminLog findOneByAdminFirstname(string $admin_firstname) Return the first AdminLog filtered by the admin_firstname column
* @method AdminLog findOneByAdminLastname(string $admin_lastname) Return the first AdminLog filtered by the admin_lastname column
@@ -82,7 +81,7 @@ abstract class BaseAdminLogQuery extends ModelCriteria
* Returns a new AdminLogQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param AdminLogQuery|Criteria $criteria Optional Criteria to build the query from
* @param AdminLogQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return AdminLogQuery
*/
@@ -138,6 +137,20 @@ abstract class BaseAdminLogQuery extends ModelCriteria
}
}
/**
* Alias of findPk to use instance pooling
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return AdminLog A model object, or null if the key is not found
* @throws PropelException
*/
public function findOneById($key, $con = null)
{
return $this->findPk($key, $con);
}
/**
* Find object by primary key using raw SQL to go fast.
* Bypass doSelect() and the object formatter by using generated code.
@@ -145,12 +158,12 @@ abstract class BaseAdminLogQuery extends ModelCriteria
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return AdminLog A model object, or null if the key is not found
* @throws PropelException
* @return AdminLog A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT `ID`, `ADMIN_LOGIN`, `ADMIN_FIRSTNAME`, `ADMIN_LASTNAME`, `ACTION`, `REQUEST`, `CREATED_AT`, `UPDATED_AT` FROM `admin_log` WHERE `ID` = :p0';
$sql = 'SELECT `id`, `admin_login`, `admin_firstname`, `admin_lastname`, `action`, `request`, `created_at`, `updated_at` FROM `admin_log` WHERE `id` = :p0';
try {
$stmt = $con->prepare($sql);
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
@@ -246,7 +259,8 @@ abstract class BaseAdminLogQuery extends ModelCriteria
* <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
* $query->filterById(array('min' => 12)); // WHERE id >= 12
* $query->filterById(array('max' => 12)); // WHERE id <= 12
* </code>
*
* @param mixed $id The value to use as filter.
@@ -259,8 +273,22 @@ abstract class BaseAdminLogQuery extends ModelCriteria
*/
public function filterById($id = null, $comparison = null)
{
if (is_array($id) && null === $comparison) {
$comparison = Criteria::IN;
if (is_array($id)) {
$useMinMax = false;
if (isset($id['min'])) {
$this->addUsingAlias(AdminLogPeer::ID, $id['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($id['max'])) {
$this->addUsingAlias(AdminLogPeer::ID, $id['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(AdminLogPeer::ID, $id, $comparison);

View File

@@ -45,32 +45,32 @@ abstract class BaseAdminPeer
/** The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS) */
const NUM_HYDRATE_COLUMNS = 9;
/** the column name for the ID field */
const ID = 'admin.ID';
/** the column name for the id field */
const ID = 'admin.id';
/** the column name for the FIRSTNAME field */
const FIRSTNAME = 'admin.FIRSTNAME';
/** the column name for the firstname field */
const FIRSTNAME = 'admin.firstname';
/** the column name for the LASTNAME field */
const LASTNAME = 'admin.LASTNAME';
/** the column name for the lastname field */
const LASTNAME = 'admin.lastname';
/** the column name for the LOGIN field */
const LOGIN = 'admin.LOGIN';
/** the column name for the login field */
const LOGIN = 'admin.login';
/** the column name for the PASSWORD field */
const PASSWORD = 'admin.PASSWORD';
/** the column name for the password field */
const PASSWORD = 'admin.password';
/** the column name for the ALGO field */
const ALGO = 'admin.ALGO';
/** the column name for the algo field */
const ALGO = 'admin.algo';
/** the column name for the SALT field */
const SALT = 'admin.SALT';
/** the column name for the salt field */
const SALT = 'admin.salt';
/** the column name for the CREATED_AT field */
const CREATED_AT = 'admin.CREATED_AT';
/** the column name for the created_at field */
const CREATED_AT = 'admin.created_at';
/** the column name for the UPDATED_AT field */
const UPDATED_AT = 'admin.UPDATED_AT';
/** the column name for the updated_at field */
const UPDATED_AT = 'admin.updated_at';
/** The default string format for model objects of the related table **/
const DEFAULT_STRING_FORMAT = 'YAML';
@@ -195,15 +195,15 @@ abstract class BaseAdminPeer
$criteria->addSelectColumn(AdminPeer::CREATED_AT);
$criteria->addSelectColumn(AdminPeer::UPDATED_AT);
} else {
$criteria->addSelectColumn($alias . '.ID');
$criteria->addSelectColumn($alias . '.FIRSTNAME');
$criteria->addSelectColumn($alias . '.LASTNAME');
$criteria->addSelectColumn($alias . '.LOGIN');
$criteria->addSelectColumn($alias . '.PASSWORD');
$criteria->addSelectColumn($alias . '.ALGO');
$criteria->addSelectColumn($alias . '.SALT');
$criteria->addSelectColumn($alias . '.CREATED_AT');
$criteria->addSelectColumn($alias . '.UPDATED_AT');
$criteria->addSelectColumn($alias . '.id');
$criteria->addSelectColumn($alias . '.firstname');
$criteria->addSelectColumn($alias . '.lastname');
$criteria->addSelectColumn($alias . '.login');
$criteria->addSelectColumn($alias . '.password');
$criteria->addSelectColumn($alias . '.algo');
$criteria->addSelectColumn($alias . '.salt');
$criteria->addSelectColumn($alias . '.created_at');
$criteria->addSelectColumn($alias . '.updated_at');
}
}
@@ -287,7 +287,7 @@ abstract class BaseAdminPeer
/**
* Prepares the Criteria object and uses the parent doSelect() method to execute a PDOStatement.
*
* Use this method directly if you want to work with an executed statement durirectly (for example
* Use this method directly if you want to work with an executed statement directly (for example
* to perform your own object hydration).
*
* @param Criteria $criteria The Criteria object used to build the SELECT statement.
@@ -392,8 +392,15 @@ abstract class BaseAdminPeer
*
* @return void
*/
public static function clearInstancePool()
public static function clearInstancePool($and_clear_all_references = false)
{
if ($and_clear_all_references)
{
foreach (AdminPeer::$instances as $instance)
{
$instance->clearAllReferences(true);
}
}
AdminPeer::$instances = array();
}
@@ -531,7 +538,7 @@ abstract class BaseAdminPeer
*
* @return string ClassName
*/
public static function getOMClass()
public static function getOMClass($row = 0, $colnum = 0)
{
return AdminPeer::OM_CLASS;
}

View File

@@ -53,7 +53,6 @@ use Thelia\Model\AdminQuery;
* @method Admin findOne(PropelPDO $con = null) Return the first Admin matching the query
* @method Admin findOneOrCreate(PropelPDO $con = null) Return the first Admin matching the query, or a new Admin object populated from the query conditions when no match is found
*
* @method Admin findOneById(int $id) Return the first Admin filtered by the id column
* @method Admin findOneByFirstname(string $firstname) Return the first Admin filtered by the firstname column
* @method Admin findOneByLastname(string $lastname) Return the first Admin filtered by the lastname column
* @method Admin findOneByLogin(string $login) Return the first Admin filtered by the login column
@@ -93,7 +92,7 @@ abstract class BaseAdminQuery extends ModelCriteria
* Returns a new AdminQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param AdminQuery|Criteria $criteria Optional Criteria to build the query from
* @param AdminQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return AdminQuery
*/
@@ -149,6 +148,20 @@ abstract class BaseAdminQuery extends ModelCriteria
}
}
/**
* Alias of findPk to use instance pooling
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return Admin A model object, or null if the key is not found
* @throws PropelException
*/
public function findOneById($key, $con = null)
{
return $this->findPk($key, $con);
}
/**
* Find object by primary key using raw SQL to go fast.
* Bypass doSelect() and the object formatter by using generated code.
@@ -156,12 +169,12 @@ abstract class BaseAdminQuery extends ModelCriteria
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return Admin A model object, or null if the key is not found
* @throws PropelException
* @return Admin A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT `ID`, `FIRSTNAME`, `LASTNAME`, `LOGIN`, `PASSWORD`, `ALGO`, `SALT`, `CREATED_AT`, `UPDATED_AT` FROM `admin` WHERE `ID` = :p0';
$sql = 'SELECT `id`, `firstname`, `lastname`, `login`, `password`, `algo`, `salt`, `created_at`, `updated_at` FROM `admin` WHERE `id` = :p0';
try {
$stmt = $con->prepare($sql);
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
@@ -257,7 +270,8 @@ abstract class BaseAdminQuery extends ModelCriteria
* <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
* $query->filterById(array('min' => 12)); // WHERE id >= 12
* $query->filterById(array('max' => 12)); // WHERE id <= 12
* </code>
*
* @param mixed $id The value to use as filter.
@@ -270,8 +284,22 @@ abstract class BaseAdminQuery extends ModelCriteria
*/
public function filterById($id = null, $comparison = null)
{
if (is_array($id) && null === $comparison) {
$comparison = Criteria::IN;
if (is_array($id)) {
$useMinMax = false;
if (isset($id['min'])) {
$this->addUsingAlias(AdminPeer::ID, $id['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($id['max'])) {
$this->addUsingAlias(AdminPeer::ID, $id['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(AdminPeer::ID, $id, $comparison);
@@ -543,8 +571,8 @@ abstract class BaseAdminQuery extends ModelCriteria
* @param AdminGroup|PropelObjectCollection $adminGroup the related object to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return AdminQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
* @return AdminQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByAdminGroup($adminGroup, $comparison = null)
{

View File

@@ -107,6 +107,12 @@ abstract class BaseArea extends BaseObject implements Persistent
*/
protected $alreadyInValidation = false;
/**
* Flag to prevent endless clearAllReferences($deep=true) loop, if this object is referenced
* @var boolean
*/
protected $alreadyInClearAllReferencesDeep = false;
/**
* An array of objects scheduled for deletion.
* @var PropelObjectCollection
@@ -168,22 +174,25 @@ abstract class BaseArea extends BaseObject implements Persistent
// while technically this is not a default value of null,
// this seems to be closest in meaning.
return null;
} else {
try {
$dt = new DateTime($this->created_at);
} catch (Exception $x) {
throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->created_at, true), $x);
}
}
try {
$dt = new DateTime($this->created_at);
} catch (Exception $x) {
throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->created_at, true), $x);
}
if ($format === null) {
// Because propel.useDateTimeClass is true, we return a DateTime object.
return $dt;
} elseif (strpos($format, '%') !== false) {
return strftime($format, $dt->format('U'));
} else {
return $dt->format($format);
}
if (strpos($format, '%') !== false) {
return strftime($format, $dt->format('U'));
}
return $dt->format($format);
}
/**
@@ -205,22 +214,25 @@ abstract class BaseArea extends BaseObject implements Persistent
// while technically this is not a default value of null,
// this seems to be closest in meaning.
return null;
} else {
try {
$dt = new DateTime($this->updated_at);
} catch (Exception $x) {
throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->updated_at, true), $x);
}
}
try {
$dt = new DateTime($this->updated_at);
} catch (Exception $x) {
throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->updated_at, true), $x);
}
if ($format === null) {
// Because propel.useDateTimeClass is true, we return a DateTime object.
return $dt;
} elseif (strpos($format, '%') !== false) {
return strftime($format, $dt->format('U'));
} else {
return $dt->format($format);
}
if (strpos($format, '%') !== false) {
return strftime($format, $dt->format('U'));
}
return $dt->format($format);
}
/**
@@ -231,7 +243,7 @@ abstract class BaseArea extends BaseObject implements Persistent
*/
public function setId($v)
{
if ($v !== null) {
if ($v !== null && is_numeric($v)) {
$v = (int) $v;
}
@@ -252,7 +264,7 @@ abstract class BaseArea extends BaseObject implements Persistent
*/
public function setName($v)
{
if ($v !== null) {
if ($v !== null && is_numeric($v)) {
$v = (string) $v;
}
@@ -273,7 +285,7 @@ abstract class BaseArea extends BaseObject implements Persistent
*/
public function setUnit($v)
{
if ($v !== null) {
if ($v !== null && is_numeric($v)) {
$v = (double) $v;
}
@@ -376,7 +388,7 @@ abstract class BaseArea extends BaseObject implements Persistent
if ($rehydrate) {
$this->ensureConsistency();
}
$this->postHydrate($row, $startcol, $rehydrate);
return $startcol + 5; // 5 = AreaPeer::NUM_HYDRATE_COLUMNS.
} catch (Exception $e) {
@@ -590,7 +602,7 @@ abstract class BaseArea extends BaseObject implements Persistent
if ($this->collCountrys !== null) {
foreach ($this->collCountrys as $referrerFK) {
if (!$referrerFK->isDeleted()) {
if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) {
$affectedRows += $referrerFK->save($con);
}
}
@@ -608,7 +620,7 @@ abstract class BaseArea extends BaseObject implements Persistent
if ($this->collDelivzones !== null) {
foreach ($this->collDelivzones as $referrerFK) {
if (!$referrerFK->isDeleted()) {
if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) {
$affectedRows += $referrerFK->save($con);
}
}
@@ -641,19 +653,19 @@ abstract class BaseArea extends BaseObject implements Persistent
// check the columns in natural order for more readable SQL queries
if ($this->isColumnModified(AreaPeer::ID)) {
$modifiedColumns[':p' . $index++] = '`ID`';
$modifiedColumns[':p' . $index++] = '`id`';
}
if ($this->isColumnModified(AreaPeer::NAME)) {
$modifiedColumns[':p' . $index++] = '`NAME`';
$modifiedColumns[':p' . $index++] = '`name`';
}
if ($this->isColumnModified(AreaPeer::UNIT)) {
$modifiedColumns[':p' . $index++] = '`UNIT`';
$modifiedColumns[':p' . $index++] = '`unit`';
}
if ($this->isColumnModified(AreaPeer::CREATED_AT)) {
$modifiedColumns[':p' . $index++] = '`CREATED_AT`';
$modifiedColumns[':p' . $index++] = '`created_at`';
}
if ($this->isColumnModified(AreaPeer::UPDATED_AT)) {
$modifiedColumns[':p' . $index++] = '`UPDATED_AT`';
$modifiedColumns[':p' . $index++] = '`updated_at`';
}
$sql = sprintf(
@@ -666,19 +678,19 @@ abstract class BaseArea extends BaseObject implements Persistent
$stmt = $con->prepare($sql);
foreach ($modifiedColumns as $identifier => $columnName) {
switch ($columnName) {
case '`ID`':
case '`id`':
$stmt->bindValue($identifier, $this->id, PDO::PARAM_INT);
break;
case '`NAME`':
case '`name`':
$stmt->bindValue($identifier, $this->name, PDO::PARAM_STR);
break;
case '`UNIT`':
case '`unit`':
$stmt->bindValue($identifier, $this->unit, PDO::PARAM_STR);
break;
case '`CREATED_AT`':
case '`created_at`':
$stmt->bindValue($identifier, $this->created_at, PDO::PARAM_STR);
break;
case '`UPDATED_AT`':
case '`updated_at`':
$stmt->bindValue($identifier, $this->updated_at, PDO::PARAM_STR);
break;
}
@@ -749,11 +761,11 @@ abstract class BaseArea extends BaseObject implements Persistent
$this->validationFailures = array();
return true;
} else {
$this->validationFailures = $res;
return false;
}
$this->validationFailures = $res;
return false;
}
/**
@@ -1144,13 +1156,15 @@ abstract class BaseArea extends BaseObject implements Persistent
* This does not modify the database; however, it will remove any associated objects, causing
* them to be refetched by subsequent calls to accessor method.
*
* @return void
* @return Area The current object (for fluent API support)
* @see addCountrys()
*/
public function clearCountrys()
{
$this->collCountrys = null; // important to set this to null since that means it is uninitialized
$this->collCountrysPartial = null;
return $this;
}
/**
@@ -1222,6 +1236,7 @@ abstract class BaseArea extends BaseObject implements Persistent
$this->collCountrysPartial = true;
}
$collCountrys->getInternalIterator()->rewind();
return $collCountrys;
}
@@ -1249,12 +1264,15 @@ abstract class BaseArea extends BaseObject implements Persistent
*
* @param PropelCollection $countrys A Propel collection.
* @param PropelPDO $con Optional connection object
* @return Area The current object (for fluent API support)
*/
public function setCountrys(PropelCollection $countrys, PropelPDO $con = null)
{
$this->countrysScheduledForDeletion = $this->getCountrys(new Criteria(), $con)->diff($countrys);
$countrysToDelete = $this->getCountrys(new Criteria(), $con)->diff($countrys);
foreach ($this->countrysScheduledForDeletion as $countryRemoved) {
$this->countrysScheduledForDeletion = unserialize(serialize($countrysToDelete));
foreach ($countrysToDelete as $countryRemoved) {
$countryRemoved->setArea(null);
}
@@ -1265,6 +1283,8 @@ abstract class BaseArea extends BaseObject implements Persistent
$this->collCountrys = $countrys;
$this->collCountrysPartial = false;
return $this;
}
/**
@@ -1282,22 +1302,22 @@ abstract class BaseArea extends BaseObject implements Persistent
if (null === $this->collCountrys || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collCountrys) {
return 0;
} else {
if($partial && !$criteria) {
return count($this->getCountrys());
}
$query = CountryQuery::create(null, $criteria);
if ($distinct) {
$query->distinct();
}
return $query
->filterByArea($this)
->count($con);
}
} else {
return count($this->collCountrys);
if($partial && !$criteria) {
return count($this->getCountrys());
}
$query = CountryQuery::create(null, $criteria);
if ($distinct) {
$query->distinct();
}
return $query
->filterByArea($this)
->count($con);
}
return count($this->collCountrys);
}
/**
@@ -1313,7 +1333,7 @@ abstract class BaseArea extends BaseObject implements Persistent
$this->initCountrys();
$this->collCountrysPartial = true;
}
if (!$this->collCountrys->contains($l)) { // only add it if the **same** object is not already associated
if (!in_array($l, $this->collCountrys->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
$this->doAddCountry($l);
}
@@ -1331,6 +1351,7 @@ abstract class BaseArea extends BaseObject implements Persistent
/**
* @param Country $country The country object to remove.
* @return Area The current object (for fluent API support)
*/
public function removeCountry($country)
{
@@ -1343,6 +1364,8 @@ abstract class BaseArea extends BaseObject implements Persistent
$this->countrysScheduledForDeletion[]= $country;
$country->setArea(null);
}
return $this;
}
/**
@@ -1351,13 +1374,15 @@ abstract class BaseArea extends BaseObject implements Persistent
* This does not modify the database; however, it will remove any associated objects, causing
* them to be refetched by subsequent calls to accessor method.
*
* @return void
* @return Area The current object (for fluent API support)
* @see addDelivzones()
*/
public function clearDelivzones()
{
$this->collDelivzones = null; // important to set this to null since that means it is uninitialized
$this->collDelivzonesPartial = null;
return $this;
}
/**
@@ -1429,6 +1454,7 @@ abstract class BaseArea extends BaseObject implements Persistent
$this->collDelivzonesPartial = true;
}
$collDelivzones->getInternalIterator()->rewind();
return $collDelivzones;
}
@@ -1456,12 +1482,15 @@ abstract class BaseArea extends BaseObject implements Persistent
*
* @param PropelCollection $delivzones A Propel collection.
* @param PropelPDO $con Optional connection object
* @return Area The current object (for fluent API support)
*/
public function setDelivzones(PropelCollection $delivzones, PropelPDO $con = null)
{
$this->delivzonesScheduledForDeletion = $this->getDelivzones(new Criteria(), $con)->diff($delivzones);
$delivzonesToDelete = $this->getDelivzones(new Criteria(), $con)->diff($delivzones);
foreach ($this->delivzonesScheduledForDeletion as $delivzoneRemoved) {
$this->delivzonesScheduledForDeletion = unserialize(serialize($delivzonesToDelete));
foreach ($delivzonesToDelete as $delivzoneRemoved) {
$delivzoneRemoved->setArea(null);
}
@@ -1472,6 +1501,8 @@ abstract class BaseArea extends BaseObject implements Persistent
$this->collDelivzones = $delivzones;
$this->collDelivzonesPartial = false;
return $this;
}
/**
@@ -1489,22 +1520,22 @@ abstract class BaseArea extends BaseObject implements Persistent
if (null === $this->collDelivzones || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collDelivzones) {
return 0;
} else {
if($partial && !$criteria) {
return count($this->getDelivzones());
}
$query = DelivzoneQuery::create(null, $criteria);
if ($distinct) {
$query->distinct();
}
return $query
->filterByArea($this)
->count($con);
}
} else {
return count($this->collDelivzones);
if($partial && !$criteria) {
return count($this->getDelivzones());
}
$query = DelivzoneQuery::create(null, $criteria);
if ($distinct) {
$query->distinct();
}
return $query
->filterByArea($this)
->count($con);
}
return count($this->collDelivzones);
}
/**
@@ -1520,7 +1551,7 @@ abstract class BaseArea extends BaseObject implements Persistent
$this->initDelivzones();
$this->collDelivzonesPartial = true;
}
if (!$this->collDelivzones->contains($l)) { // only add it if the **same** object is not already associated
if (!in_array($l, $this->collDelivzones->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
$this->doAddDelivzone($l);
}
@@ -1538,6 +1569,7 @@ abstract class BaseArea extends BaseObject implements Persistent
/**
* @param Delivzone $delivzone The delivzone object to remove.
* @return Area The current object (for fluent API support)
*/
public function removeDelivzone($delivzone)
{
@@ -1550,6 +1582,8 @@ abstract class BaseArea extends BaseObject implements Persistent
$this->delivzonesScheduledForDeletion[]= $delivzone;
$delivzone->setArea(null);
}
return $this;
}
/**
@@ -1564,6 +1598,7 @@ abstract class BaseArea extends BaseObject implements Persistent
$this->updated_at = null;
$this->alreadyInSave = false;
$this->alreadyInValidation = false;
$this->alreadyInClearAllReferencesDeep = false;
$this->clearAllReferences();
$this->resetModified();
$this->setNew(true);
@@ -1581,7 +1616,8 @@ abstract class BaseArea extends BaseObject implements Persistent
*/
public function clearAllReferences($deep = false)
{
if ($deep) {
if ($deep && !$this->alreadyInClearAllReferencesDeep) {
$this->alreadyInClearAllReferencesDeep = true;
if ($this->collCountrys) {
foreach ($this->collCountrys as $o) {
$o->clearAllReferences($deep);
@@ -1592,6 +1628,8 @@ abstract class BaseArea extends BaseObject implements Persistent
$o->clearAllReferences($deep);
}
}
$this->alreadyInClearAllReferencesDeep = false;
} // if ($deep)
if ($this->collCountrys instanceof PropelCollection) {

View File

@@ -46,20 +46,20 @@ abstract class BaseAreaPeer
/** 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 = 'area.ID';
/** the column name for the id field */
const ID = 'area.id';
/** the column name for the NAME field */
const NAME = 'area.NAME';
/** the column name for the name field */
const NAME = 'area.name';
/** the column name for the UNIT field */
const UNIT = 'area.UNIT';
/** the column name for the unit field */
const UNIT = 'area.unit';
/** the column name for the CREATED_AT field */
const CREATED_AT = 'area.CREATED_AT';
/** the column name for the created_at field */
const CREATED_AT = 'area.created_at';
/** the column name for the UPDATED_AT field */
const UPDATED_AT = 'area.UPDATED_AT';
/** the column name for the updated_at field */
const UPDATED_AT = 'area.updated_at';
/** The default string format for model objects of the related table **/
const DEFAULT_STRING_FORMAT = 'YAML';
@@ -180,11 +180,11 @@ abstract class BaseAreaPeer
$criteria->addSelectColumn(AreaPeer::CREATED_AT);
$criteria->addSelectColumn(AreaPeer::UPDATED_AT);
} else {
$criteria->addSelectColumn($alias . '.ID');
$criteria->addSelectColumn($alias . '.NAME');
$criteria->addSelectColumn($alias . '.UNIT');
$criteria->addSelectColumn($alias . '.CREATED_AT');
$criteria->addSelectColumn($alias . '.UPDATED_AT');
$criteria->addSelectColumn($alias . '.id');
$criteria->addSelectColumn($alias . '.name');
$criteria->addSelectColumn($alias . '.unit');
$criteria->addSelectColumn($alias . '.created_at');
$criteria->addSelectColumn($alias . '.updated_at');
}
}
@@ -268,7 +268,7 @@ abstract class BaseAreaPeer
/**
* Prepares the Criteria object and uses the parent doSelect() method to execute a PDOStatement.
*
* Use this method directly if you want to work with an executed statement durirectly (for example
* Use this method directly if you want to work with an executed statement directly (for example
* to perform your own object hydration).
*
* @param Criteria $criteria The Criteria object used to build the SELECT statement.
@@ -373,8 +373,15 @@ abstract class BaseAreaPeer
*
* @return void
*/
public static function clearInstancePool()
public static function clearInstancePool($and_clear_all_references = false)
{
if ($and_clear_all_references)
{
foreach (AreaPeer::$instances as $instance)
{
$instance->clearAllReferences(true);
}
}
AreaPeer::$instances = array();
}
@@ -515,7 +522,7 @@ abstract class BaseAreaPeer
*
* @return string ClassName
*/
public static function getOMClass()
public static function getOMClass($row = 0, $colnum = 0)
{
return AreaPeer::OM_CLASS;
}

View File

@@ -50,7 +50,6 @@ use Thelia\Model\Delivzone;
* @method Area findOne(PropelPDO $con = null) Return the first Area matching the query
* @method Area findOneOrCreate(PropelPDO $con = null) Return the first Area matching the query, or a new Area object populated from the query conditions when no match is found
*
* @method Area findOneById(int $id) Return the first Area filtered by the id column
* @method Area findOneByName(string $name) Return the first Area filtered by the name column
* @method Area findOneByUnit(double $unit) Return the first Area filtered by the unit column
* @method Area findOneByCreatedAt(string $created_at) Return the first Area filtered by the created_at column
@@ -82,7 +81,7 @@ abstract class BaseAreaQuery extends ModelCriteria
* Returns a new AreaQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param AreaQuery|Criteria $criteria Optional Criteria to build the query from
* @param AreaQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return AreaQuery
*/
@@ -138,6 +137,20 @@ abstract class BaseAreaQuery extends ModelCriteria
}
}
/**
* Alias of findPk to use instance pooling
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return Area A model object, or null if the key is not found
* @throws PropelException
*/
public function findOneById($key, $con = null)
{
return $this->findPk($key, $con);
}
/**
* Find object by primary key using raw SQL to go fast.
* Bypass doSelect() and the object formatter by using generated code.
@@ -145,12 +158,12 @@ abstract class BaseAreaQuery extends ModelCriteria
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return Area A model object, or null if the key is not found
* @throws PropelException
* @return Area A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT `ID`, `NAME`, `UNIT`, `CREATED_AT`, `UPDATED_AT` FROM `area` WHERE `ID` = :p0';
$sql = 'SELECT `id`, `name`, `unit`, `created_at`, `updated_at` FROM `area` WHERE `id` = :p0';
try {
$stmt = $con->prepare($sql);
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
@@ -246,7 +259,8 @@ abstract class BaseAreaQuery extends ModelCriteria
* <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
* $query->filterById(array('min' => 12)); // WHERE id >= 12
* $query->filterById(array('max' => 12)); // WHERE id <= 12
* </code>
*
* @param mixed $id The value to use as filter.
@@ -259,8 +273,22 @@ abstract class BaseAreaQuery extends ModelCriteria
*/
public function filterById($id = null, $comparison = null)
{
if (is_array($id) && null === $comparison) {
$comparison = Criteria::IN;
if (is_array($id)) {
$useMinMax = false;
if (isset($id['min'])) {
$this->addUsingAlias(AreaPeer::ID, $id['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($id['max'])) {
$this->addUsingAlias(AreaPeer::ID, $id['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(AreaPeer::ID, $id, $comparison);
@@ -302,7 +330,8 @@ abstract class BaseAreaQuery extends ModelCriteria
* <code>
* $query->filterByUnit(1234); // WHERE unit = 1234
* $query->filterByUnit(array(12, 34)); // WHERE unit IN (12, 34)
* $query->filterByUnit(array('min' => 12)); // WHERE unit > 12
* $query->filterByUnit(array('min' => 12)); // WHERE unit >= 12
* $query->filterByUnit(array('max' => 12)); // WHERE unit <= 12
* </code>
*
* @param mixed $unit The value to use as filter.
@@ -428,8 +457,8 @@ abstract class BaseAreaQuery extends ModelCriteria
* @param Country|PropelObjectCollection $country the related object to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return AreaQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
* @return AreaQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByCountry($country, $comparison = null)
{
@@ -502,8 +531,8 @@ abstract class BaseAreaQuery extends ModelCriteria
* @param Delivzone|PropelObjectCollection $delivzone the related object to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return AreaQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
* @return AreaQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByDelivzone($delivzone, $comparison = null)
{

View File

@@ -117,13 +117,19 @@ abstract class BaseAttribute extends BaseObject implements Persistent
*/
protected $alreadyInValidation = false;
/**
* Flag to prevent endless clearAllReferences($deep=true) loop, if this object is referenced
* @var boolean
*/
protected $alreadyInClearAllReferencesDeep = false;
// i18n behavior
/**
* Current locale
* @var string
*/
protected $currentLocale = 'en_EN';
protected $currentLocale = 'en_US';
/**
* Current translation objects
@@ -194,22 +200,25 @@ abstract class BaseAttribute extends BaseObject implements Persistent
// while technically this is not a default value of null,
// this seems to be closest in meaning.
return null;
} else {
try {
$dt = new DateTime($this->created_at);
} catch (Exception $x) {
throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->created_at, true), $x);
}
}
try {
$dt = new DateTime($this->created_at);
} catch (Exception $x) {
throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->created_at, true), $x);
}
if ($format === null) {
// Because propel.useDateTimeClass is true, we return a DateTime object.
return $dt;
} elseif (strpos($format, '%') !== false) {
return strftime($format, $dt->format('U'));
} else {
return $dt->format($format);
}
if (strpos($format, '%') !== false) {
return strftime($format, $dt->format('U'));
}
return $dt->format($format);
}
/**
@@ -231,22 +240,25 @@ abstract class BaseAttribute extends BaseObject implements Persistent
// while technically this is not a default value of null,
// this seems to be closest in meaning.
return null;
} else {
try {
$dt = new DateTime($this->updated_at);
} catch (Exception $x) {
throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->updated_at, true), $x);
}
}
try {
$dt = new DateTime($this->updated_at);
} catch (Exception $x) {
throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->updated_at, true), $x);
}
if ($format === null) {
// Because propel.useDateTimeClass is true, we return a DateTime object.
return $dt;
} elseif (strpos($format, '%') !== false) {
return strftime($format, $dt->format('U'));
} else {
return $dt->format($format);
}
if (strpos($format, '%') !== false) {
return strftime($format, $dt->format('U'));
}
return $dt->format($format);
}
/**
@@ -257,7 +269,7 @@ abstract class BaseAttribute extends BaseObject implements Persistent
*/
public function setId($v)
{
if ($v !== null) {
if ($v !== null && is_numeric($v)) {
$v = (int) $v;
}
@@ -278,7 +290,7 @@ abstract class BaseAttribute extends BaseObject implements Persistent
*/
public function setPosition($v)
{
if ($v !== null) {
if ($v !== null && is_numeric($v)) {
$v = (int) $v;
}
@@ -380,7 +392,7 @@ abstract class BaseAttribute extends BaseObject implements Persistent
if ($rehydrate) {
$this->ensureConsistency();
}
$this->postHydrate($row, $startcol, $rehydrate);
return $startcol + 4; // 4 = AttributePeer::NUM_HYDRATE_COLUMNS.
} catch (Exception $e) {
@@ -597,7 +609,7 @@ abstract class BaseAttribute extends BaseObject implements Persistent
if ($this->collAttributeAvs !== null) {
foreach ($this->collAttributeAvs as $referrerFK) {
if (!$referrerFK->isDeleted()) {
if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) {
$affectedRows += $referrerFK->save($con);
}
}
@@ -614,7 +626,7 @@ abstract class BaseAttribute extends BaseObject implements Persistent
if ($this->collAttributeCombinations !== null) {
foreach ($this->collAttributeCombinations as $referrerFK) {
if (!$referrerFK->isDeleted()) {
if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) {
$affectedRows += $referrerFK->save($con);
}
}
@@ -631,7 +643,7 @@ abstract class BaseAttribute extends BaseObject implements Persistent
if ($this->collAttributeCategorys !== null) {
foreach ($this->collAttributeCategorys as $referrerFK) {
if (!$referrerFK->isDeleted()) {
if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) {
$affectedRows += $referrerFK->save($con);
}
}
@@ -648,7 +660,7 @@ abstract class BaseAttribute extends BaseObject implements Persistent
if ($this->collAttributeI18ns !== null) {
foreach ($this->collAttributeI18ns as $referrerFK) {
if (!$referrerFK->isDeleted()) {
if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) {
$affectedRows += $referrerFK->save($con);
}
}
@@ -681,16 +693,16 @@ abstract class BaseAttribute extends BaseObject implements Persistent
// check the columns in natural order for more readable SQL queries
if ($this->isColumnModified(AttributePeer::ID)) {
$modifiedColumns[':p' . $index++] = '`ID`';
$modifiedColumns[':p' . $index++] = '`id`';
}
if ($this->isColumnModified(AttributePeer::POSITION)) {
$modifiedColumns[':p' . $index++] = '`POSITION`';
$modifiedColumns[':p' . $index++] = '`position`';
}
if ($this->isColumnModified(AttributePeer::CREATED_AT)) {
$modifiedColumns[':p' . $index++] = '`CREATED_AT`';
$modifiedColumns[':p' . $index++] = '`created_at`';
}
if ($this->isColumnModified(AttributePeer::UPDATED_AT)) {
$modifiedColumns[':p' . $index++] = '`UPDATED_AT`';
$modifiedColumns[':p' . $index++] = '`updated_at`';
}
$sql = sprintf(
@@ -703,16 +715,16 @@ abstract class BaseAttribute extends BaseObject implements Persistent
$stmt = $con->prepare($sql);
foreach ($modifiedColumns as $identifier => $columnName) {
switch ($columnName) {
case '`ID`':
case '`id`':
$stmt->bindValue($identifier, $this->id, PDO::PARAM_INT);
break;
case '`POSITION`':
case '`position`':
$stmt->bindValue($identifier, $this->position, PDO::PARAM_INT);
break;
case '`CREATED_AT`':
case '`created_at`':
$stmt->bindValue($identifier, $this->created_at, PDO::PARAM_STR);
break;
case '`UPDATED_AT`':
case '`updated_at`':
$stmt->bindValue($identifier, $this->updated_at, PDO::PARAM_STR);
break;
}
@@ -783,11 +795,11 @@ abstract class BaseAttribute extends BaseObject implements Persistent
$this->validationFailures = array();
return true;
} else {
$this->validationFailures = $res;
return false;
}
$this->validationFailures = $res;
return false;
}
/**
@@ -1208,13 +1220,15 @@ abstract class BaseAttribute extends BaseObject implements Persistent
* This does not modify the database; however, it will remove any associated objects, causing
* them to be refetched by subsequent calls to accessor method.
*
* @return void
* @return Attribute The current object (for fluent API support)
* @see addAttributeAvs()
*/
public function clearAttributeAvs()
{
$this->collAttributeAvs = null; // important to set this to null since that means it is uninitialized
$this->collAttributeAvsPartial = null;
return $this;
}
/**
@@ -1286,6 +1300,7 @@ abstract class BaseAttribute extends BaseObject implements Persistent
$this->collAttributeAvsPartial = true;
}
$collAttributeAvs->getInternalIterator()->rewind();
return $collAttributeAvs;
}
@@ -1313,12 +1328,15 @@ abstract class BaseAttribute extends BaseObject implements Persistent
*
* @param PropelCollection $attributeAvs A Propel collection.
* @param PropelPDO $con Optional connection object
* @return Attribute The current object (for fluent API support)
*/
public function setAttributeAvs(PropelCollection $attributeAvs, PropelPDO $con = null)
{
$this->attributeAvsScheduledForDeletion = $this->getAttributeAvs(new Criteria(), $con)->diff($attributeAvs);
$attributeAvsToDelete = $this->getAttributeAvs(new Criteria(), $con)->diff($attributeAvs);
foreach ($this->attributeAvsScheduledForDeletion as $attributeAvRemoved) {
$this->attributeAvsScheduledForDeletion = unserialize(serialize($attributeAvsToDelete));
foreach ($attributeAvsToDelete as $attributeAvRemoved) {
$attributeAvRemoved->setAttribute(null);
}
@@ -1329,6 +1347,8 @@ abstract class BaseAttribute extends BaseObject implements Persistent
$this->collAttributeAvs = $attributeAvs;
$this->collAttributeAvsPartial = false;
return $this;
}
/**
@@ -1346,22 +1366,22 @@ abstract class BaseAttribute extends BaseObject implements Persistent
if (null === $this->collAttributeAvs || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collAttributeAvs) {
return 0;
} else {
if($partial && !$criteria) {
return count($this->getAttributeAvs());
}
$query = AttributeAvQuery::create(null, $criteria);
if ($distinct) {
$query->distinct();
}
return $query
->filterByAttribute($this)
->count($con);
}
} else {
return count($this->collAttributeAvs);
if($partial && !$criteria) {
return count($this->getAttributeAvs());
}
$query = AttributeAvQuery::create(null, $criteria);
if ($distinct) {
$query->distinct();
}
return $query
->filterByAttribute($this)
->count($con);
}
return count($this->collAttributeAvs);
}
/**
@@ -1377,7 +1397,7 @@ abstract class BaseAttribute extends BaseObject implements Persistent
$this->initAttributeAvs();
$this->collAttributeAvsPartial = true;
}
if (!$this->collAttributeAvs->contains($l)) { // only add it if the **same** object is not already associated
if (!in_array($l, $this->collAttributeAvs->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
$this->doAddAttributeAv($l);
}
@@ -1395,6 +1415,7 @@ abstract class BaseAttribute extends BaseObject implements Persistent
/**
* @param AttributeAv $attributeAv The attributeAv object to remove.
* @return Attribute The current object (for fluent API support)
*/
public function removeAttributeAv($attributeAv)
{
@@ -1404,9 +1425,11 @@ abstract class BaseAttribute extends BaseObject implements Persistent
$this->attributeAvsScheduledForDeletion = clone $this->collAttributeAvs;
$this->attributeAvsScheduledForDeletion->clear();
}
$this->attributeAvsScheduledForDeletion[]= $attributeAv;
$this->attributeAvsScheduledForDeletion[]= clone $attributeAv;
$attributeAv->setAttribute(null);
}
return $this;
}
/**
@@ -1415,13 +1438,15 @@ abstract class BaseAttribute extends BaseObject implements Persistent
* This does not modify the database; however, it will remove any associated objects, causing
* them to be refetched by subsequent calls to accessor method.
*
* @return void
* @return Attribute The current object (for fluent API support)
* @see addAttributeCombinations()
*/
public function clearAttributeCombinations()
{
$this->collAttributeCombinations = null; // important to set this to null since that means it is uninitialized
$this->collAttributeCombinationsPartial = null;
return $this;
}
/**
@@ -1493,6 +1518,7 @@ abstract class BaseAttribute extends BaseObject implements Persistent
$this->collAttributeCombinationsPartial = true;
}
$collAttributeCombinations->getInternalIterator()->rewind();
return $collAttributeCombinations;
}
@@ -1520,12 +1546,15 @@ abstract class BaseAttribute extends BaseObject implements Persistent
*
* @param PropelCollection $attributeCombinations A Propel collection.
* @param PropelPDO $con Optional connection object
* @return Attribute The current object (for fluent API support)
*/
public function setAttributeCombinations(PropelCollection $attributeCombinations, PropelPDO $con = null)
{
$this->attributeCombinationsScheduledForDeletion = $this->getAttributeCombinations(new Criteria(), $con)->diff($attributeCombinations);
$attributeCombinationsToDelete = $this->getAttributeCombinations(new Criteria(), $con)->diff($attributeCombinations);
foreach ($this->attributeCombinationsScheduledForDeletion as $attributeCombinationRemoved) {
$this->attributeCombinationsScheduledForDeletion = unserialize(serialize($attributeCombinationsToDelete));
foreach ($attributeCombinationsToDelete as $attributeCombinationRemoved) {
$attributeCombinationRemoved->setAttribute(null);
}
@@ -1536,6 +1565,8 @@ abstract class BaseAttribute extends BaseObject implements Persistent
$this->collAttributeCombinations = $attributeCombinations;
$this->collAttributeCombinationsPartial = false;
return $this;
}
/**
@@ -1553,22 +1584,22 @@ abstract class BaseAttribute extends BaseObject implements Persistent
if (null === $this->collAttributeCombinations || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collAttributeCombinations) {
return 0;
} else {
if($partial && !$criteria) {
return count($this->getAttributeCombinations());
}
$query = AttributeCombinationQuery::create(null, $criteria);
if ($distinct) {
$query->distinct();
}
return $query
->filterByAttribute($this)
->count($con);
}
} else {
return count($this->collAttributeCombinations);
if($partial && !$criteria) {
return count($this->getAttributeCombinations());
}
$query = AttributeCombinationQuery::create(null, $criteria);
if ($distinct) {
$query->distinct();
}
return $query
->filterByAttribute($this)
->count($con);
}
return count($this->collAttributeCombinations);
}
/**
@@ -1584,7 +1615,7 @@ abstract class BaseAttribute extends BaseObject implements Persistent
$this->initAttributeCombinations();
$this->collAttributeCombinationsPartial = true;
}
if (!$this->collAttributeCombinations->contains($l)) { // only add it if the **same** object is not already associated
if (!in_array($l, $this->collAttributeCombinations->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
$this->doAddAttributeCombination($l);
}
@@ -1602,6 +1633,7 @@ abstract class BaseAttribute extends BaseObject implements Persistent
/**
* @param AttributeCombination $attributeCombination The attributeCombination object to remove.
* @return Attribute The current object (for fluent API support)
*/
public function removeAttributeCombination($attributeCombination)
{
@@ -1611,9 +1643,11 @@ abstract class BaseAttribute extends BaseObject implements Persistent
$this->attributeCombinationsScheduledForDeletion = clone $this->collAttributeCombinations;
$this->attributeCombinationsScheduledForDeletion->clear();
}
$this->attributeCombinationsScheduledForDeletion[]= $attributeCombination;
$this->attributeCombinationsScheduledForDeletion[]= clone $attributeCombination;
$attributeCombination->setAttribute(null);
}
return $this;
}
@@ -1672,13 +1706,15 @@ abstract class BaseAttribute extends BaseObject implements Persistent
* This does not modify the database; however, it will remove any associated objects, causing
* them to be refetched by subsequent calls to accessor method.
*
* @return void
* @return Attribute The current object (for fluent API support)
* @see addAttributeCategorys()
*/
public function clearAttributeCategorys()
{
$this->collAttributeCategorys = null; // important to set this to null since that means it is uninitialized
$this->collAttributeCategorysPartial = null;
return $this;
}
/**
@@ -1750,6 +1786,7 @@ abstract class BaseAttribute extends BaseObject implements Persistent
$this->collAttributeCategorysPartial = true;
}
$collAttributeCategorys->getInternalIterator()->rewind();
return $collAttributeCategorys;
}
@@ -1777,12 +1814,15 @@ abstract class BaseAttribute extends BaseObject implements Persistent
*
* @param PropelCollection $attributeCategorys A Propel collection.
* @param PropelPDO $con Optional connection object
* @return Attribute The current object (for fluent API support)
*/
public function setAttributeCategorys(PropelCollection $attributeCategorys, PropelPDO $con = null)
{
$this->attributeCategorysScheduledForDeletion = $this->getAttributeCategorys(new Criteria(), $con)->diff($attributeCategorys);
$attributeCategorysToDelete = $this->getAttributeCategorys(new Criteria(), $con)->diff($attributeCategorys);
foreach ($this->attributeCategorysScheduledForDeletion as $attributeCategoryRemoved) {
$this->attributeCategorysScheduledForDeletion = unserialize(serialize($attributeCategorysToDelete));
foreach ($attributeCategorysToDelete as $attributeCategoryRemoved) {
$attributeCategoryRemoved->setAttribute(null);
}
@@ -1793,6 +1833,8 @@ abstract class BaseAttribute extends BaseObject implements Persistent
$this->collAttributeCategorys = $attributeCategorys;
$this->collAttributeCategorysPartial = false;
return $this;
}
/**
@@ -1810,22 +1852,22 @@ abstract class BaseAttribute extends BaseObject implements Persistent
if (null === $this->collAttributeCategorys || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collAttributeCategorys) {
return 0;
} else {
if($partial && !$criteria) {
return count($this->getAttributeCategorys());
}
$query = AttributeCategoryQuery::create(null, $criteria);
if ($distinct) {
$query->distinct();
}
return $query
->filterByAttribute($this)
->count($con);
}
} else {
return count($this->collAttributeCategorys);
if($partial && !$criteria) {
return count($this->getAttributeCategorys());
}
$query = AttributeCategoryQuery::create(null, $criteria);
if ($distinct) {
$query->distinct();
}
return $query
->filterByAttribute($this)
->count($con);
}
return count($this->collAttributeCategorys);
}
/**
@@ -1841,7 +1883,7 @@ abstract class BaseAttribute extends BaseObject implements Persistent
$this->initAttributeCategorys();
$this->collAttributeCategorysPartial = true;
}
if (!$this->collAttributeCategorys->contains($l)) { // only add it if the **same** object is not already associated
if (!in_array($l, $this->collAttributeCategorys->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
$this->doAddAttributeCategory($l);
}
@@ -1859,6 +1901,7 @@ abstract class BaseAttribute extends BaseObject implements Persistent
/**
* @param AttributeCategory $attributeCategory The attributeCategory object to remove.
* @return Attribute The current object (for fluent API support)
*/
public function removeAttributeCategory($attributeCategory)
{
@@ -1868,9 +1911,11 @@ abstract class BaseAttribute extends BaseObject implements Persistent
$this->attributeCategorysScheduledForDeletion = clone $this->collAttributeCategorys;
$this->attributeCategorysScheduledForDeletion->clear();
}
$this->attributeCategorysScheduledForDeletion[]= $attributeCategory;
$this->attributeCategorysScheduledForDeletion[]= clone $attributeCategory;
$attributeCategory->setAttribute(null);
}
return $this;
}
@@ -1904,13 +1949,15 @@ abstract class BaseAttribute extends BaseObject implements Persistent
* This does not modify the database; however, it will remove any associated objects, causing
* them to be refetched by subsequent calls to accessor method.
*
* @return void
* @return Attribute The current object (for fluent API support)
* @see addAttributeI18ns()
*/
public function clearAttributeI18ns()
{
$this->collAttributeI18ns = null; // important to set this to null since that means it is uninitialized
$this->collAttributeI18nsPartial = null;
return $this;
}
/**
@@ -1982,6 +2029,7 @@ abstract class BaseAttribute extends BaseObject implements Persistent
$this->collAttributeI18nsPartial = true;
}
$collAttributeI18ns->getInternalIterator()->rewind();
return $collAttributeI18ns;
}
@@ -2009,12 +2057,15 @@ abstract class BaseAttribute extends BaseObject implements Persistent
*
* @param PropelCollection $attributeI18ns A Propel collection.
* @param PropelPDO $con Optional connection object
* @return Attribute The current object (for fluent API support)
*/
public function setAttributeI18ns(PropelCollection $attributeI18ns, PropelPDO $con = null)
{
$this->attributeI18nsScheduledForDeletion = $this->getAttributeI18ns(new Criteria(), $con)->diff($attributeI18ns);
$attributeI18nsToDelete = $this->getAttributeI18ns(new Criteria(), $con)->diff($attributeI18ns);
foreach ($this->attributeI18nsScheduledForDeletion as $attributeI18nRemoved) {
$this->attributeI18nsScheduledForDeletion = unserialize(serialize($attributeI18nsToDelete));
foreach ($attributeI18nsToDelete as $attributeI18nRemoved) {
$attributeI18nRemoved->setAttribute(null);
}
@@ -2025,6 +2076,8 @@ abstract class BaseAttribute extends BaseObject implements Persistent
$this->collAttributeI18ns = $attributeI18ns;
$this->collAttributeI18nsPartial = false;
return $this;
}
/**
@@ -2042,22 +2095,22 @@ abstract class BaseAttribute extends BaseObject implements Persistent
if (null === $this->collAttributeI18ns || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collAttributeI18ns) {
return 0;
} else {
if($partial && !$criteria) {
return count($this->getAttributeI18ns());
}
$query = AttributeI18nQuery::create(null, $criteria);
if ($distinct) {
$query->distinct();
}
return $query
->filterByAttribute($this)
->count($con);
}
} else {
return count($this->collAttributeI18ns);
if($partial && !$criteria) {
return count($this->getAttributeI18ns());
}
$query = AttributeI18nQuery::create(null, $criteria);
if ($distinct) {
$query->distinct();
}
return $query
->filterByAttribute($this)
->count($con);
}
return count($this->collAttributeI18ns);
}
/**
@@ -2077,7 +2130,7 @@ abstract class BaseAttribute extends BaseObject implements Persistent
$this->initAttributeI18ns();
$this->collAttributeI18nsPartial = true;
}
if (!$this->collAttributeI18ns->contains($l)) { // only add it if the **same** object is not already associated
if (!in_array($l, $this->collAttributeI18ns->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
$this->doAddAttributeI18n($l);
}
@@ -2095,6 +2148,7 @@ abstract class BaseAttribute extends BaseObject implements Persistent
/**
* @param AttributeI18n $attributeI18n The attributeI18n object to remove.
* @return Attribute The current object (for fluent API support)
*/
public function removeAttributeI18n($attributeI18n)
{
@@ -2104,9 +2158,11 @@ abstract class BaseAttribute extends BaseObject implements Persistent
$this->attributeI18nsScheduledForDeletion = clone $this->collAttributeI18ns;
$this->attributeI18nsScheduledForDeletion->clear();
}
$this->attributeI18nsScheduledForDeletion[]= $attributeI18n;
$this->attributeI18nsScheduledForDeletion[]= clone $attributeI18n;
$attributeI18n->setAttribute(null);
}
return $this;
}
/**
@@ -2120,6 +2176,7 @@ abstract class BaseAttribute extends BaseObject implements Persistent
$this->updated_at = null;
$this->alreadyInSave = false;
$this->alreadyInValidation = false;
$this->alreadyInClearAllReferencesDeep = false;
$this->clearAllReferences();
$this->resetModified();
$this->setNew(true);
@@ -2137,7 +2194,8 @@ abstract class BaseAttribute extends BaseObject implements Persistent
*/
public function clearAllReferences($deep = false)
{
if ($deep) {
if ($deep && !$this->alreadyInClearAllReferencesDeep) {
$this->alreadyInClearAllReferencesDeep = true;
if ($this->collAttributeAvs) {
foreach ($this->collAttributeAvs as $o) {
$o->clearAllReferences($deep);
@@ -2158,10 +2216,12 @@ abstract class BaseAttribute extends BaseObject implements Persistent
$o->clearAllReferences($deep);
}
}
$this->alreadyInClearAllReferencesDeep = false;
} // if ($deep)
// i18n behavior
$this->currentLocale = 'en_EN';
$this->currentLocale = 'en_US';
$this->currentTranslations = null;
if ($this->collAttributeAvs instanceof PropelCollection) {
@@ -2225,7 +2285,7 @@ abstract class BaseAttribute extends BaseObject implements Persistent
*
* @return Attribute The current object (for fluent API support)
*/
public function setLocale($locale = 'en_EN')
public function setLocale($locale = 'en_US')
{
$this->currentLocale = $locale;
@@ -2249,7 +2309,7 @@ abstract class BaseAttribute extends BaseObject implements Persistent
* @param PropelPDO $con an optional connection object
*
* @return AttributeI18n */
public function getTranslation($locale = 'en_EN', PropelPDO $con = null)
public function getTranslation($locale = 'en_US', PropelPDO $con = null)
{
if (!isset($this->currentTranslations[$locale])) {
if (null !== $this->collAttributeI18ns) {
@@ -2284,7 +2344,7 @@ abstract class BaseAttribute extends BaseObject implements Persistent
*
* @return Attribute The current object (for fluent API support)
*/
public function removeTranslation($locale = 'en_EN', PropelPDO $con = null)
public function removeTranslation($locale = 'en_US', PropelPDO $con = null)
{
if (!$this->isNew()) {
AttributeI18nQuery::create()

View File

@@ -114,13 +114,19 @@ abstract class BaseAttributeAv extends BaseObject implements Persistent
*/
protected $alreadyInValidation = false;
/**
* Flag to prevent endless clearAllReferences($deep=true) loop, if this object is referenced
* @var boolean
*/
protected $alreadyInClearAllReferencesDeep = false;
// i18n behavior
/**
* Current locale
* @var string
*/
protected $currentLocale = 'en_EN';
protected $currentLocale = 'en_US';
/**
* Current translation objects
@@ -189,22 +195,25 @@ abstract class BaseAttributeAv extends BaseObject implements Persistent
// while technically this is not a default value of null,
// this seems to be closest in meaning.
return null;
} else {
try {
$dt = new DateTime($this->created_at);
} catch (Exception $x) {
throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->created_at, true), $x);
}
}
try {
$dt = new DateTime($this->created_at);
} catch (Exception $x) {
throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->created_at, true), $x);
}
if ($format === null) {
// Because propel.useDateTimeClass is true, we return a DateTime object.
return $dt;
} elseif (strpos($format, '%') !== false) {
return strftime($format, $dt->format('U'));
} else {
return $dt->format($format);
}
if (strpos($format, '%') !== false) {
return strftime($format, $dt->format('U'));
}
return $dt->format($format);
}
/**
@@ -226,22 +235,25 @@ abstract class BaseAttributeAv extends BaseObject implements Persistent
// while technically this is not a default value of null,
// this seems to be closest in meaning.
return null;
} else {
try {
$dt = new DateTime($this->updated_at);
} catch (Exception $x) {
throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->updated_at, true), $x);
}
}
try {
$dt = new DateTime($this->updated_at);
} catch (Exception $x) {
throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->updated_at, true), $x);
}
if ($format === null) {
// Because propel.useDateTimeClass is true, we return a DateTime object.
return $dt;
} elseif (strpos($format, '%') !== false) {
return strftime($format, $dt->format('U'));
} else {
return $dt->format($format);
}
if (strpos($format, '%') !== false) {
return strftime($format, $dt->format('U'));
}
return $dt->format($format);
}
/**
@@ -252,7 +264,7 @@ abstract class BaseAttributeAv extends BaseObject implements Persistent
*/
public function setId($v)
{
if ($v !== null) {
if ($v !== null && is_numeric($v)) {
$v = (int) $v;
}
@@ -273,7 +285,7 @@ abstract class BaseAttributeAv extends BaseObject implements Persistent
*/
public function setAttributeId($v)
{
if ($v !== null) {
if ($v !== null && is_numeric($v)) {
$v = (int) $v;
}
@@ -298,7 +310,7 @@ abstract class BaseAttributeAv extends BaseObject implements Persistent
*/
public function setPosition($v)
{
if ($v !== null) {
if ($v !== null && is_numeric($v)) {
$v = (int) $v;
}
@@ -401,7 +413,7 @@ abstract class BaseAttributeAv extends BaseObject implements Persistent
if ($rehydrate) {
$this->ensureConsistency();
}
$this->postHydrate($row, $startcol, $rehydrate);
return $startcol + 5; // 5 = AttributeAvPeer::NUM_HYDRATE_COLUMNS.
} catch (Exception $e) {
@@ -630,7 +642,7 @@ abstract class BaseAttributeAv extends BaseObject implements Persistent
if ($this->collAttributeCombinations !== null) {
foreach ($this->collAttributeCombinations as $referrerFK) {
if (!$referrerFK->isDeleted()) {
if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) {
$affectedRows += $referrerFK->save($con);
}
}
@@ -647,7 +659,7 @@ abstract class BaseAttributeAv extends BaseObject implements Persistent
if ($this->collAttributeAvI18ns !== null) {
foreach ($this->collAttributeAvI18ns as $referrerFK) {
if (!$referrerFK->isDeleted()) {
if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) {
$affectedRows += $referrerFK->save($con);
}
}
@@ -680,19 +692,19 @@ abstract class BaseAttributeAv extends BaseObject implements Persistent
// check the columns in natural order for more readable SQL queries
if ($this->isColumnModified(AttributeAvPeer::ID)) {
$modifiedColumns[':p' . $index++] = '`ID`';
$modifiedColumns[':p' . $index++] = '`id`';
}
if ($this->isColumnModified(AttributeAvPeer::ATTRIBUTE_ID)) {
$modifiedColumns[':p' . $index++] = '`ATTRIBUTE_ID`';
$modifiedColumns[':p' . $index++] = '`attribute_id`';
}
if ($this->isColumnModified(AttributeAvPeer::POSITION)) {
$modifiedColumns[':p' . $index++] = '`POSITION`';
$modifiedColumns[':p' . $index++] = '`position`';
}
if ($this->isColumnModified(AttributeAvPeer::CREATED_AT)) {
$modifiedColumns[':p' . $index++] = '`CREATED_AT`';
$modifiedColumns[':p' . $index++] = '`created_at`';
}
if ($this->isColumnModified(AttributeAvPeer::UPDATED_AT)) {
$modifiedColumns[':p' . $index++] = '`UPDATED_AT`';
$modifiedColumns[':p' . $index++] = '`updated_at`';
}
$sql = sprintf(
@@ -705,19 +717,19 @@ abstract class BaseAttributeAv extends BaseObject implements Persistent
$stmt = $con->prepare($sql);
foreach ($modifiedColumns as $identifier => $columnName) {
switch ($columnName) {
case '`ID`':
case '`id`':
$stmt->bindValue($identifier, $this->id, PDO::PARAM_INT);
break;
case '`ATTRIBUTE_ID`':
case '`attribute_id`':
$stmt->bindValue($identifier, $this->attribute_id, PDO::PARAM_INT);
break;
case '`POSITION`':
case '`position`':
$stmt->bindValue($identifier, $this->position, PDO::PARAM_INT);
break;
case '`CREATED_AT`':
case '`created_at`':
$stmt->bindValue($identifier, $this->created_at, PDO::PARAM_STR);
break;
case '`UPDATED_AT`':
case '`updated_at`':
$stmt->bindValue($identifier, $this->updated_at, PDO::PARAM_STR);
break;
}
@@ -788,11 +800,11 @@ abstract class BaseAttributeAv extends BaseObject implements Persistent
$this->validationFailures = array();
return true;
} else {
$this->validationFailures = $res;
return false;
}
$this->validationFailures = $res;
return false;
}
/**
@@ -1205,12 +1217,13 @@ abstract class BaseAttributeAv extends BaseObject implements Persistent
* Get the associated Attribute object
*
* @param PropelPDO $con Optional Connection object.
* @param $doQuery Executes a query to get the object if required
* @return Attribute The associated Attribute object.
* @throws PropelException
*/
public function getAttribute(PropelPDO $con = null)
public function getAttribute(PropelPDO $con = null, $doQuery = true)
{
if ($this->aAttribute === null && ($this->attribute_id !== null)) {
if ($this->aAttribute === null && ($this->attribute_id !== null) && $doQuery) {
$this->aAttribute = AttributeQuery::create()->findPk($this->attribute_id, $con);
/* The following can be used additionally to
guarantee the related object contains a reference
@@ -1249,13 +1262,15 @@ abstract class BaseAttributeAv extends BaseObject implements Persistent
* This does not modify the database; however, it will remove any associated objects, causing
* them to be refetched by subsequent calls to accessor method.
*
* @return void
* @return AttributeAv The current object (for fluent API support)
* @see addAttributeCombinations()
*/
public function clearAttributeCombinations()
{
$this->collAttributeCombinations = null; // important to set this to null since that means it is uninitialized
$this->collAttributeCombinationsPartial = null;
return $this;
}
/**
@@ -1327,6 +1342,7 @@ abstract class BaseAttributeAv extends BaseObject implements Persistent
$this->collAttributeCombinationsPartial = true;
}
$collAttributeCombinations->getInternalIterator()->rewind();
return $collAttributeCombinations;
}
@@ -1354,12 +1370,15 @@ abstract class BaseAttributeAv extends BaseObject implements Persistent
*
* @param PropelCollection $attributeCombinations A Propel collection.
* @param PropelPDO $con Optional connection object
* @return AttributeAv The current object (for fluent API support)
*/
public function setAttributeCombinations(PropelCollection $attributeCombinations, PropelPDO $con = null)
{
$this->attributeCombinationsScheduledForDeletion = $this->getAttributeCombinations(new Criteria(), $con)->diff($attributeCombinations);
$attributeCombinationsToDelete = $this->getAttributeCombinations(new Criteria(), $con)->diff($attributeCombinations);
foreach ($this->attributeCombinationsScheduledForDeletion as $attributeCombinationRemoved) {
$this->attributeCombinationsScheduledForDeletion = unserialize(serialize($attributeCombinationsToDelete));
foreach ($attributeCombinationsToDelete as $attributeCombinationRemoved) {
$attributeCombinationRemoved->setAttributeAv(null);
}
@@ -1370,6 +1389,8 @@ abstract class BaseAttributeAv extends BaseObject implements Persistent
$this->collAttributeCombinations = $attributeCombinations;
$this->collAttributeCombinationsPartial = false;
return $this;
}
/**
@@ -1387,22 +1408,22 @@ abstract class BaseAttributeAv extends BaseObject implements Persistent
if (null === $this->collAttributeCombinations || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collAttributeCombinations) {
return 0;
} else {
if($partial && !$criteria) {
return count($this->getAttributeCombinations());
}
$query = AttributeCombinationQuery::create(null, $criteria);
if ($distinct) {
$query->distinct();
}
return $query
->filterByAttributeAv($this)
->count($con);
}
} else {
return count($this->collAttributeCombinations);
if($partial && !$criteria) {
return count($this->getAttributeCombinations());
}
$query = AttributeCombinationQuery::create(null, $criteria);
if ($distinct) {
$query->distinct();
}
return $query
->filterByAttributeAv($this)
->count($con);
}
return count($this->collAttributeCombinations);
}
/**
@@ -1418,7 +1439,7 @@ abstract class BaseAttributeAv extends BaseObject implements Persistent
$this->initAttributeCombinations();
$this->collAttributeCombinationsPartial = true;
}
if (!$this->collAttributeCombinations->contains($l)) { // only add it if the **same** object is not already associated
if (!in_array($l, $this->collAttributeCombinations->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
$this->doAddAttributeCombination($l);
}
@@ -1436,6 +1457,7 @@ abstract class BaseAttributeAv extends BaseObject implements Persistent
/**
* @param AttributeCombination $attributeCombination The attributeCombination object to remove.
* @return AttributeAv The current object (for fluent API support)
*/
public function removeAttributeCombination($attributeCombination)
{
@@ -1445,9 +1467,11 @@ abstract class BaseAttributeAv extends BaseObject implements Persistent
$this->attributeCombinationsScheduledForDeletion = clone $this->collAttributeCombinations;
$this->attributeCombinationsScheduledForDeletion->clear();
}
$this->attributeCombinationsScheduledForDeletion[]= $attributeCombination;
$this->attributeCombinationsScheduledForDeletion[]= clone $attributeCombination;
$attributeCombination->setAttributeAv(null);
}
return $this;
}
@@ -1506,13 +1530,15 @@ abstract class BaseAttributeAv extends BaseObject implements Persistent
* This does not modify the database; however, it will remove any associated objects, causing
* them to be refetched by subsequent calls to accessor method.
*
* @return void
* @return AttributeAv The current object (for fluent API support)
* @see addAttributeAvI18ns()
*/
public function clearAttributeAvI18ns()
{
$this->collAttributeAvI18ns = null; // important to set this to null since that means it is uninitialized
$this->collAttributeAvI18nsPartial = null;
return $this;
}
/**
@@ -1584,6 +1610,7 @@ abstract class BaseAttributeAv extends BaseObject implements Persistent
$this->collAttributeAvI18nsPartial = true;
}
$collAttributeAvI18ns->getInternalIterator()->rewind();
return $collAttributeAvI18ns;
}
@@ -1611,12 +1638,15 @@ abstract class BaseAttributeAv extends BaseObject implements Persistent
*
* @param PropelCollection $attributeAvI18ns A Propel collection.
* @param PropelPDO $con Optional connection object
* @return AttributeAv The current object (for fluent API support)
*/
public function setAttributeAvI18ns(PropelCollection $attributeAvI18ns, PropelPDO $con = null)
{
$this->attributeAvI18nsScheduledForDeletion = $this->getAttributeAvI18ns(new Criteria(), $con)->diff($attributeAvI18ns);
$attributeAvI18nsToDelete = $this->getAttributeAvI18ns(new Criteria(), $con)->diff($attributeAvI18ns);
foreach ($this->attributeAvI18nsScheduledForDeletion as $attributeAvI18nRemoved) {
$this->attributeAvI18nsScheduledForDeletion = unserialize(serialize($attributeAvI18nsToDelete));
foreach ($attributeAvI18nsToDelete as $attributeAvI18nRemoved) {
$attributeAvI18nRemoved->setAttributeAv(null);
}
@@ -1627,6 +1657,8 @@ abstract class BaseAttributeAv extends BaseObject implements Persistent
$this->collAttributeAvI18ns = $attributeAvI18ns;
$this->collAttributeAvI18nsPartial = false;
return $this;
}
/**
@@ -1644,22 +1676,22 @@ abstract class BaseAttributeAv extends BaseObject implements Persistent
if (null === $this->collAttributeAvI18ns || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collAttributeAvI18ns) {
return 0;
} else {
if($partial && !$criteria) {
return count($this->getAttributeAvI18ns());
}
$query = AttributeAvI18nQuery::create(null, $criteria);
if ($distinct) {
$query->distinct();
}
return $query
->filterByAttributeAv($this)
->count($con);
}
} else {
return count($this->collAttributeAvI18ns);
if($partial && !$criteria) {
return count($this->getAttributeAvI18ns());
}
$query = AttributeAvI18nQuery::create(null, $criteria);
if ($distinct) {
$query->distinct();
}
return $query
->filterByAttributeAv($this)
->count($con);
}
return count($this->collAttributeAvI18ns);
}
/**
@@ -1679,7 +1711,7 @@ abstract class BaseAttributeAv extends BaseObject implements Persistent
$this->initAttributeAvI18ns();
$this->collAttributeAvI18nsPartial = true;
}
if (!$this->collAttributeAvI18ns->contains($l)) { // only add it if the **same** object is not already associated
if (!in_array($l, $this->collAttributeAvI18ns->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
$this->doAddAttributeAvI18n($l);
}
@@ -1697,6 +1729,7 @@ abstract class BaseAttributeAv extends BaseObject implements Persistent
/**
* @param AttributeAvI18n $attributeAvI18n The attributeAvI18n object to remove.
* @return AttributeAv The current object (for fluent API support)
*/
public function removeAttributeAvI18n($attributeAvI18n)
{
@@ -1706,9 +1739,11 @@ abstract class BaseAttributeAv extends BaseObject implements Persistent
$this->attributeAvI18nsScheduledForDeletion = clone $this->collAttributeAvI18ns;
$this->attributeAvI18nsScheduledForDeletion->clear();
}
$this->attributeAvI18nsScheduledForDeletion[]= $attributeAvI18n;
$this->attributeAvI18nsScheduledForDeletion[]= clone $attributeAvI18n;
$attributeAvI18n->setAttributeAv(null);
}
return $this;
}
/**
@@ -1723,6 +1758,7 @@ abstract class BaseAttributeAv extends BaseObject implements Persistent
$this->updated_at = null;
$this->alreadyInSave = false;
$this->alreadyInValidation = false;
$this->alreadyInClearAllReferencesDeep = false;
$this->clearAllReferences();
$this->resetModified();
$this->setNew(true);
@@ -1740,7 +1776,8 @@ abstract class BaseAttributeAv extends BaseObject implements Persistent
*/
public function clearAllReferences($deep = false)
{
if ($deep) {
if ($deep && !$this->alreadyInClearAllReferencesDeep) {
$this->alreadyInClearAllReferencesDeep = true;
if ($this->collAttributeCombinations) {
foreach ($this->collAttributeCombinations as $o) {
$o->clearAllReferences($deep);
@@ -1751,10 +1788,15 @@ abstract class BaseAttributeAv extends BaseObject implements Persistent
$o->clearAllReferences($deep);
}
}
if ($this->aAttribute instanceof Persistent) {
$this->aAttribute->clearAllReferences($deep);
}
$this->alreadyInClearAllReferencesDeep = false;
} // if ($deep)
// i18n behavior
$this->currentLocale = 'en_EN';
$this->currentLocale = 'en_US';
$this->currentTranslations = null;
if ($this->collAttributeCombinations instanceof PropelCollection) {
@@ -1811,7 +1853,7 @@ abstract class BaseAttributeAv extends BaseObject implements Persistent
*
* @return AttributeAv The current object (for fluent API support)
*/
public function setLocale($locale = 'en_EN')
public function setLocale($locale = 'en_US')
{
$this->currentLocale = $locale;
@@ -1835,7 +1877,7 @@ abstract class BaseAttributeAv extends BaseObject implements Persistent
* @param PropelPDO $con an optional connection object
*
* @return AttributeAvI18n */
public function getTranslation($locale = 'en_EN', PropelPDO $con = null)
public function getTranslation($locale = 'en_US', PropelPDO $con = null)
{
if (!isset($this->currentTranslations[$locale])) {
if (null !== $this->collAttributeAvI18ns) {
@@ -1870,7 +1912,7 @@ abstract class BaseAttributeAv extends BaseObject implements Persistent
*
* @return AttributeAv The current object (for fluent API support)
*/
public function removeTranslation($locale = 'en_EN', PropelPDO $con = null)
public function removeTranslation($locale = 'en_US', PropelPDO $con = null)
{
if (!$this->isNew()) {
AttributeAvI18nQuery::create()

View File

@@ -53,7 +53,7 @@ abstract class BaseAttributeAvI18n extends BaseObject implements Persistent
/**
* The value for the locale field.
* Note: this column has a database default value of: 'en_EN'
* Note: this column has a database default value of: 'en_US'
* @var string
*/
protected $locale;
@@ -101,6 +101,12 @@ abstract class BaseAttributeAvI18n extends BaseObject implements Persistent
*/
protected $alreadyInValidation = false;
/**
* Flag to prevent endless clearAllReferences($deep=true) loop, if this object is referenced
* @var boolean
*/
protected $alreadyInClearAllReferencesDeep = false;
/**
* Applies default values to this object.
* This method should be called from the object's constructor (or
@@ -109,7 +115,7 @@ abstract class BaseAttributeAvI18n extends BaseObject implements Persistent
*/
public function applyDefaultValues()
{
$this->locale = 'en_EN';
$this->locale = 'en_US';
}
/**
@@ -190,7 +196,7 @@ abstract class BaseAttributeAvI18n extends BaseObject implements Persistent
*/
public function setId($v)
{
if ($v !== null) {
if ($v !== null && is_numeric($v)) {
$v = (int) $v;
}
@@ -215,7 +221,7 @@ abstract class BaseAttributeAvI18n extends BaseObject implements Persistent
*/
public function setLocale($v)
{
if ($v !== null) {
if ($v !== null && is_numeric($v)) {
$v = (string) $v;
}
@@ -236,7 +242,7 @@ abstract class BaseAttributeAvI18n extends BaseObject implements Persistent
*/
public function setTitle($v)
{
if ($v !== null) {
if ($v !== null && is_numeric($v)) {
$v = (string) $v;
}
@@ -257,7 +263,7 @@ abstract class BaseAttributeAvI18n extends BaseObject implements Persistent
*/
public function setDescription($v)
{
if ($v !== null) {
if ($v !== null && is_numeric($v)) {
$v = (string) $v;
}
@@ -278,7 +284,7 @@ abstract class BaseAttributeAvI18n extends BaseObject implements Persistent
*/
public function setChapo($v)
{
if ($v !== null) {
if ($v !== null && is_numeric($v)) {
$v = (string) $v;
}
@@ -299,7 +305,7 @@ abstract class BaseAttributeAvI18n extends BaseObject implements Persistent
*/
public function setPostscriptum($v)
{
if ($v !== null) {
if ($v !== null && is_numeric($v)) {
$v = (string) $v;
}
@@ -322,7 +328,7 @@ abstract class BaseAttributeAvI18n extends BaseObject implements Persistent
*/
public function hasOnlyDefaultValues()
{
if ($this->locale !== 'en_EN') {
if ($this->locale !== 'en_US') {
return false;
}
@@ -361,7 +367,7 @@ abstract class BaseAttributeAvI18n extends BaseObject implements Persistent
if ($rehydrate) {
$this->ensureConsistency();
}
$this->postHydrate($row, $startcol, $rehydrate);
return $startcol + 6; // 6 = AttributeAvI18nPeer::NUM_HYDRATE_COLUMNS.
} catch (Exception $e) {
@@ -587,22 +593,22 @@ abstract class BaseAttributeAvI18n extends BaseObject implements Persistent
// check the columns in natural order for more readable SQL queries
if ($this->isColumnModified(AttributeAvI18nPeer::ID)) {
$modifiedColumns[':p' . $index++] = '`ID`';
$modifiedColumns[':p' . $index++] = '`id`';
}
if ($this->isColumnModified(AttributeAvI18nPeer::LOCALE)) {
$modifiedColumns[':p' . $index++] = '`LOCALE`';
$modifiedColumns[':p' . $index++] = '`locale`';
}
if ($this->isColumnModified(AttributeAvI18nPeer::TITLE)) {
$modifiedColumns[':p' . $index++] = '`TITLE`';
$modifiedColumns[':p' . $index++] = '`title`';
}
if ($this->isColumnModified(AttributeAvI18nPeer::DESCRIPTION)) {
$modifiedColumns[':p' . $index++] = '`DESCRIPTION`';
$modifiedColumns[':p' . $index++] = '`description`';
}
if ($this->isColumnModified(AttributeAvI18nPeer::CHAPO)) {
$modifiedColumns[':p' . $index++] = '`CHAPO`';
$modifiedColumns[':p' . $index++] = '`chapo`';
}
if ($this->isColumnModified(AttributeAvI18nPeer::POSTSCRIPTUM)) {
$modifiedColumns[':p' . $index++] = '`POSTSCRIPTUM`';
$modifiedColumns[':p' . $index++] = '`postscriptum`';
}
$sql = sprintf(
@@ -615,22 +621,22 @@ abstract class BaseAttributeAvI18n extends BaseObject implements Persistent
$stmt = $con->prepare($sql);
foreach ($modifiedColumns as $identifier => $columnName) {
switch ($columnName) {
case '`ID`':
case '`id`':
$stmt->bindValue($identifier, $this->id, PDO::PARAM_INT);
break;
case '`LOCALE`':
case '`locale`':
$stmt->bindValue($identifier, $this->locale, PDO::PARAM_STR);
break;
case '`TITLE`':
case '`title`':
$stmt->bindValue($identifier, $this->title, PDO::PARAM_STR);
break;
case '`DESCRIPTION`':
case '`description`':
$stmt->bindValue($identifier, $this->description, PDO::PARAM_STR);
break;
case '`CHAPO`':
case '`chapo`':
$stmt->bindValue($identifier, $this->chapo, PDO::PARAM_STR);
break;
case '`POSTSCRIPTUM`':
case '`postscriptum`':
$stmt->bindValue($identifier, $this->postscriptum, PDO::PARAM_STR);
break;
}
@@ -694,11 +700,11 @@ abstract class BaseAttributeAvI18n extends BaseObject implements Persistent
$this->validationFailures = array();
return true;
} else {
$this->validationFailures = $res;
return false;
}
$this->validationFailures = $res;
return false;
}
/**
@@ -1094,12 +1100,13 @@ abstract class BaseAttributeAvI18n extends BaseObject implements Persistent
* Get the associated AttributeAv object
*
* @param PropelPDO $con Optional Connection object.
* @param $doQuery Executes a query to get the object if required
* @return AttributeAv The associated AttributeAv object.
* @throws PropelException
*/
public function getAttributeAv(PropelPDO $con = null)
public function getAttributeAv(PropelPDO $con = null, $doQuery = true)
{
if ($this->aAttributeAv === null && ($this->id !== null)) {
if ($this->aAttributeAv === null && ($this->id !== null) && $doQuery) {
$this->aAttributeAv = AttributeAvQuery::create()->findPk($this->id, $con);
/* The following can be used additionally to
guarantee the related object contains a reference
@@ -1126,6 +1133,7 @@ abstract class BaseAttributeAvI18n extends BaseObject implements Persistent
$this->postscriptum = null;
$this->alreadyInSave = false;
$this->alreadyInValidation = false;
$this->alreadyInClearAllReferencesDeep = false;
$this->clearAllReferences();
$this->applyDefaultValues();
$this->resetModified();
@@ -1144,7 +1152,13 @@ abstract class BaseAttributeAvI18n extends BaseObject implements Persistent
*/
public function clearAllReferences($deep = false)
{
if ($deep) {
if ($deep && !$this->alreadyInClearAllReferencesDeep) {
$this->alreadyInClearAllReferencesDeep = true;
if ($this->aAttributeAv instanceof Persistent) {
$this->aAttributeAv->clearAllReferences($deep);
}
$this->alreadyInClearAllReferencesDeep = false;
} // if ($deep)
$this->aAttributeAv = null;

View File

@@ -45,23 +45,23 @@ abstract class BaseAttributeAvI18nPeer
/** The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS) */
const NUM_HYDRATE_COLUMNS = 6;
/** the column name for the ID field */
const ID = 'attribute_av_i18n.ID';
/** the column name for the id field */
const ID = 'attribute_av_i18n.id';
/** the column name for the LOCALE field */
const LOCALE = 'attribute_av_i18n.LOCALE';
/** the column name for the locale field */
const LOCALE = 'attribute_av_i18n.locale';
/** the column name for the TITLE field */
const TITLE = 'attribute_av_i18n.TITLE';
/** the column name for the title field */
const TITLE = 'attribute_av_i18n.title';
/** the column name for the DESCRIPTION field */
const DESCRIPTION = 'attribute_av_i18n.DESCRIPTION';
/** the column name for the description field */
const DESCRIPTION = 'attribute_av_i18n.description';
/** the column name for the CHAPO field */
const CHAPO = 'attribute_av_i18n.CHAPO';
/** the column name for the chapo field */
const CHAPO = 'attribute_av_i18n.chapo';
/** the column name for the POSTSCRIPTUM field */
const POSTSCRIPTUM = 'attribute_av_i18n.POSTSCRIPTUM';
/** the column name for the postscriptum field */
const POSTSCRIPTUM = 'attribute_av_i18n.postscriptum';
/** The default string format for model objects of the related table **/
const DEFAULT_STRING_FORMAT = 'YAML';
@@ -183,12 +183,12 @@ abstract class BaseAttributeAvI18nPeer
$criteria->addSelectColumn(AttributeAvI18nPeer::CHAPO);
$criteria->addSelectColumn(AttributeAvI18nPeer::POSTSCRIPTUM);
} else {
$criteria->addSelectColumn($alias . '.ID');
$criteria->addSelectColumn($alias . '.LOCALE');
$criteria->addSelectColumn($alias . '.TITLE');
$criteria->addSelectColumn($alias . '.DESCRIPTION');
$criteria->addSelectColumn($alias . '.CHAPO');
$criteria->addSelectColumn($alias . '.POSTSCRIPTUM');
$criteria->addSelectColumn($alias . '.id');
$criteria->addSelectColumn($alias . '.locale');
$criteria->addSelectColumn($alias . '.title');
$criteria->addSelectColumn($alias . '.description');
$criteria->addSelectColumn($alias . '.chapo');
$criteria->addSelectColumn($alias . '.postscriptum');
}
}
@@ -272,7 +272,7 @@ abstract class BaseAttributeAvI18nPeer
/**
* Prepares the Criteria object and uses the parent doSelect() method to execute a PDOStatement.
*
* Use this method directly if you want to work with an executed statement durirectly (for example
* Use this method directly if you want to work with an executed statement directly (for example
* to perform your own object hydration).
*
* @param Criteria $criteria The Criteria object used to build the SELECT statement.
@@ -377,8 +377,15 @@ abstract class BaseAttributeAvI18nPeer
*
* @return void
*/
public static function clearInstancePool()
public static function clearInstancePool($and_clear_all_references = false)
{
if ($and_clear_all_references)
{
foreach (AttributeAvI18nPeer::$instances as $instance)
{
$instance->clearAllReferences(true);
}
}
AttributeAvI18nPeer::$instances = array();
}
@@ -751,7 +758,7 @@ abstract class BaseAttributeAvI18nPeer
*
* @return string ClassName
*/
public static function getOMClass()
public static function getOMClass($row = 0, $colnum = 0)
{
return AttributeAvI18nPeer::OM_CLASS;
}

View File

@@ -81,7 +81,7 @@ abstract class BaseAttributeAvI18nQuery extends ModelCriteria
* Returns a new AttributeAvI18nQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param AttributeAvI18nQuery|Criteria $criteria Optional Criteria to build the query from
* @param AttributeAvI18nQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return AttributeAvI18nQuery
*/
@@ -145,12 +145,12 @@ abstract class BaseAttributeAvI18nQuery extends ModelCriteria
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return AttributeAvI18n A model object, or null if the key is not found
* @throws PropelException
* @return AttributeAvI18n A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT `ID`, `LOCALE`, `TITLE`, `DESCRIPTION`, `CHAPO`, `POSTSCRIPTUM` FROM `attribute_av_i18n` WHERE `ID` = :p0 AND `LOCALE` = :p1';
$sql = 'SELECT `id`, `locale`, `title`, `description`, `chapo`, `postscriptum` FROM `attribute_av_i18n` WHERE `id` = :p0 AND `locale` = :p1';
try {
$stmt = $con->prepare($sql);
$stmt->bindValue(':p0', $key[0], PDO::PARAM_INT);
@@ -258,7 +258,8 @@ abstract class BaseAttributeAvI18nQuery extends ModelCriteria
* <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
* $query->filterById(array('min' => 12)); // WHERE id >= 12
* $query->filterById(array('max' => 12)); // WHERE id <= 12
* </code>
*
* @see filterByAttributeAv()
@@ -273,8 +274,22 @@ abstract class BaseAttributeAvI18nQuery extends ModelCriteria
*/
public function filterById($id = null, $comparison = null)
{
if (is_array($id) && null === $comparison) {
$comparison = Criteria::IN;
if (is_array($id)) {
$useMinMax = false;
if (isset($id['min'])) {
$this->addUsingAlias(AttributeAvI18nPeer::ID, $id['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($id['max'])) {
$this->addUsingAlias(AttributeAvI18nPeer::ID, $id['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(AttributeAvI18nPeer::ID, $id, $comparison);
@@ -431,8 +446,8 @@ abstract class BaseAttributeAvI18nQuery extends ModelCriteria
* @param AttributeAv|PropelObjectCollection $attributeAv The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return AttributeAvI18nQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
* @return AttributeAvI18nQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByAttributeAv($attributeAv, $comparison = null)
{

Some files were not shown because too many files have changed in this diff Show More