change customer model
This commit is contained in:
@@ -142,6 +142,19 @@ abstract class Address implements ActiveRecordInterface
|
||||
*/
|
||||
protected $phone;
|
||||
|
||||
/**
|
||||
* The value for the cellphone field.
|
||||
* @var string
|
||||
*/
|
||||
protected $cellphone;
|
||||
|
||||
/**
|
||||
* The value for the default field.
|
||||
* Note: this column has a database default value of: 0
|
||||
* @var int
|
||||
*/
|
||||
protected $default;
|
||||
|
||||
/**
|
||||
* The value for the created_at field.
|
||||
* @var string
|
||||
@@ -172,11 +185,24 @@ abstract class Address implements ActiveRecordInterface
|
||||
*/
|
||||
protected $alreadyInSave = false;
|
||||
|
||||
/**
|
||||
* Applies default values to this object.
|
||||
* This method should be called from the object's constructor (or
|
||||
* equivalent initialization method).
|
||||
* @see __construct()
|
||||
*/
|
||||
public function applyDefaultValues()
|
||||
{
|
||||
$this->default = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes internal state of Thelia\Model\Base\Address object.
|
||||
* @see applyDefaults()
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->applyDefaultValues();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -580,6 +606,28 @@ abstract class Address implements ActiveRecordInterface
|
||||
return $this->phone;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [cellphone] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getCellphone()
|
||||
{
|
||||
|
||||
return $this->cellphone;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [default] column value.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getDefault()
|
||||
{
|
||||
|
||||
return $this->default;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [optionally formatted] temporal [created_at] column value.
|
||||
*
|
||||
@@ -922,6 +970,48 @@ abstract class Address implements ActiveRecordInterface
|
||||
return $this;
|
||||
} // setPhone()
|
||||
|
||||
/**
|
||||
* Set the value of [cellphone] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\Address The current object (for fluent API support)
|
||||
*/
|
||||
public function setCellphone($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->cellphone !== $v) {
|
||||
$this->cellphone = $v;
|
||||
$this->modifiedColumns[] = AddressTableMap::CELLPHONE;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setCellphone()
|
||||
|
||||
/**
|
||||
* Set the value of [default] column.
|
||||
*
|
||||
* @param int $v new value
|
||||
* @return \Thelia\Model\Address The current object (for fluent API support)
|
||||
*/
|
||||
public function setDefault($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (int) $v;
|
||||
}
|
||||
|
||||
if ($this->default !== $v) {
|
||||
$this->default = $v;
|
||||
$this->modifiedColumns[] = AddressTableMap::DEFAULT;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setDefault()
|
||||
|
||||
/**
|
||||
* Sets the value of [created_at] column to a normalized version of the date/time value specified.
|
||||
*
|
||||
@@ -974,6 +1064,10 @@ abstract class Address implements ActiveRecordInterface
|
||||
*/
|
||||
public function hasOnlyDefaultValues()
|
||||
{
|
||||
if ($this->default !== 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// otherwise, everything was equal, so return TRUE
|
||||
return true;
|
||||
} // hasOnlyDefaultValues()
|
||||
@@ -1043,13 +1137,19 @@ abstract class Address implements ActiveRecordInterface
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 13 + $startcol : AddressTableMap::translateFieldName('Phone', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->phone = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 14 + $startcol : AddressTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$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 ? 16 + $startcol : AddressTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
if ($col === '0000-00-00 00:00:00') {
|
||||
$col = null;
|
||||
}
|
||||
$this->created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 15 + $startcol : AddressTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 17 + $startcol : AddressTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
if ($col === '0000-00-00 00:00:00') {
|
||||
$col = null;
|
||||
}
|
||||
@@ -1062,7 +1162,7 @@ abstract class Address implements ActiveRecordInterface
|
||||
$this->ensureConsistency();
|
||||
}
|
||||
|
||||
return $startcol + 16; // 16 = AddressTableMap::NUM_HYDRATE_COLUMNS.
|
||||
return $startcol + 18; // 18 = AddressTableMap::NUM_HYDRATE_COLUMNS.
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating \Thelia\Model\Address object", 0, $e);
|
||||
@@ -1351,6 +1451,12 @@ abstract class Address implements ActiveRecordInterface
|
||||
if ($this->isColumnModified(AddressTableMap::PHONE)) {
|
||||
$modifiedColumns[':p' . $index++] = 'PHONE';
|
||||
}
|
||||
if ($this->isColumnModified(AddressTableMap::CELLPHONE)) {
|
||||
$modifiedColumns[':p' . $index++] = 'CELLPHONE';
|
||||
}
|
||||
if ($this->isColumnModified(AddressTableMap::DEFAULT)) {
|
||||
$modifiedColumns[':p' . $index++] = 'DEFAULT';
|
||||
}
|
||||
if ($this->isColumnModified(AddressTableMap::CREATED_AT)) {
|
||||
$modifiedColumns[':p' . $index++] = 'CREATED_AT';
|
||||
}
|
||||
@@ -1410,6 +1516,12 @@ abstract class Address implements ActiveRecordInterface
|
||||
case 'PHONE':
|
||||
$stmt->bindValue($identifier, $this->phone, PDO::PARAM_STR);
|
||||
break;
|
||||
case 'CELLPHONE':
|
||||
$stmt->bindValue($identifier, $this->cellphone, PDO::PARAM_STR);
|
||||
break;
|
||||
case 'DEFAULT':
|
||||
$stmt->bindValue($identifier, $this->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);
|
||||
break;
|
||||
@@ -1521,9 +1633,15 @@ abstract class Address implements ActiveRecordInterface
|
||||
return $this->getPhone();
|
||||
break;
|
||||
case 14:
|
||||
return $this->getCreatedAt();
|
||||
return $this->getCellphone();
|
||||
break;
|
||||
case 15:
|
||||
return $this->getDefault();
|
||||
break;
|
||||
case 16:
|
||||
return $this->getCreatedAt();
|
||||
break;
|
||||
case 17:
|
||||
return $this->getUpdatedAt();
|
||||
break;
|
||||
default:
|
||||
@@ -1569,8 +1687,10 @@ abstract class Address implements ActiveRecordInterface
|
||||
$keys[11] => $this->getCity(),
|
||||
$keys[12] => $this->getCountryId(),
|
||||
$keys[13] => $this->getPhone(),
|
||||
$keys[14] => $this->getCreatedAt(),
|
||||
$keys[15] => $this->getUpdatedAt(),
|
||||
$keys[14] => $this->getCellphone(),
|
||||
$keys[15] => $this->getDefault(),
|
||||
$keys[16] => $this->getCreatedAt(),
|
||||
$keys[17] => $this->getUpdatedAt(),
|
||||
);
|
||||
$virtualColumns = $this->virtualColumns;
|
||||
foreach($virtualColumns as $key => $virtualColumn)
|
||||
@@ -1662,9 +1782,15 @@ abstract class Address implements ActiveRecordInterface
|
||||
$this->setPhone($value);
|
||||
break;
|
||||
case 14:
|
||||
$this->setCreatedAt($value);
|
||||
$this->setCellphone($value);
|
||||
break;
|
||||
case 15:
|
||||
$this->setDefault($value);
|
||||
break;
|
||||
case 16:
|
||||
$this->setCreatedAt($value);
|
||||
break;
|
||||
case 17:
|
||||
$this->setUpdatedAt($value);
|
||||
break;
|
||||
} // switch()
|
||||
@@ -1705,8 +1831,10 @@ abstract class Address implements ActiveRecordInterface
|
||||
if (array_key_exists($keys[11], $arr)) $this->setCity($arr[$keys[11]]);
|
||||
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->setCreatedAt($arr[$keys[14]]);
|
||||
if (array_key_exists($keys[15], $arr)) $this->setUpdatedAt($arr[$keys[15]]);
|
||||
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[16], $arr)) $this->setCreatedAt($arr[$keys[16]]);
|
||||
if (array_key_exists($keys[17], $arr)) $this->setUpdatedAt($arr[$keys[17]]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1732,6 +1860,8 @@ abstract class Address implements ActiveRecordInterface
|
||||
if ($this->isColumnModified(AddressTableMap::CITY)) $criteria->add(AddressTableMap::CITY, $this->city);
|
||||
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::CREATED_AT)) $criteria->add(AddressTableMap::CREATED_AT, $this->created_at);
|
||||
if ($this->isColumnModified(AddressTableMap::UPDATED_AT)) $criteria->add(AddressTableMap::UPDATED_AT, $this->updated_at);
|
||||
|
||||
@@ -1810,6 +1940,8 @@ abstract class Address implements ActiveRecordInterface
|
||||
$copyObj->setCity($this->getCity());
|
||||
$copyObj->setCountryId($this->getCountryId());
|
||||
$copyObj->setPhone($this->getPhone());
|
||||
$copyObj->setCellphone($this->getCellphone());
|
||||
$copyObj->setDefault($this->getDefault());
|
||||
$copyObj->setCreatedAt($this->getCreatedAt());
|
||||
$copyObj->setUpdatedAt($this->getUpdatedAt());
|
||||
if ($makeNew) {
|
||||
@@ -1961,10 +2093,13 @@ abstract class Address implements ActiveRecordInterface
|
||||
$this->city = null;
|
||||
$this->country_id = null;
|
||||
$this->phone = null;
|
||||
$this->cellphone = null;
|
||||
$this->default = null;
|
||||
$this->created_at = null;
|
||||
$this->updated_at = null;
|
||||
$this->alreadyInSave = false;
|
||||
$this->clearAllReferences();
|
||||
$this->applyDefaultValues();
|
||||
$this->resetModified();
|
||||
$this->setNew(true);
|
||||
$this->setDeleted(false);
|
||||
|
||||
@@ -35,6 +35,8 @@ use Thelia\Model\Map\AddressTableMap;
|
||||
* @method ChildAddressQuery orderByCity($order = Criteria::ASC) Order by the city column
|
||||
* @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 orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
|
||||
* @method ChildAddressQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
|
||||
*
|
||||
@@ -52,6 +54,8 @@ use Thelia\Model\Map\AddressTableMap;
|
||||
* @method ChildAddressQuery groupByCity() Group by the city column
|
||||
* @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 groupByCreatedAt() Group by the created_at column
|
||||
* @method ChildAddressQuery groupByUpdatedAt() Group by the updated_at column
|
||||
*
|
||||
@@ -84,6 +88,8 @@ use Thelia\Model\Map\AddressTableMap;
|
||||
* @method ChildAddress findOneByCity(string $city) Return the first ChildAddress filtered by the city column
|
||||
* @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 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
|
||||
*
|
||||
@@ -101,6 +107,8 @@ use Thelia\Model\Map\AddressTableMap;
|
||||
* @method array findByCity(string $city) Return ChildAddress objects filtered by the city column
|
||||
* @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 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
|
||||
*
|
||||
@@ -191,7 +199,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, 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, DEFAULT, CREATED_AT, UPDATED_AT FROM address WHERE ID = :p0';
|
||||
try {
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
|
||||
@@ -738,6 +746,76 @@ abstract class AddressQuery extends ModelCriteria
|
||||
return $this->addUsingAlias(AddressTableMap::PHONE, $phone, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the cellphone column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByCellphone('fooValue'); // WHERE cellphone = 'fooValue'
|
||||
* $query->filterByCellphone('%fooValue%'); // WHERE cellphone LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $cellphone The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildAddressQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByCellphone($cellphone = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($cellphone)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $cellphone)) {
|
||||
$cellphone = str_replace('*', '%', $cellphone);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(AddressTableMap::CELLPHONE, $cellphone, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the default column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByDefault(1234); // WHERE default = 1234
|
||||
* $query->filterByDefault(array(12, 34)); // WHERE default IN (12, 34)
|
||||
* $query->filterByDefault(array('min' => 12)); // WHERE default > 12
|
||||
* </code>
|
||||
*
|
||||
* @param mixed $default The value to use as filter.
|
||||
* Use scalar values for equality.
|
||||
* Use array values for in_array() equivalent.
|
||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildAddressQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDefault($default = null, $comparison = null)
|
||||
{
|
||||
if (is_array($default)) {
|
||||
$useMinMax = false;
|
||||
if (isset($default['min'])) {
|
||||
$this->addUsingAlias(AddressTableMap::DEFAULT, $default['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($default['max'])) {
|
||||
$this->addUsingAlias(AddressTableMap::DEFAULT, $default['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(AddressTableMap::DEFAULT, $default, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the created_at column
|
||||
*
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -23,22 +23,9 @@ use Thelia\Model\Map\CustomerTableMap;
|
||||
*
|
||||
* @method ChildCustomerQuery orderById($order = Criteria::ASC) Order by the id column
|
||||
* @method ChildCustomerQuery orderByRef($order = Criteria::ASC) Order by the ref column
|
||||
* @method ChildCustomerQuery orderByCustomerTitleId($order = Criteria::ASC) Order by the customer_title_id column
|
||||
* @method ChildCustomerQuery orderByCompany($order = Criteria::ASC) Order by the company column
|
||||
* @method ChildCustomerQuery orderByFirstname($order = Criteria::ASC) Order by the firstname column
|
||||
* @method ChildCustomerQuery orderByLastname($order = Criteria::ASC) Order by the lastname column
|
||||
* @method ChildCustomerQuery orderByAddress1($order = Criteria::ASC) Order by the address1 column
|
||||
* @method ChildCustomerQuery orderByAddress2($order = Criteria::ASC) Order by the address2 column
|
||||
* @method ChildCustomerQuery orderByAddress3($order = Criteria::ASC) Order by the address3 column
|
||||
* @method ChildCustomerQuery orderByZipcode($order = Criteria::ASC) Order by the zipcode column
|
||||
* @method ChildCustomerQuery orderByCity($order = Criteria::ASC) Order by the city column
|
||||
* @method ChildCustomerQuery orderByCountryId($order = Criteria::ASC) Order by the country_id column
|
||||
* @method ChildCustomerQuery orderByPhone($order = Criteria::ASC) Order by the phone column
|
||||
* @method ChildCustomerQuery orderByCellphone($order = Criteria::ASC) Order by the cellphone column
|
||||
* @method ChildCustomerQuery orderByEmail($order = Criteria::ASC) Order by the email column
|
||||
* @method ChildCustomerQuery orderByPassword($order = Criteria::ASC) Order by the password column
|
||||
* @method ChildCustomerQuery orderByAlgo($order = Criteria::ASC) Order by the algo column
|
||||
* @method ChildCustomerQuery orderBySalt($order = Criteria::ASC) Order by the salt column
|
||||
* @method ChildCustomerQuery orderByReseller($order = Criteria::ASC) Order by the reseller column
|
||||
* @method ChildCustomerQuery orderByLang($order = Criteria::ASC) Order by the lang column
|
||||
* @method ChildCustomerQuery orderBySponsor($order = Criteria::ASC) Order by the sponsor column
|
||||
@@ -48,22 +35,9 @@ use Thelia\Model\Map\CustomerTableMap;
|
||||
*
|
||||
* @method ChildCustomerQuery groupById() Group by the id column
|
||||
* @method ChildCustomerQuery groupByRef() Group by the ref column
|
||||
* @method ChildCustomerQuery groupByCustomerTitleId() Group by the customer_title_id column
|
||||
* @method ChildCustomerQuery groupByCompany() Group by the company column
|
||||
* @method ChildCustomerQuery groupByFirstname() Group by the firstname column
|
||||
* @method ChildCustomerQuery groupByLastname() Group by the lastname column
|
||||
* @method ChildCustomerQuery groupByAddress1() Group by the address1 column
|
||||
* @method ChildCustomerQuery groupByAddress2() Group by the address2 column
|
||||
* @method ChildCustomerQuery groupByAddress3() Group by the address3 column
|
||||
* @method ChildCustomerQuery groupByZipcode() Group by the zipcode column
|
||||
* @method ChildCustomerQuery groupByCity() Group by the city column
|
||||
* @method ChildCustomerQuery groupByCountryId() Group by the country_id column
|
||||
* @method ChildCustomerQuery groupByPhone() Group by the phone column
|
||||
* @method ChildCustomerQuery groupByCellphone() Group by the cellphone column
|
||||
* @method ChildCustomerQuery groupByEmail() Group by the email column
|
||||
* @method ChildCustomerQuery groupByPassword() Group by the password column
|
||||
* @method ChildCustomerQuery groupByAlgo() Group by the algo column
|
||||
* @method ChildCustomerQuery groupBySalt() Group by the salt column
|
||||
* @method ChildCustomerQuery groupByReseller() Group by the reseller column
|
||||
* @method ChildCustomerQuery groupByLang() Group by the lang column
|
||||
* @method ChildCustomerQuery groupBySponsor() Group by the sponsor column
|
||||
@@ -75,10 +49,6 @@ use Thelia\Model\Map\CustomerTableMap;
|
||||
* @method ChildCustomerQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
||||
* @method ChildCustomerQuery innerJoin($relation) Adds a INNER JOIN clause to the query
|
||||
*
|
||||
* @method ChildCustomerQuery leftJoinCustomerTitle($relationAlias = null) Adds a LEFT JOIN clause to the query using the CustomerTitle relation
|
||||
* @method ChildCustomerQuery rightJoinCustomerTitle($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CustomerTitle relation
|
||||
* @method ChildCustomerQuery innerJoinCustomerTitle($relationAlias = null) Adds a INNER JOIN clause to the query using the CustomerTitle relation
|
||||
*
|
||||
* @method ChildCustomerQuery leftJoinAddress($relationAlias = null) Adds a LEFT JOIN clause to the query using the Address relation
|
||||
* @method ChildCustomerQuery rightJoinAddress($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Address relation
|
||||
* @method ChildCustomerQuery innerJoinAddress($relationAlias = null) Adds a INNER JOIN clause to the query using the Address relation
|
||||
@@ -92,22 +62,9 @@ use Thelia\Model\Map\CustomerTableMap;
|
||||
*
|
||||
* @method ChildCustomer findOneById(int $id) Return the first ChildCustomer filtered by the id column
|
||||
* @method ChildCustomer findOneByRef(string $ref) Return the first ChildCustomer filtered by the ref column
|
||||
* @method ChildCustomer findOneByCustomerTitleId(int $customer_title_id) Return the first ChildCustomer filtered by the customer_title_id column
|
||||
* @method ChildCustomer findOneByCompany(string $company) Return the first ChildCustomer filtered by the company column
|
||||
* @method ChildCustomer findOneByFirstname(string $firstname) Return the first ChildCustomer filtered by the firstname column
|
||||
* @method ChildCustomer findOneByLastname(string $lastname) Return the first ChildCustomer filtered by the lastname column
|
||||
* @method ChildCustomer findOneByAddress1(string $address1) Return the first ChildCustomer filtered by the address1 column
|
||||
* @method ChildCustomer findOneByAddress2(string $address2) Return the first ChildCustomer filtered by the address2 column
|
||||
* @method ChildCustomer findOneByAddress3(string $address3) Return the first ChildCustomer filtered by the address3 column
|
||||
* @method ChildCustomer findOneByZipcode(string $zipcode) Return the first ChildCustomer filtered by the zipcode column
|
||||
* @method ChildCustomer findOneByCity(string $city) Return the first ChildCustomer filtered by the city column
|
||||
* @method ChildCustomer findOneByCountryId(int $country_id) Return the first ChildCustomer filtered by the country_id column
|
||||
* @method ChildCustomer findOneByPhone(string $phone) Return the first ChildCustomer filtered by the phone column
|
||||
* @method ChildCustomer findOneByCellphone(string $cellphone) Return the first ChildCustomer filtered by the cellphone column
|
||||
* @method ChildCustomer findOneByEmail(string $email) Return the first ChildCustomer filtered by the email column
|
||||
* @method ChildCustomer findOneByPassword(string $password) Return the first ChildCustomer filtered by the password column
|
||||
* @method ChildCustomer findOneByAlgo(string $algo) Return the first ChildCustomer filtered by the algo column
|
||||
* @method ChildCustomer findOneBySalt(string $salt) Return the first ChildCustomer filtered by the salt column
|
||||
* @method ChildCustomer findOneByReseller(int $reseller) Return the first ChildCustomer filtered by the reseller column
|
||||
* @method ChildCustomer findOneByLang(string $lang) Return the first ChildCustomer filtered by the lang column
|
||||
* @method ChildCustomer findOneBySponsor(string $sponsor) Return the first ChildCustomer filtered by the sponsor column
|
||||
@@ -117,22 +74,9 @@ use Thelia\Model\Map\CustomerTableMap;
|
||||
*
|
||||
* @method array findById(int $id) Return ChildCustomer objects filtered by the id column
|
||||
* @method array findByRef(string $ref) Return ChildCustomer objects filtered by the ref column
|
||||
* @method array findByCustomerTitleId(int $customer_title_id) Return ChildCustomer objects filtered by the customer_title_id column
|
||||
* @method array findByCompany(string $company) Return ChildCustomer objects filtered by the company column
|
||||
* @method array findByFirstname(string $firstname) Return ChildCustomer objects filtered by the firstname column
|
||||
* @method array findByLastname(string $lastname) Return ChildCustomer objects filtered by the lastname column
|
||||
* @method array findByAddress1(string $address1) Return ChildCustomer objects filtered by the address1 column
|
||||
* @method array findByAddress2(string $address2) Return ChildCustomer objects filtered by the address2 column
|
||||
* @method array findByAddress3(string $address3) Return ChildCustomer objects filtered by the address3 column
|
||||
* @method array findByZipcode(string $zipcode) Return ChildCustomer objects filtered by the zipcode column
|
||||
* @method array findByCity(string $city) Return ChildCustomer objects filtered by the city column
|
||||
* @method array findByCountryId(int $country_id) Return ChildCustomer objects filtered by the country_id column
|
||||
* @method array findByPhone(string $phone) Return ChildCustomer objects filtered by the phone column
|
||||
* @method array findByCellphone(string $cellphone) Return ChildCustomer objects filtered by the cellphone column
|
||||
* @method array findByEmail(string $email) Return ChildCustomer objects filtered by the email column
|
||||
* @method array findByPassword(string $password) Return ChildCustomer objects filtered by the password column
|
||||
* @method array findByAlgo(string $algo) Return ChildCustomer objects filtered by the algo column
|
||||
* @method array findBySalt(string $salt) Return ChildCustomer objects filtered by the salt column
|
||||
* @method array findByReseller(int $reseller) Return ChildCustomer objects filtered by the reseller column
|
||||
* @method array findByLang(string $lang) Return ChildCustomer objects filtered by the lang column
|
||||
* @method array findBySponsor(string $sponsor) Return ChildCustomer objects filtered by the sponsor column
|
||||
@@ -227,7 +171,7 @@ abstract class CustomerQuery extends ModelCriteria
|
||||
*/
|
||||
protected function findPkSimple($key, $con)
|
||||
{
|
||||
$sql = 'SELECT ID, REF, CUSTOMER_TITLE_ID, COMPANY, FIRSTNAME, LASTNAME, ADDRESS1, ADDRESS2, ADDRESS3, ZIPCODE, CITY, COUNTRY_ID, PHONE, CELLPHONE, EMAIL, PASSWORD, ALGO, SALT, RESELLER, LANG, SPONSOR, DISCOUNT, CREATED_AT, UPDATED_AT FROM customer WHERE ID = :p0';
|
||||
$sql = 'SELECT ID, REF, EMAIL, PASSWORD, ALGO, RESELLER, LANG, SPONSOR, DISCOUNT, CREATED_AT, UPDATED_AT FROM customer WHERE ID = :p0';
|
||||
try {
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
|
||||
@@ -386,380 +330,6 @@ abstract class CustomerQuery extends ModelCriteria
|
||||
return $this->addUsingAlias(CustomerTableMap::REF, $ref, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the customer_title_id column
|
||||
*
|
||||
* Example usage:
|
||||
* <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
|
||||
* </code>
|
||||
*
|
||||
* @see filterByCustomerTitle()
|
||||
*
|
||||
* @param mixed $customerTitleId The value to use as filter.
|
||||
* Use scalar values for equality.
|
||||
* Use array values for in_array() equivalent.
|
||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildCustomerQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByCustomerTitleId($customerTitleId = null, $comparison = null)
|
||||
{
|
||||
if (is_array($customerTitleId)) {
|
||||
$useMinMax = false;
|
||||
if (isset($customerTitleId['min'])) {
|
||||
$this->addUsingAlias(CustomerTableMap::CUSTOMER_TITLE_ID, $customerTitleId['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($customerTitleId['max'])) {
|
||||
$this->addUsingAlias(CustomerTableMap::CUSTOMER_TITLE_ID, $customerTitleId['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(CustomerTableMap::CUSTOMER_TITLE_ID, $customerTitleId, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the company column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByCompany('fooValue'); // WHERE company = 'fooValue'
|
||||
* $query->filterByCompany('%fooValue%'); // WHERE company LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $company The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildCustomerQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByCompany($company = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($company)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $company)) {
|
||||
$company = str_replace('*', '%', $company);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(CustomerTableMap::COMPANY, $company, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the firstname column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByFirstname('fooValue'); // WHERE firstname = 'fooValue'
|
||||
* $query->filterByFirstname('%fooValue%'); // WHERE firstname LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $firstname The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildCustomerQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByFirstname($firstname = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($firstname)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $firstname)) {
|
||||
$firstname = str_replace('*', '%', $firstname);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(CustomerTableMap::FIRSTNAME, $firstname, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the lastname column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByLastname('fooValue'); // WHERE lastname = 'fooValue'
|
||||
* $query->filterByLastname('%fooValue%'); // WHERE lastname LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $lastname The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildCustomerQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByLastname($lastname = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($lastname)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $lastname)) {
|
||||
$lastname = str_replace('*', '%', $lastname);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(CustomerTableMap::LASTNAME, $lastname, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the address1 column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByAddress1('fooValue'); // WHERE address1 = 'fooValue'
|
||||
* $query->filterByAddress1('%fooValue%'); // WHERE address1 LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $address1 The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildCustomerQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByAddress1($address1 = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($address1)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $address1)) {
|
||||
$address1 = str_replace('*', '%', $address1);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(CustomerTableMap::ADDRESS1, $address1, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the address2 column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByAddress2('fooValue'); // WHERE address2 = 'fooValue'
|
||||
* $query->filterByAddress2('%fooValue%'); // WHERE address2 LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $address2 The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildCustomerQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByAddress2($address2 = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($address2)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $address2)) {
|
||||
$address2 = str_replace('*', '%', $address2);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(CustomerTableMap::ADDRESS2, $address2, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the address3 column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByAddress3('fooValue'); // WHERE address3 = 'fooValue'
|
||||
* $query->filterByAddress3('%fooValue%'); // WHERE address3 LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $address3 The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildCustomerQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByAddress3($address3 = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($address3)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $address3)) {
|
||||
$address3 = str_replace('*', '%', $address3);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(CustomerTableMap::ADDRESS3, $address3, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the zipcode column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByZipcode('fooValue'); // WHERE zipcode = 'fooValue'
|
||||
* $query->filterByZipcode('%fooValue%'); // WHERE zipcode LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $zipcode The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildCustomerQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByZipcode($zipcode = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($zipcode)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $zipcode)) {
|
||||
$zipcode = str_replace('*', '%', $zipcode);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(CustomerTableMap::ZIPCODE, $zipcode, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the city column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByCity('fooValue'); // WHERE city = 'fooValue'
|
||||
* $query->filterByCity('%fooValue%'); // WHERE city LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $city The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildCustomerQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByCity($city = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($city)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $city)) {
|
||||
$city = str_replace('*', '%', $city);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(CustomerTableMap::CITY, $city, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the country_id column
|
||||
*
|
||||
* Example usage:
|
||||
* <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
|
||||
* </code>
|
||||
*
|
||||
* @param mixed $countryId The value to use as filter.
|
||||
* Use scalar values for equality.
|
||||
* Use array values for in_array() equivalent.
|
||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildCustomerQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByCountryId($countryId = null, $comparison = null)
|
||||
{
|
||||
if (is_array($countryId)) {
|
||||
$useMinMax = false;
|
||||
if (isset($countryId['min'])) {
|
||||
$this->addUsingAlias(CustomerTableMap::COUNTRY_ID, $countryId['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($countryId['max'])) {
|
||||
$this->addUsingAlias(CustomerTableMap::COUNTRY_ID, $countryId['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(CustomerTableMap::COUNTRY_ID, $countryId, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the phone column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByPhone('fooValue'); // WHERE phone = 'fooValue'
|
||||
* $query->filterByPhone('%fooValue%'); // WHERE phone LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $phone The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildCustomerQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByPhone($phone = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($phone)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $phone)) {
|
||||
$phone = str_replace('*', '%', $phone);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(CustomerTableMap::PHONE, $phone, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the cellphone column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByCellphone('fooValue'); // WHERE cellphone = 'fooValue'
|
||||
* $query->filterByCellphone('%fooValue%'); // WHERE cellphone LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $cellphone The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildCustomerQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByCellphone($cellphone = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($cellphone)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $cellphone)) {
|
||||
$cellphone = str_replace('*', '%', $cellphone);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(CustomerTableMap::CELLPHONE, $cellphone, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the email column
|
||||
*
|
||||
@@ -847,35 +417,6 @@ abstract class CustomerQuery extends ModelCriteria
|
||||
return $this->addUsingAlias(CustomerTableMap::ALGO, $algo, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the salt column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterBySalt('fooValue'); // WHERE salt = 'fooValue'
|
||||
* $query->filterBySalt('%fooValue%'); // WHERE salt LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $salt The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildCustomerQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterBySalt($salt = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($salt)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $salt)) {
|
||||
$salt = str_replace('*', '%', $salt);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(CustomerTableMap::SALT, $salt, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the reseller column
|
||||
*
|
||||
@@ -1102,81 +643,6 @@ abstract class CustomerQuery extends ModelCriteria
|
||||
return $this->addUsingAlias(CustomerTableMap::UPDATED_AT, $updatedAt, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related \Thelia\Model\CustomerTitle object
|
||||
*
|
||||
* @param \Thelia\Model\CustomerTitle|ObjectCollection $customerTitle The related object(s) to use as filter
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildCustomerQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByCustomerTitle($customerTitle, $comparison = null)
|
||||
{
|
||||
if ($customerTitle instanceof \Thelia\Model\CustomerTitle) {
|
||||
return $this
|
||||
->addUsingAlias(CustomerTableMap::CUSTOMER_TITLE_ID, $customerTitle->getId(), $comparison);
|
||||
} elseif ($customerTitle instanceof ObjectCollection) {
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
|
||||
return $this
|
||||
->addUsingAlias(CustomerTableMap::CUSTOMER_TITLE_ID, $customerTitle->toKeyValue('PrimaryKey', 'Id'), $comparison);
|
||||
} else {
|
||||
throw new PropelException('filterByCustomerTitle() only accepts arguments of type \Thelia\Model\CustomerTitle or Collection');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the CustomerTitle relation
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return ChildCustomerQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinCustomerTitle($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$tableMap = $this->getTableMap();
|
||||
$relationMap = $tableMap->getRelation('CustomerTitle');
|
||||
|
||||
// create a ModelJoin object for this join
|
||||
$join = new ModelJoin();
|
||||
$join->setJoinType($joinType);
|
||||
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
|
||||
if ($previousJoin = $this->getPreviousJoin()) {
|
||||
$join->setPreviousJoin($previousJoin);
|
||||
}
|
||||
|
||||
// add the ModelJoin to the current object
|
||||
if ($relationAlias) {
|
||||
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||
$this->addJoinObject($join, $relationAlias);
|
||||
} else {
|
||||
$this->addJoinObject($join, 'CustomerTitle');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the CustomerTitle relation CustomerTitle object
|
||||
*
|
||||
* @see useQuery()
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation,
|
||||
* to be used as main alias in the secondary query
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return \Thelia\Model\CustomerTitleQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useCustomerTitleQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinCustomerTitle($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'CustomerTitle', '\Thelia\Model\CustomerTitleQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related \Thelia\Model\Address object
|
||||
*
|
||||
|
||||
@@ -19,8 +19,6 @@ use Propel\Runtime\Parser\AbstractParser;
|
||||
use Propel\Runtime\Util\PropelDateTime;
|
||||
use Thelia\Model\Address as ChildAddress;
|
||||
use Thelia\Model\AddressQuery as ChildAddressQuery;
|
||||
use Thelia\Model\Customer as ChildCustomer;
|
||||
use Thelia\Model\CustomerQuery as ChildCustomerQuery;
|
||||
use Thelia\Model\CustomerTitle as ChildCustomerTitle;
|
||||
use Thelia\Model\CustomerTitleI18n as ChildCustomerTitleI18n;
|
||||
use Thelia\Model\CustomerTitleI18nQuery as ChildCustomerTitleI18nQuery;
|
||||
@@ -92,12 +90,6 @@ abstract class CustomerTitle implements ActiveRecordInterface
|
||||
*/
|
||||
protected $updated_at;
|
||||
|
||||
/**
|
||||
* @var ObjectCollection|ChildCustomer[] Collection to store aggregation of ChildCustomer objects.
|
||||
*/
|
||||
protected $collCustomers;
|
||||
protected $collCustomersPartial;
|
||||
|
||||
/**
|
||||
* @var ObjectCollection|ChildAddress[] Collection to store aggregation of ChildAddress objects.
|
||||
*/
|
||||
@@ -132,12 +124,6 @@ abstract class CustomerTitle implements ActiveRecordInterface
|
||||
*/
|
||||
protected $currentTranslations;
|
||||
|
||||
/**
|
||||
* An array of objects scheduled for deletion.
|
||||
* @var ObjectCollection
|
||||
*/
|
||||
protected $customersScheduledForDeletion = null;
|
||||
|
||||
/**
|
||||
* An array of objects scheduled for deletion.
|
||||
* @var ObjectCollection
|
||||
@@ -725,8 +711,6 @@ abstract class CustomerTitle implements ActiveRecordInterface
|
||||
|
||||
if ($deep) { // also de-associate any related objects?
|
||||
|
||||
$this->collCustomers = null;
|
||||
|
||||
$this->collAddresses = null;
|
||||
|
||||
$this->collCustomerTitleI18ns = null;
|
||||
@@ -864,24 +848,6 @@ abstract class CustomerTitle implements ActiveRecordInterface
|
||||
$this->resetModified();
|
||||
}
|
||||
|
||||
if ($this->customersScheduledForDeletion !== null) {
|
||||
if (!$this->customersScheduledForDeletion->isEmpty()) {
|
||||
foreach ($this->customersScheduledForDeletion as $customer) {
|
||||
// need to save related object because we set the relation to null
|
||||
$customer->save($con);
|
||||
}
|
||||
$this->customersScheduledForDeletion = null;
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->collCustomers !== null) {
|
||||
foreach ($this->collCustomers as $referrerFK) {
|
||||
if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) {
|
||||
$affectedRows += $referrerFK->save($con);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->addressesScheduledForDeletion !== null) {
|
||||
if (!$this->addressesScheduledForDeletion->isEmpty()) {
|
||||
foreach ($this->addressesScheduledForDeletion as $address) {
|
||||
@@ -1103,9 +1069,6 @@ abstract class CustomerTitle implements ActiveRecordInterface
|
||||
}
|
||||
|
||||
if ($includeForeignObjects) {
|
||||
if (null !== $this->collCustomers) {
|
||||
$result['Customers'] = $this->collCustomers->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
|
||||
}
|
||||
if (null !== $this->collAddresses) {
|
||||
$result['Addresses'] = $this->collAddresses->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
|
||||
}
|
||||
@@ -1279,12 +1242,6 @@ abstract class CustomerTitle implements ActiveRecordInterface
|
||||
// the getter/setter methods for fkey referrer objects.
|
||||
$copyObj->setNew(false);
|
||||
|
||||
foreach ($this->getCustomers() as $relObj) {
|
||||
if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
|
||||
$copyObj->addCustomer($relObj->copy($deepCopy));
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($this->getAddresses() as $relObj) {
|
||||
if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
|
||||
$copyObj->addAddress($relObj->copy($deepCopy));
|
||||
@@ -1338,9 +1295,6 @@ abstract class CustomerTitle implements ActiveRecordInterface
|
||||
*/
|
||||
public function initRelation($relationName)
|
||||
{
|
||||
if ('Customer' == $relationName) {
|
||||
return $this->initCustomers();
|
||||
}
|
||||
if ('Address' == $relationName) {
|
||||
return $this->initAddresses();
|
||||
}
|
||||
@@ -1349,224 +1303,6 @@ abstract class CustomerTitle implements ActiveRecordInterface
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears out the collCustomers collection
|
||||
*
|
||||
* 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
|
||||
* @see addCustomers()
|
||||
*/
|
||||
public function clearCustomers()
|
||||
{
|
||||
$this->collCustomers = null; // important to set this to NULL since that means it is uninitialized
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset is the collCustomers collection loaded partially.
|
||||
*/
|
||||
public function resetPartialCustomers($v = true)
|
||||
{
|
||||
$this->collCustomersPartial = $v;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the collCustomers collection.
|
||||
*
|
||||
* By default this just sets the collCustomers collection to an empty array (like clearcollCustomers());
|
||||
* however, you may wish to override this method in your stub class to provide setting appropriate
|
||||
* to your application -- for example, setting the initial array to the values stored in database.
|
||||
*
|
||||
* @param boolean $overrideExisting If set to true, the method call initializes
|
||||
* the collection even if it is not empty
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function initCustomers($overrideExisting = true)
|
||||
{
|
||||
if (null !== $this->collCustomers && !$overrideExisting) {
|
||||
return;
|
||||
}
|
||||
$this->collCustomers = new ObjectCollection();
|
||||
$this->collCustomers->setModel('\Thelia\Model\Customer');
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets an array of ChildCustomer objects which contain a foreign key that references this object.
|
||||
*
|
||||
* If the $criteria is not null, it is used to always fetch the results from the database.
|
||||
* Otherwise the results are fetched from the database the first time, then cached.
|
||||
* Next time the same method is called without $criteria, the cached collection is returned.
|
||||
* If this ChildCustomerTitle is new, it will return
|
||||
* an empty collection or the current collection; the criteria is ignored on a new object.
|
||||
*
|
||||
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||
* @param ConnectionInterface $con optional connection object
|
||||
* @return Collection|ChildCustomer[] List of ChildCustomer objects
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function getCustomers($criteria = null, ConnectionInterface $con = null)
|
||||
{
|
||||
$partial = $this->collCustomersPartial && !$this->isNew();
|
||||
if (null === $this->collCustomers || null !== $criteria || $partial) {
|
||||
if ($this->isNew() && null === $this->collCustomers) {
|
||||
// return empty collection
|
||||
$this->initCustomers();
|
||||
} else {
|
||||
$collCustomers = ChildCustomerQuery::create(null, $criteria)
|
||||
->filterByCustomerTitle($this)
|
||||
->find($con);
|
||||
|
||||
if (null !== $criteria) {
|
||||
if (false !== $this->collCustomersPartial && count($collCustomers)) {
|
||||
$this->initCustomers(false);
|
||||
|
||||
foreach ($collCustomers as $obj) {
|
||||
if (false == $this->collCustomers->contains($obj)) {
|
||||
$this->collCustomers->append($obj);
|
||||
}
|
||||
}
|
||||
|
||||
$this->collCustomersPartial = true;
|
||||
}
|
||||
|
||||
$collCustomers->getInternalIterator()->rewind();
|
||||
|
||||
return $collCustomers;
|
||||
}
|
||||
|
||||
if ($partial && $this->collCustomers) {
|
||||
foreach ($this->collCustomers as $obj) {
|
||||
if ($obj->isNew()) {
|
||||
$collCustomers[] = $obj;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->collCustomers = $collCustomers;
|
||||
$this->collCustomersPartial = false;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->collCustomers;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a collection of Customer objects related by a one-to-many relationship
|
||||
* to the current object.
|
||||
* It will also schedule objects for deletion based on a diff between old objects (aka persisted)
|
||||
* and new objects from the given Propel collection.
|
||||
*
|
||||
* @param Collection $customers A Propel collection.
|
||||
* @param ConnectionInterface $con Optional connection object
|
||||
* @return ChildCustomerTitle The current object (for fluent API support)
|
||||
*/
|
||||
public function setCustomers(Collection $customers, ConnectionInterface $con = null)
|
||||
{
|
||||
$customersToDelete = $this->getCustomers(new Criteria(), $con)->diff($customers);
|
||||
|
||||
|
||||
$this->customersScheduledForDeletion = $customersToDelete;
|
||||
|
||||
foreach ($customersToDelete as $customerRemoved) {
|
||||
$customerRemoved->setCustomerTitle(null);
|
||||
}
|
||||
|
||||
$this->collCustomers = null;
|
||||
foreach ($customers as $customer) {
|
||||
$this->addCustomer($customer);
|
||||
}
|
||||
|
||||
$this->collCustomers = $customers;
|
||||
$this->collCustomersPartial = false;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the number of related Customer objects.
|
||||
*
|
||||
* @param Criteria $criteria
|
||||
* @param boolean $distinct
|
||||
* @param ConnectionInterface $con
|
||||
* @return int Count of related Customer objects.
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function countCustomers(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
|
||||
{
|
||||
$partial = $this->collCustomersPartial && !$this->isNew();
|
||||
if (null === $this->collCustomers || null !== $criteria || $partial) {
|
||||
if ($this->isNew() && null === $this->collCustomers) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ($partial && !$criteria) {
|
||||
return count($this->getCustomers());
|
||||
}
|
||||
|
||||
$query = ChildCustomerQuery::create(null, $criteria);
|
||||
if ($distinct) {
|
||||
$query->distinct();
|
||||
}
|
||||
|
||||
return $query
|
||||
->filterByCustomerTitle($this)
|
||||
->count($con);
|
||||
}
|
||||
|
||||
return count($this->collCustomers);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method called to associate a ChildCustomer object to this object
|
||||
* through the ChildCustomer foreign key attribute.
|
||||
*
|
||||
* @param ChildCustomer $l ChildCustomer
|
||||
* @return \Thelia\Model\CustomerTitle The current object (for fluent API support)
|
||||
*/
|
||||
public function addCustomer(ChildCustomer $l)
|
||||
{
|
||||
if ($this->collCustomers === null) {
|
||||
$this->initCustomers();
|
||||
$this->collCustomersPartial = true;
|
||||
}
|
||||
|
||||
if (!in_array($l, $this->collCustomers->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
|
||||
$this->doAddCustomer($l);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Customer $customer The customer object to add.
|
||||
*/
|
||||
protected function doAddCustomer($customer)
|
||||
{
|
||||
$this->collCustomers[]= $customer;
|
||||
$customer->setCustomerTitle($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Customer $customer The customer object to remove.
|
||||
* @return ChildCustomerTitle The current object (for fluent API support)
|
||||
*/
|
||||
public function removeCustomer($customer)
|
||||
{
|
||||
if ($this->getCustomers()->contains($customer)) {
|
||||
$this->collCustomers->remove($this->collCustomers->search($customer));
|
||||
if (null === $this->customersScheduledForDeletion) {
|
||||
$this->customersScheduledForDeletion = clone $this->collCustomers;
|
||||
$this->customersScheduledForDeletion->clear();
|
||||
}
|
||||
$this->customersScheduledForDeletion[]= $customer;
|
||||
$customer->setCustomerTitle(null);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears out the collAddresses collection
|
||||
*
|
||||
@@ -2065,11 +1801,6 @@ abstract class CustomerTitle implements ActiveRecordInterface
|
||||
public function clearAllReferences($deep = false)
|
||||
{
|
||||
if ($deep) {
|
||||
if ($this->collCustomers) {
|
||||
foreach ($this->collCustomers as $o) {
|
||||
$o->clearAllReferences($deep);
|
||||
}
|
||||
}
|
||||
if ($this->collAddresses) {
|
||||
foreach ($this->collAddresses as $o) {
|
||||
$o->clearAllReferences($deep);
|
||||
@@ -2086,10 +1817,6 @@ abstract class CustomerTitle implements ActiveRecordInterface
|
||||
$this->currentLocale = 'en_US';
|
||||
$this->currentTranslations = null;
|
||||
|
||||
if ($this->collCustomers instanceof Collection) {
|
||||
$this->collCustomers->clearIterator();
|
||||
}
|
||||
$this->collCustomers = null;
|
||||
if ($this->collAddresses instanceof Collection) {
|
||||
$this->collAddresses->clearIterator();
|
||||
}
|
||||
|
||||
@@ -38,10 +38,6 @@ use Thelia\Model\Map\CustomerTitleTableMap;
|
||||
* @method ChildCustomerTitleQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
||||
* @method ChildCustomerTitleQuery innerJoin($relation) Adds a INNER JOIN clause to the query
|
||||
*
|
||||
* @method ChildCustomerTitleQuery leftJoinCustomer($relationAlias = null) Adds a LEFT JOIN clause to the query using the Customer relation
|
||||
* @method ChildCustomerTitleQuery rightJoinCustomer($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Customer relation
|
||||
* @method ChildCustomerTitleQuery innerJoinCustomer($relationAlias = null) Adds a INNER JOIN clause to the query using the Customer relation
|
||||
*
|
||||
* @method ChildCustomerTitleQuery leftJoinAddress($relationAlias = null) Adds a LEFT JOIN clause to the query using the Address relation
|
||||
* @method ChildCustomerTitleQuery rightJoinAddress($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Address relation
|
||||
* @method ChildCustomerTitleQuery innerJoinAddress($relationAlias = null) Adds a INNER JOIN clause to the query using the Address relation
|
||||
@@ -438,79 +434,6 @@ abstract class CustomerTitleQuery extends ModelCriteria
|
||||
return $this->addUsingAlias(CustomerTitleTableMap::UPDATED_AT, $updatedAt, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related \Thelia\Model\Customer object
|
||||
*
|
||||
* @param \Thelia\Model\Customer|ObjectCollection $customer the related object to use as filter
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildCustomerTitleQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByCustomer($customer, $comparison = null)
|
||||
{
|
||||
if ($customer instanceof \Thelia\Model\Customer) {
|
||||
return $this
|
||||
->addUsingAlias(CustomerTitleTableMap::ID, $customer->getCustomerTitleId(), $comparison);
|
||||
} elseif ($customer instanceof ObjectCollection) {
|
||||
return $this
|
||||
->useCustomerQuery()
|
||||
->filterByPrimaryKeys($customer->getPrimaryKeys())
|
||||
->endUse();
|
||||
} else {
|
||||
throw new PropelException('filterByCustomer() only accepts arguments of type \Thelia\Model\Customer or Collection');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the Customer relation
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return ChildCustomerTitleQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinCustomer($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$tableMap = $this->getTableMap();
|
||||
$relationMap = $tableMap->getRelation('Customer');
|
||||
|
||||
// create a ModelJoin object for this join
|
||||
$join = new ModelJoin();
|
||||
$join->setJoinType($joinType);
|
||||
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
|
||||
if ($previousJoin = $this->getPreviousJoin()) {
|
||||
$join->setPreviousJoin($previousJoin);
|
||||
}
|
||||
|
||||
// add the ModelJoin to the current object
|
||||
if ($relationAlias) {
|
||||
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||
$this->addJoinObject($join, $relationAlias);
|
||||
} else {
|
||||
$this->addJoinObject($join, 'Customer');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the Customer relation Customer object
|
||||
*
|
||||
* @see useQuery()
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation,
|
||||
* to be used as main alias in the secondary query
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return \Thelia\Model\CustomerQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useCustomerQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinCustomer($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'Customer', '\Thelia\Model\CustomerQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related \Thelia\Model\Address object
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user