Skip to content
This repository has been archived by the owner on Feb 4, 2023. It is now read-only.

Using multiple entity namespaces #947

Open
mpeshehonov opened this issue May 22, 2020 · 2 comments
Open

Using multiple entity namespaces #947

mpeshehonov opened this issue May 22, 2020 · 2 comments

Comments

@mpeshehonov
Copy link

image
image
Not working with multiple namespaces, in factory service only default namespace
image

@mpeshehonov
Copy link
Author

@stwe @Seb33300 please help

mpeshehonov pushed a commit to mpeshehonov/DatatablesBundle that referenced this issue May 25, 2020
mpeshehonov pushed a commit to mpeshehonov/DatatablesBundle that referenced this issue May 25, 2020
mpeshehonov added a commit to mpeshehonov/DatatablesBundle that referenced this issue May 26, 2020
mpeshehonov added a commit to mpeshehonov/DatatablesBundle that referenced this issue May 26, 2020
pokurek added a commit to RedWeb/DatatablesBundle that referenced this issue Jun 16, 2020
@roublarstar
Copy link

@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'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants