symfony/symfony — pull request #6150 by woodspire (2012-11-29 15:51:49+00:00)
Title: Fix ModelChoiceList problem with string key

The ModelChoiceList code was based on EntityChoiceList for doctrine, but a critical misinterpretation happen.

I have a list where one key is : "1SER+"

This crash symfony in ChoiceList addChoice code when the index (1SER+) is not a valid form name.
This happen because the ModelChoiceList thinks that because there is only 1 column in the primary key, it will be an integer.

I modified the code to reflect the way EntityChoiceList does it.

I will also send a pull request in the propel1 project to add the isInteger() function in ColumnMap.

isNumeric() is present, but it cannot be used, because 2.34 contains a dot, and it cannot be used has a form name.