coopTilleuls / CoopTilleulsAclSonataAdminExtensionBundle

ACL list filtering for SonataAdmin
http://les-tilleuls.coop
MIT License
45 stars 21 forks source link

custom id doesn't work #13

Closed Donjohn closed 9 years ago

Donjohn commented 10 years ago

i have a table with id different from usual "id", let's say i call the field table_id

well, it's not compatible with the bundle because in file CoopTilleuls\Bundle\AclSonataAdminExtensionBundle\Admin\AclAdminExtension line 99 you wrote : ->andWhere('o.id IN (:ids)')

it triggers a Doctrine Exception since my table with alias "o" has no field called id

fixed it temporary with ->andWhere('o IN (:ids)')

works fine :)

hope i'll get a proper fix next update

dunglas commented 10 years ago

@Donjohn can you make a PR with your fix and add tests for that?