I have entity class Page
with column type=integer
. When I do:
<service id="sonata.admin.pages" class="Main\ProgramBundle\Admin\PageAdmin">
<tag name="sonata.admin" manager_type="orm" group="dashboard" label="Pages"/>
<argument />
<argument>Main\ProgramBundle\Entity\Page</argument>
<argument>SonataAdminBundle:CRUD</argument>
</service>
<service id="sonata.admin.groups" class="Main\ProgramBundle\Admin\GroupAdmin">
<tag name="sonata.admin" manager_type="orm" group="stories" label="Groups"/>
<argument />
<argument>Main\ProgramBundle\Entity\Page</argument>
<argument>SonataAdminBundle:CRUD</argument>
</service>
In short, both sections work on same entity except that each have different queries and forms.
But what happens is that sonata always executes Admin/GroupAdmin, even if I select PageAdmin. How to do this?