cedriclombardot/AdmingeneratorGeneratorBundle — Issue #47: Problems with filtering
Author: suncat2000
Created: 2011-11-21 12:13:32+00:00
State: open

I have a entity Dealers with two referencing manyToOne:

* partners
* city

Dealers.orm.yml:

...\Entity\Dealers:
type: entity
table: dealers
repositoryClass: ...\Entity\DealersRepository
id:
id:
type: bigint
generator:
strategy: IDENTITY
fields:

....

manyToOne:
partner:
targetEntity: ...\Entity\Partners
city:
targetEntity: ...\Entity\Cities

Partners.orm.yml:

....
oneToMany:
dealers:
targetEntity: ...\Entity\Dealers
mappedBy: partner
....

Cities.orm.yml:

....
oneToMany:
dealers:
targetEntity: ...\Entity\Dealers
mappedBy: city
....

dealers-generator.yml:

...
generator: admingenerator.generator.doctrine
params:
model: ...\Entity\Dealers
fields:
...
partner:
label: Partner
getter: partner.title
addFormOptions:
property: title
city:
label: City
getter: city.title
addFormOptions:
property: title
builders:
filters:
params:
fields:
display: [ is_published, address, partner, city ]
...

and I decided to add the ability to filter the list of dealers in these fields.

Without error operates only on filtration by "partners".
When I try to filter by "city" field, getting a few exceptions, the first of them:

ErrorException: Notice: serialize() [function.serialize]: "id" returned as member variable from __sleep() but does not exist in .../vendor/symfony/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php line 29

Further more the exception list (28) different classes:

Exception: ClassName:: serialize () must return a string or NULL

Have any ideas how to fix it?