[Persisters] removed unused local variables in BasicEntityPersister class.
This commit is contained in:
parent
74f52a055e
commit
d4bcbd4741
@ -498,7 +498,6 @@ class BasicEntityPersister
|
||||
continue;
|
||||
}
|
||||
|
||||
$oldVal = $change[0];
|
||||
$newVal = $change[1];
|
||||
|
||||
if (isset($this->_class->associationMappings[$field])) {
|
||||
@ -711,7 +710,6 @@ class BasicEntityPersister
|
||||
*/
|
||||
public function loadAll(array $criteria = array(), array $orderBy = null, $limit = null, $offset = null)
|
||||
{
|
||||
$entities = array();
|
||||
$sql = $this->_getSelectEntitiesSQL($criteria, null, 0, $limit, $offset, $orderBy);
|
||||
list($params, $types) = $this->expandParameters($criteria);
|
||||
$stmt = $this->_conn->executeQuery($sql, $params, $types);
|
||||
@ -995,7 +993,7 @@ class BasicEntityPersister
|
||||
$assocAlias = 'e' . ($eagerAliasCounter++);
|
||||
$this->_rsm->addJoinedEntityResult($assoc['targetEntity'], $assocAlias, 'r', $assocField);
|
||||
|
||||
foreach ($eagerEntity->fieldNames AS $field) {
|
||||
foreach ($eagerEntity->fieldNames as $field) {
|
||||
if ($columnList) $columnList .= ', ';
|
||||
|
||||
$columnList .= $this->_getSelectColumnSQL($field, $eagerEntity, $assocAlias);
|
||||
@ -1016,7 +1014,7 @@ class BasicEntityPersister
|
||||
$this->_selectJoinSql .= ' ' . $eagerEntity->getQuotedTableName($this->_platform) . ' ' . $this->_getSQLTableAlias($eagerEntity->name, $assocAlias) .' ON ';
|
||||
|
||||
$tableAlias = $this->_getSQLTableAlias($assoc['targetEntity'], $assocAlias);
|
||||
foreach ($assoc['sourceToTargetKeyColumns'] AS $sourceCol => $targetCol) {
|
||||
foreach ($assoc['sourceToTargetKeyColumns'] as $sourceCol => $targetCol) {
|
||||
if ( ! $first) {
|
||||
$this->_selectJoinSql .= ' AND ';
|
||||
}
|
||||
@ -1037,7 +1035,7 @@ class BasicEntityPersister
|
||||
$this->_selectJoinSql .= ' ' . $eagerEntity->getQuotedTableName($this->_platform) . ' '
|
||||
. $this->_getSQLTableAlias($eagerEntity->name, $assocAlias) . ' ON ';
|
||||
|
||||
foreach ($owningAssoc['sourceToTargetKeyColumns'] AS $sourceCol => $targetCol) {
|
||||
foreach ($owningAssoc['sourceToTargetKeyColumns'] as $sourceCol => $targetCol) {
|
||||
if ( ! $first) {
|
||||
$this->_selectJoinSql .= ' AND ';
|
||||
}
|
||||
@ -1139,7 +1137,7 @@ class BasicEntityPersister
|
||||
$columns = array_unique($columns);
|
||||
|
||||
$values = array();
|
||||
foreach ($columns AS $column) {
|
||||
foreach ($columns as $column) {
|
||||
$placeholder = '?';
|
||||
|
||||
if (isset($this->_class->fieldNames[$column]) &&
|
||||
@ -1267,7 +1265,7 @@ class BasicEntityPersister
|
||||
|
||||
list($params, $types) = $this->expandParameters($criteria);
|
||||
|
||||
$stmt = $this->_conn->executeQuery($sql, $params, $types);
|
||||
$this->_conn->executeQuery($sql, $params, $types);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1418,7 +1416,7 @@ class BasicEntityPersister
|
||||
{
|
||||
$params = $types = array();
|
||||
|
||||
foreach ($criteria AS $field => $value) {
|
||||
foreach ($criteria as $field => $value) {
|
||||
if ($value === null) {
|
||||
continue; // skip null values.
|
||||
}
|
||||
@ -1539,7 +1537,7 @@ class BasicEntityPersister
|
||||
$sql .= ' AND ' . $filterSql;
|
||||
}
|
||||
|
||||
list($params, $types) = $this->expandParameters($criteria);
|
||||
list($params) = $this->expandParameters($criteria);
|
||||
|
||||
return (bool) $this->_conn->fetchColumn($sql, $params);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user