From cbf210605a80da33dd0090ba488118102b518359 Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Tue, 26 Jul 2011 22:24:16 +0200 Subject: [PATCH] [DDC-1290] Allow smallint and bigint for version fields --- lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php b/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php index 7c5cf8d26..a707577d7 100644 --- a/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php +++ b/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php @@ -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';