DatatablesBundle
DatatablesBundle copied to clipboard
Using multiple entity namespaces
Not working with multiple namespaces, in factory service only default namespace

@stwe @Seb33300 please help
@mpeshehonov Looks like the feature is not implemented yet. Here's how I went about getting the datatablefactory to work on another entity manager:
- Make a "DatatableFactoryCustomer" class extends DatatableFactory.
- Declare this class in the Services.yaml file and specify variable $em is the "customer" entity manager.
Now you can use autowiring to create this "DatatableFactoryCustomer"
example of services.yaml declaration:
App\Datatable\Customer\DatatableFactoryCustomer: $translator: '@Symfony\Contracts\Translation\TranslatorInterface' $em: '@doctrine.orm.customer_entity_manager'