1
0
mirror of synced 2024-12-14 07:06:04 +03:00

[DDC-1290] Allow smallint and bigint for version fields

This commit is contained in:
Benjamin Eberlei 2011-07-26 22:24:16 +02:00
parent 2a59da1f03
commit cbf210605a

View File

@ -1800,7 +1800,7 @@ class ClassMetadataInfo implements ClassMetadata
$this->versionField = $mapping['fieldName'];
if ( ! isset($mapping['default'])) {
if ($mapping['type'] == 'integer') {
if (in_array($mapping['type'], array('integer', 'bigint', 'smallint'))) {
$mapping['default'] = 1;
} else if ($mapping['type'] == 'datetime') {
$mapping['default'] = 'CURRENT_TIMESTAMP';