diff --git a/core/lib/Thelia/Model/Base/Address.php b/core/lib/Thelia/Model/Base/Address.php index 4605db484..4a017946d 100755 --- a/core/lib/Thelia/Model/Base/Address.php +++ b/core/lib/Thelia/Model/Base/Address.php @@ -152,11 +152,11 @@ abstract class Address implements ActiveRecordInterface protected $cellphone; /** - * The value for the default field. + * The value for the is_default field. * Note: this column has a database default value of: 0 * @var int */ - protected $default; + protected $is_default; /** * The value for the created_at field. @@ -220,7 +220,7 @@ abstract class Address implements ActiveRecordInterface */ public function applyDefaultValues() { - $this->default = 0; + $this->is_default = 0; } /** @@ -645,14 +645,14 @@ abstract class Address implements ActiveRecordInterface } /** - * Get the [default] column value. + * Get the [is_default] column value. * * @return int */ - public function getDefault() + public function getIsDefault() { - return $this->default; + return $this->is_default; } /** @@ -1019,25 +1019,25 @@ abstract class Address implements ActiveRecordInterface } // setCellphone() /** - * Set the value of [default] column. + * Set the value of [is_default] column. * * @param int $v new value * @return \Thelia\Model\Address The current object (for fluent API support) */ - public function setDefault($v) + public function setIsDefault($v) { if ($v !== null) { $v = (int) $v; } - if ($this->default !== $v) { - $this->default = $v; - $this->modifiedColumns[] = AddressTableMap::DEFAULT; + if ($this->is_default !== $v) { + $this->is_default = $v; + $this->modifiedColumns[] = AddressTableMap::IS_DEFAULT; } return $this; - } // setDefault() + } // setIsDefault() /** * Sets the value of [created_at] column to a normalized version of the date/time value specified. @@ -1091,7 +1091,7 @@ abstract class Address implements ActiveRecordInterface */ public function hasOnlyDefaultValues() { - if ($this->default !== 0) { + if ($this->is_default !== 0) { return false; } @@ -1167,8 +1167,8 @@ abstract class Address implements ActiveRecordInterface $col = $row[TableMap::TYPE_NUM == $indexType ? 14 + $startcol : AddressTableMap::translateFieldName('Cellphone', TableMap::TYPE_PHPNAME, $indexType)]; $this->cellphone = (null !== $col) ? (string) $col : null; - $col = $row[TableMap::TYPE_NUM == $indexType ? 15 + $startcol : AddressTableMap::translateFieldName('Default', TableMap::TYPE_PHPNAME, $indexType)]; - $this->default = (null !== $col) ? (int) $col : null; + $col = $row[TableMap::TYPE_NUM == $indexType ? 15 + $startcol : AddressTableMap::translateFieldName('IsDefault', TableMap::TYPE_PHPNAME, $indexType)]; + $this->is_default = (null !== $col) ? (int) $col : null; $col = $row[TableMap::TYPE_NUM == $indexType ? 16 + $startcol : AddressTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)]; if ($col === '0000-00-00 00:00:00') { @@ -1521,8 +1521,8 @@ abstract class Address implements ActiveRecordInterface if ($this->isColumnModified(AddressTableMap::CELLPHONE)) { $modifiedColumns[':p' . $index++] = 'CELLPHONE'; } - if ($this->isColumnModified(AddressTableMap::DEFAULT)) { - $modifiedColumns[':p' . $index++] = 'DEFAULT'; + if ($this->isColumnModified(AddressTableMap::IS_DEFAULT)) { + $modifiedColumns[':p' . $index++] = 'IS_DEFAULT'; } if ($this->isColumnModified(AddressTableMap::CREATED_AT)) { $modifiedColumns[':p' . $index++] = 'CREATED_AT'; @@ -1586,8 +1586,8 @@ abstract class Address implements ActiveRecordInterface case 'CELLPHONE': $stmt->bindValue($identifier, $this->cellphone, PDO::PARAM_STR); break; - case 'DEFAULT': - $stmt->bindValue($identifier, $this->default, PDO::PARAM_INT); + case 'IS_DEFAULT': + $stmt->bindValue($identifier, $this->is_default, PDO::PARAM_INT); break; case 'CREATED_AT': $stmt->bindValue($identifier, $this->created_at ? $this->created_at->format("Y-m-d H:i:s") : null, PDO::PARAM_STR); @@ -1703,7 +1703,7 @@ abstract class Address implements ActiveRecordInterface return $this->getCellphone(); break; case 15: - return $this->getDefault(); + return $this->getIsDefault(); break; case 16: return $this->getCreatedAt(); @@ -1755,7 +1755,7 @@ abstract class Address implements ActiveRecordInterface $keys[12] => $this->getCountryId(), $keys[13] => $this->getPhone(), $keys[14] => $this->getCellphone(), - $keys[15] => $this->getDefault(), + $keys[15] => $this->getIsDefault(), $keys[16] => $this->getCreatedAt(), $keys[17] => $this->getUpdatedAt(), ); @@ -1858,7 +1858,7 @@ abstract class Address implements ActiveRecordInterface $this->setCellphone($value); break; case 15: - $this->setDefault($value); + $this->setIsDefault($value); break; case 16: $this->setCreatedAt($value); @@ -1905,7 +1905,7 @@ abstract class Address implements ActiveRecordInterface if (array_key_exists($keys[12], $arr)) $this->setCountryId($arr[$keys[12]]); if (array_key_exists($keys[13], $arr)) $this->setPhone($arr[$keys[13]]); if (array_key_exists($keys[14], $arr)) $this->setCellphone($arr[$keys[14]]); - if (array_key_exists($keys[15], $arr)) $this->setDefault($arr[$keys[15]]); + if (array_key_exists($keys[15], $arr)) $this->setIsDefault($arr[$keys[15]]); if (array_key_exists($keys[16], $arr)) $this->setCreatedAt($arr[$keys[16]]); if (array_key_exists($keys[17], $arr)) $this->setUpdatedAt($arr[$keys[17]]); } @@ -1934,7 +1934,7 @@ abstract class Address implements ActiveRecordInterface if ($this->isColumnModified(AddressTableMap::COUNTRY_ID)) $criteria->add(AddressTableMap::COUNTRY_ID, $this->country_id); if ($this->isColumnModified(AddressTableMap::PHONE)) $criteria->add(AddressTableMap::PHONE, $this->phone); if ($this->isColumnModified(AddressTableMap::CELLPHONE)) $criteria->add(AddressTableMap::CELLPHONE, $this->cellphone); - if ($this->isColumnModified(AddressTableMap::DEFAULT)) $criteria->add(AddressTableMap::DEFAULT, $this->default); + if ($this->isColumnModified(AddressTableMap::IS_DEFAULT)) $criteria->add(AddressTableMap::IS_DEFAULT, $this->is_default); if ($this->isColumnModified(AddressTableMap::CREATED_AT)) $criteria->add(AddressTableMap::CREATED_AT, $this->created_at); if ($this->isColumnModified(AddressTableMap::UPDATED_AT)) $criteria->add(AddressTableMap::UPDATED_AT, $this->updated_at); @@ -2014,7 +2014,7 @@ abstract class Address implements ActiveRecordInterface $copyObj->setCountryId($this->getCountryId()); $copyObj->setPhone($this->getPhone()); $copyObj->setCellphone($this->getCellphone()); - $copyObj->setDefault($this->getDefault()); + $copyObj->setIsDefault($this->getIsDefault()); $copyObj->setCreatedAt($this->getCreatedAt()); $copyObj->setUpdatedAt($this->getUpdatedAt()); @@ -2742,7 +2742,7 @@ abstract class Address implements ActiveRecordInterface $this->country_id = null; $this->phone = null; $this->cellphone = null; - $this->default = null; + $this->is_default = null; $this->created_at = null; $this->updated_at = null; $this->alreadyInSave = false; diff --git a/core/lib/Thelia/Model/Base/AddressQuery.php b/core/lib/Thelia/Model/Base/AddressQuery.php index 919578730..42be34bb0 100755 --- a/core/lib/Thelia/Model/Base/AddressQuery.php +++ b/core/lib/Thelia/Model/Base/AddressQuery.php @@ -36,7 +36,7 @@ use Thelia\Model\Map\AddressTableMap; * @method ChildAddressQuery orderByCountryId($order = Criteria::ASC) Order by the country_id column * @method ChildAddressQuery orderByPhone($order = Criteria::ASC) Order by the phone column * @method ChildAddressQuery orderByCellphone($order = Criteria::ASC) Order by the cellphone column - * @method ChildAddressQuery orderByDefault($order = Criteria::ASC) Order by the default column + * @method ChildAddressQuery orderByIsDefault($order = Criteria::ASC) Order by the is_default column * @method ChildAddressQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column * @method ChildAddressQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column * @@ -55,7 +55,7 @@ use Thelia\Model\Map\AddressTableMap; * @method ChildAddressQuery groupByCountryId() Group by the country_id column * @method ChildAddressQuery groupByPhone() Group by the phone column * @method ChildAddressQuery groupByCellphone() Group by the cellphone column - * @method ChildAddressQuery groupByDefault() Group by the default column + * @method ChildAddressQuery groupByIsDefault() Group by the is_default column * @method ChildAddressQuery groupByCreatedAt() Group by the created_at column * @method ChildAddressQuery groupByUpdatedAt() Group by the updated_at column * @@ -97,7 +97,7 @@ use Thelia\Model\Map\AddressTableMap; * @method ChildAddress findOneByCountryId(int $country_id) Return the first ChildAddress filtered by the country_id column * @method ChildAddress findOneByPhone(string $phone) Return the first ChildAddress filtered by the phone column * @method ChildAddress findOneByCellphone(string $cellphone) Return the first ChildAddress filtered by the cellphone column - * @method ChildAddress findOneByDefault(int $default) Return the first ChildAddress filtered by the default column + * @method ChildAddress findOneByIsDefault(int $is_default) Return the first ChildAddress filtered by the is_default column * @method ChildAddress findOneByCreatedAt(string $created_at) Return the first ChildAddress filtered by the created_at column * @method ChildAddress findOneByUpdatedAt(string $updated_at) Return the first ChildAddress filtered by the updated_at column * @@ -116,7 +116,7 @@ use Thelia\Model\Map\AddressTableMap; * @method array findByCountryId(int $country_id) Return ChildAddress objects filtered by the country_id column * @method array findByPhone(string $phone) Return ChildAddress objects filtered by the phone column * @method array findByCellphone(string $cellphone) Return ChildAddress objects filtered by the cellphone column - * @method array findByDefault(int $default) Return ChildAddress objects filtered by the default column + * @method array findByIsDefault(int $is_default) Return ChildAddress objects filtered by the is_default column * @method array findByCreatedAt(string $created_at) Return ChildAddress objects filtered by the created_at column * @method array findByUpdatedAt(string $updated_at) Return ChildAddress objects filtered by the updated_at column * @@ -207,7 +207,7 @@ abstract class AddressQuery extends ModelCriteria */ 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, CELLPHONE, DEFAULT, 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, CELLPHONE, IS_DEFAULT, CREATED_AT, UPDATED_AT FROM address WHERE ID = :p0'; try { $stmt = $con->prepare($sql); $stmt->bindValue(':p0', $key, PDO::PARAM_INT); @@ -784,16 +784,16 @@ abstract class AddressQuery extends ModelCriteria } /** - * Filter the query on the default column + * Filter the query on the is_default column * * Example usage: * - * $query->filterByDefault(1234); // WHERE default = 1234 - * $query->filterByDefault(array(12, 34)); // WHERE default IN (12, 34) - * $query->filterByDefault(array('min' => 12)); // WHERE default > 12 + * $query->filterByIsDefault(1234); // WHERE is_default = 1234 + * $query->filterByIsDefault(array(12, 34)); // WHERE is_default IN (12, 34) + * $query->filterByIsDefault(array('min' => 12)); // WHERE is_default > 12 * * - * @param mixed $default The value to use as filter. + * @param mixed $isDefault The value to use as filter. * Use scalar values for equality. * Use array values for in_array() equivalent. * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. @@ -801,16 +801,16 @@ abstract class AddressQuery extends ModelCriteria * * @return ChildAddressQuery The current query, for fluid interface */ - public function filterByDefault($default = null, $comparison = null) + public function filterByIsDefault($isDefault = null, $comparison = null) { - if (is_array($default)) { + if (is_array($isDefault)) { $useMinMax = false; - if (isset($default['min'])) { - $this->addUsingAlias(AddressTableMap::DEFAULT, $default['min'], Criteria::GREATER_EQUAL); + if (isset($isDefault['min'])) { + $this->addUsingAlias(AddressTableMap::IS_DEFAULT, $isDefault['min'], Criteria::GREATER_EQUAL); $useMinMax = true; } - if (isset($default['max'])) { - $this->addUsingAlias(AddressTableMap::DEFAULT, $default['max'], Criteria::LESS_EQUAL); + if (isset($isDefault['max'])) { + $this->addUsingAlias(AddressTableMap::IS_DEFAULT, $isDefault['max'], Criteria::LESS_EQUAL); $useMinMax = true; } if ($useMinMax) { @@ -821,7 +821,7 @@ abstract class AddressQuery extends ModelCriteria } } - return $this->addUsingAlias(AddressTableMap::DEFAULT, $default, $comparison); + return $this->addUsingAlias(AddressTableMap::IS_DEFAULT, $isDefault, $comparison); } /** diff --git a/core/lib/Thelia/Model/Map/AddressTableMap.php b/core/lib/Thelia/Model/Map/AddressTableMap.php index c7b979d35..2402b3302 100755 --- a/core/lib/Thelia/Model/Map/AddressTableMap.php +++ b/core/lib/Thelia/Model/Map/AddressTableMap.php @@ -145,9 +145,9 @@ class AddressTableMap extends TableMap const CELLPHONE = 'address.CELLPHONE'; /** - * the column name for the DEFAULT field + * the column name for the IS_DEFAULT field */ - const DEFAULT = 'address.DEFAULT'; + const IS_DEFAULT = 'address.IS_DEFAULT'; /** * the column name for the CREATED_AT field @@ -171,11 +171,11 @@ class AddressTableMap extends TableMap * e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id' */ protected static $fieldNames = array ( - self::TYPE_PHPNAME => array('Id', 'Title', 'CustomerId', 'CustomerTitleId', 'Company', 'Firstname', 'Lastname', 'Address1', 'Address2', 'Address3', 'Zipcode', 'City', 'CountryId', 'Phone', 'Cellphone', 'Default', 'CreatedAt', 'UpdatedAt', ), - self::TYPE_STUDLYPHPNAME => array('id', 'title', 'customerId', 'customerTitleId', 'company', 'firstname', 'lastname', 'address1', 'address2', 'address3', 'zipcode', 'city', 'countryId', 'phone', 'cellphone', 'default', 'createdAt', 'updatedAt', ), - self::TYPE_COLNAME => array(AddressTableMap::ID, AddressTableMap::TITLE, AddressTableMap::CUSTOMER_ID, AddressTableMap::CUSTOMER_TITLE_ID, AddressTableMap::COMPANY, AddressTableMap::FIRSTNAME, AddressTableMap::LASTNAME, AddressTableMap::ADDRESS1, AddressTableMap::ADDRESS2, AddressTableMap::ADDRESS3, AddressTableMap::ZIPCODE, AddressTableMap::CITY, AddressTableMap::COUNTRY_ID, AddressTableMap::PHONE, AddressTableMap::CELLPHONE, AddressTableMap::DEFAULT, AddressTableMap::CREATED_AT, AddressTableMap::UPDATED_AT, ), - self::TYPE_RAW_COLNAME => array('ID', 'TITLE', 'CUSTOMER_ID', 'CUSTOMER_TITLE_ID', 'COMPANY', 'FIRSTNAME', 'LASTNAME', 'ADDRESS1', 'ADDRESS2', 'ADDRESS3', 'ZIPCODE', 'CITY', 'COUNTRY_ID', 'PHONE', 'CELLPHONE', 'DEFAULT', 'CREATED_AT', 'UPDATED_AT', ), - self::TYPE_FIELDNAME => array('id', 'title', 'customer_id', 'customer_title_id', 'company', 'firstname', 'lastname', 'address1', 'address2', 'address3', 'zipcode', 'city', 'country_id', 'phone', 'cellphone', 'default', 'created_at', 'updated_at', ), + self::TYPE_PHPNAME => array('Id', 'Title', 'CustomerId', 'CustomerTitleId', 'Company', 'Firstname', 'Lastname', 'Address1', 'Address2', 'Address3', 'Zipcode', 'City', 'CountryId', 'Phone', 'Cellphone', 'IsDefault', 'CreatedAt', 'UpdatedAt', ), + self::TYPE_STUDLYPHPNAME => array('id', 'title', 'customerId', 'customerTitleId', 'company', 'firstname', 'lastname', 'address1', 'address2', 'address3', 'zipcode', 'city', 'countryId', 'phone', 'cellphone', 'isDefault', 'createdAt', 'updatedAt', ), + self::TYPE_COLNAME => array(AddressTableMap::ID, AddressTableMap::TITLE, AddressTableMap::CUSTOMER_ID, AddressTableMap::CUSTOMER_TITLE_ID, AddressTableMap::COMPANY, AddressTableMap::FIRSTNAME, AddressTableMap::LASTNAME, AddressTableMap::ADDRESS1, AddressTableMap::ADDRESS2, AddressTableMap::ADDRESS3, AddressTableMap::ZIPCODE, AddressTableMap::CITY, AddressTableMap::COUNTRY_ID, AddressTableMap::PHONE, AddressTableMap::CELLPHONE, AddressTableMap::IS_DEFAULT, AddressTableMap::CREATED_AT, AddressTableMap::UPDATED_AT, ), + self::TYPE_RAW_COLNAME => array('ID', 'TITLE', 'CUSTOMER_ID', 'CUSTOMER_TITLE_ID', 'COMPANY', 'FIRSTNAME', 'LASTNAME', 'ADDRESS1', 'ADDRESS2', 'ADDRESS3', 'ZIPCODE', 'CITY', 'COUNTRY_ID', 'PHONE', 'CELLPHONE', 'IS_DEFAULT', 'CREATED_AT', 'UPDATED_AT', ), + self::TYPE_FIELDNAME => array('id', 'title', 'customer_id', 'customer_title_id', 'company', 'firstname', 'lastname', 'address1', 'address2', 'address3', 'zipcode', 'city', 'country_id', 'phone', 'cellphone', 'is_default', 'created_at', 'updated_at', ), self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, ) ); @@ -186,11 +186,11 @@ class AddressTableMap extends TableMap * e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0 */ protected static $fieldKeys = array ( - self::TYPE_PHPNAME => array('Id' => 0, 'Title' => 1, 'CustomerId' => 2, 'CustomerTitleId' => 3, 'Company' => 4, 'Firstname' => 5, 'Lastname' => 6, 'Address1' => 7, 'Address2' => 8, 'Address3' => 9, 'Zipcode' => 10, 'City' => 11, 'CountryId' => 12, 'Phone' => 13, 'Cellphone' => 14, 'Default' => 15, 'CreatedAt' => 16, 'UpdatedAt' => 17, ), - self::TYPE_STUDLYPHPNAME => array('id' => 0, 'title' => 1, 'customerId' => 2, 'customerTitleId' => 3, 'company' => 4, 'firstname' => 5, 'lastname' => 6, 'address1' => 7, 'address2' => 8, 'address3' => 9, 'zipcode' => 10, 'city' => 11, 'countryId' => 12, 'phone' => 13, 'cellphone' => 14, 'default' => 15, 'createdAt' => 16, 'updatedAt' => 17, ), - self::TYPE_COLNAME => array(AddressTableMap::ID => 0, AddressTableMap::TITLE => 1, AddressTableMap::CUSTOMER_ID => 2, AddressTableMap::CUSTOMER_TITLE_ID => 3, AddressTableMap::COMPANY => 4, AddressTableMap::FIRSTNAME => 5, AddressTableMap::LASTNAME => 6, AddressTableMap::ADDRESS1 => 7, AddressTableMap::ADDRESS2 => 8, AddressTableMap::ADDRESS3 => 9, AddressTableMap::ZIPCODE => 10, AddressTableMap::CITY => 11, AddressTableMap::COUNTRY_ID => 12, AddressTableMap::PHONE => 13, AddressTableMap::CELLPHONE => 14, AddressTableMap::DEFAULT => 15, AddressTableMap::CREATED_AT => 16, AddressTableMap::UPDATED_AT => 17, ), - self::TYPE_RAW_COLNAME => array('ID' => 0, 'TITLE' => 1, 'CUSTOMER_ID' => 2, 'CUSTOMER_TITLE_ID' => 3, 'COMPANY' => 4, 'FIRSTNAME' => 5, 'LASTNAME' => 6, 'ADDRESS1' => 7, 'ADDRESS2' => 8, 'ADDRESS3' => 9, 'ZIPCODE' => 10, 'CITY' => 11, 'COUNTRY_ID' => 12, 'PHONE' => 13, 'CELLPHONE' => 14, 'DEFAULT' => 15, 'CREATED_AT' => 16, 'UPDATED_AT' => 17, ), - self::TYPE_FIELDNAME => array('id' => 0, 'title' => 1, 'customer_id' => 2, 'customer_title_id' => 3, 'company' => 4, 'firstname' => 5, 'lastname' => 6, 'address1' => 7, 'address2' => 8, 'address3' => 9, 'zipcode' => 10, 'city' => 11, 'country_id' => 12, 'phone' => 13, 'cellphone' => 14, 'default' => 15, 'created_at' => 16, 'updated_at' => 17, ), + self::TYPE_PHPNAME => array('Id' => 0, 'Title' => 1, 'CustomerId' => 2, 'CustomerTitleId' => 3, 'Company' => 4, 'Firstname' => 5, 'Lastname' => 6, 'Address1' => 7, 'Address2' => 8, 'Address3' => 9, 'Zipcode' => 10, 'City' => 11, 'CountryId' => 12, 'Phone' => 13, 'Cellphone' => 14, 'IsDefault' => 15, 'CreatedAt' => 16, 'UpdatedAt' => 17, ), + self::TYPE_STUDLYPHPNAME => array('id' => 0, 'title' => 1, 'customerId' => 2, 'customerTitleId' => 3, 'company' => 4, 'firstname' => 5, 'lastname' => 6, 'address1' => 7, 'address2' => 8, 'address3' => 9, 'zipcode' => 10, 'city' => 11, 'countryId' => 12, 'phone' => 13, 'cellphone' => 14, 'isDefault' => 15, 'createdAt' => 16, 'updatedAt' => 17, ), + self::TYPE_COLNAME => array(AddressTableMap::ID => 0, AddressTableMap::TITLE => 1, AddressTableMap::CUSTOMER_ID => 2, AddressTableMap::CUSTOMER_TITLE_ID => 3, AddressTableMap::COMPANY => 4, AddressTableMap::FIRSTNAME => 5, AddressTableMap::LASTNAME => 6, AddressTableMap::ADDRESS1 => 7, AddressTableMap::ADDRESS2 => 8, AddressTableMap::ADDRESS3 => 9, AddressTableMap::ZIPCODE => 10, AddressTableMap::CITY => 11, AddressTableMap::COUNTRY_ID => 12, AddressTableMap::PHONE => 13, AddressTableMap::CELLPHONE => 14, AddressTableMap::IS_DEFAULT => 15, AddressTableMap::CREATED_AT => 16, AddressTableMap::UPDATED_AT => 17, ), + self::TYPE_RAW_COLNAME => array('ID' => 0, 'TITLE' => 1, 'CUSTOMER_ID' => 2, 'CUSTOMER_TITLE_ID' => 3, 'COMPANY' => 4, 'FIRSTNAME' => 5, 'LASTNAME' => 6, 'ADDRESS1' => 7, 'ADDRESS2' => 8, 'ADDRESS3' => 9, 'ZIPCODE' => 10, 'CITY' => 11, 'COUNTRY_ID' => 12, 'PHONE' => 13, 'CELLPHONE' => 14, 'IS_DEFAULT' => 15, 'CREATED_AT' => 16, 'UPDATED_AT' => 17, ), + self::TYPE_FIELDNAME => array('id' => 0, 'title' => 1, 'customer_id' => 2, 'customer_title_id' => 3, 'company' => 4, 'firstname' => 5, 'lastname' => 6, 'address1' => 7, 'address2' => 8, 'address3' => 9, 'zipcode' => 10, 'city' => 11, 'country_id' => 12, 'phone' => 13, 'cellphone' => 14, 'is_default' => 15, 'created_at' => 16, 'updated_at' => 17, ), self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, ) ); @@ -225,7 +225,7 @@ class AddressTableMap extends TableMap $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('DEFAULT', 'Default', 'TINYINT', false, null, 0); + $this->addColumn('IS_DEFAULT', 'IsDefault', 'TINYINT', false, null, 0); $this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null); $this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null); } // initialize() @@ -407,7 +407,7 @@ class AddressTableMap extends TableMap $criteria->addSelectColumn(AddressTableMap::COUNTRY_ID); $criteria->addSelectColumn(AddressTableMap::PHONE); $criteria->addSelectColumn(AddressTableMap::CELLPHONE); - $criteria->addSelectColumn(AddressTableMap::DEFAULT); + $criteria->addSelectColumn(AddressTableMap::IS_DEFAULT); $criteria->addSelectColumn(AddressTableMap::CREATED_AT); $criteria->addSelectColumn(AddressTableMap::UPDATED_AT); } else { @@ -426,7 +426,7 @@ class AddressTableMap extends TableMap $criteria->addSelectColumn($alias . '.COUNTRY_ID'); $criteria->addSelectColumn($alias . '.PHONE'); $criteria->addSelectColumn($alias . '.CELLPHONE'); - $criteria->addSelectColumn($alias . '.DEFAULT'); + $criteria->addSelectColumn($alias . '.IS_DEFAULT'); $criteria->addSelectColumn($alias . '.CREATED_AT'); $criteria->addSelectColumn($alias . '.UPDATED_AT'); } diff --git a/install/thelia.sql b/install/thelia.sql index 97c2b2653..62326cc2e 100755 --- a/install/thelia.sql +++ b/install/thelia.sql @@ -497,7 +497,7 @@ CREATE TABLE `address` `country_id` INTEGER NOT NULL, `phone` VARCHAR(20), `cellphone` VARCHAR(20), - `default` TINYINT DEFAULT 0, + `is_default` TINYINT DEFAULT 0, `created_at` DATETIME, `updated_at` DATETIME, PRIMARY KEY (`id`), diff --git a/local/config/schema.xml b/local/config/schema.xml index 75a1f735c..2ef29e927 100755 --- a/local/config/schema.xml +++ b/local/config/schema.xml @@ -365,7 +365,7 @@ - +