From 673fd9bc276571c765dfe9e792e62090f1559c8d Mon Sep 17 00:00:00 2001 From: Simon Terrien Date: Fri, 29 Mar 2013 10:20:11 +0100 Subject: [PATCH] idAsIndex should be true with a smallint or bigint id field. --- .../Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php index e34c3e5bf4..14193523f2 100644 --- a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php +++ b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php @@ -111,7 +111,7 @@ class EntityChoiceList extends ObjectChoiceList $this->idField = $identifier[0]; $this->idAsValue = true; - if ('integer' === $this->classMetadata->getTypeOfField($this->idField)) { + if (in_array($this->classMetadata->getTypeOfField($this->idField), array('integer', 'smallint', 'bigint'))) { $this->idAsIndex = true; } }