8000 merged branch sterrien/patch-4 (PR #7519) · symfony/symfony@bf7daa1 · GitHub
[go: up one dir, main page]

Skip to content

Commit bf7daa1

Browse files
committed
merged branch sterrien/patch-4 (PR #7519)
This PR was merged into the 2.1 branch. Discussion ---------- [Form] [Doctrine] [EntityChoiceList] idAsIndex should be true with a smallint id field. When the id of an entity is a smallint, $this->idAsIndex should also be true. It was not the case. Bug fix: yes Feature addition: no Backwards compatibility break: no Symfony2 tests pass: should License of the code: MIT Commits ------- 673fd9b idAsIndex should be true with a smallint or bigint id field.
2 parents e57b4e5 + 673fd9b commit bf7daa1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public function __construct(ObjectManager $manager, $class, $labelPath = null, E
111111
$this->idField = $identifier[0];
112112
$this->idAsValue = true;
113113

114-
if ('integer' === $this->classMetadata->getTypeOfField($this->idField)) {
114+
if (in_array($this->classMetadata->getTypeOfField($this->idField), array('integer', 'smallint', 'bigint'))) {
115115
$this->idAsIndex = true;
116116
}
117117
}

0 commit comments

Comments
 (0)
0