sonata-project/SonataDoctrineORMAdminBundle — Issue #16: Primary key with "-" Throws warning
Author: torstenzander
Created: 2011-11-23 09:41:21+00:00
State: open

I Have a primary key like : 515-666-2902-077228-y9YD

And I get when I try to open the associated dataset a Warning like:

Warning: array_combine() [function.array-combine]: Both parameters should have an equal number of elements in /Users/torsten/Sites/dmr/vendor/bundles/Sonata/DoctrineORMAdminBundle/Model/ModelManager.php line 135

The Problem comes from:

/Users/torsten/Sites/dmr/vendor/bundles/Sonata/DoctrineORMAdminBundle/Model/ModelManager.php at line 135
*/
public function find($class, $id)
{
$values = array_combine($this->getIdentifierFieldNames($class), explode('-', $id));
return $this->entityManager->getRepository($class)->find($values);
}