[bugfix] if BIGINT or SMALLINT version field was not incremented.
Made version field accepted type coherent between ClassMetadataInfo and BasicEntityPersister
This commit is contained in:
parent
1414cc315e
commit
bd0e0c3fcf
1 changed files with 3 additions and 1 deletions
|
@ -464,7 +464,9 @@ class BasicEntityPersister
|
||||||
$params[] = $this->class->reflFields[$versionField]->getValue($entity);
|
$params[] = $this->class->reflFields[$versionField]->getValue($entity);
|
||||||
|
|
||||||
switch ($versionFieldType) {
|
switch ($versionFieldType) {
|
||||||
|
case Type::SMALLINT:
|
||||||
case Type::INTEGER:
|
case Type::INTEGER:
|
||||||
|
case Type::BIGINT:
|
||||||
$set[] = $versionColumn . ' = ' . $versionColumn . ' + 1';
|
$set[] = $versionColumn . ' = ' . $versionColumn . ' + 1';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -1974,4 +1976,4 @@ class BasicEntityPersister
|
||||||
$sql = implode(' AND ', $filterClauses);
|
$sql = implode(' AND ', $filterClauses);
|
||||||
return $sql ? "(" . $sql . ")" : ""; // Wrap again to avoid "X or Y and FilterConditionSQL"
|
return $sql ? "(" . $sql . ")" : ""; // Wrap again to avoid "X or Y and FilterConditionSQL"
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue