Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Model return empty entity when multiple Entity Manager #105

Open
lele140686 opened this issue Feb 4, 2016 · 2 comments
Open

Model return empty entity when multiple Entity Manager #105

lele140686 opened this issue Feb 4, 2016 · 2 comments

Comments

@lele140686
Copy link

Your Bundle is great but i'm trying to use it with multiple database connections. In Configuration.php you have an option that i used:

->scalarNode('entity_manager')->end()

So my bundle's configuration looks like this:

`ekino_wordpress:

table_prefix: "wp_"

wordpress_directory: "/var/www/html/wordpress"

entity_manager: "secondary"`

Where secondary is the name of one my connections. My connections's configuration looks like this:

`default_entity_manager: primary

    entity_managers:

        primary:

            connection: primary

            mappings:

                AppBundle:  ~

        secondary:

            connection: secondary

            mappings:

                EkinoWordpressBundle: ~`

Where secondary connection connects with Wordpress database. Any of your functions using services ekino.wordpress.manager.(service) returns empty entities value so any Get returns null. If i set up default_entity_manager: secondary works as it should be.

Any hint to manage this? Have you tried before? Issue with this is that I need EkinoWordpressBundle works with non-default entity_manager connection and I suppose entity_manager option into Configuration.php is for it.

Thanks and I'll appreciate a little help.

@epci
Copy link

epci commented Mar 2, 2016

hello,

same problem for me

@eko
Copy link
Collaborator

eko commented Apr 20, 2016

Hi @lele140686,

Have you find a solution concerning this issue?
I will try to reproduce this bug.

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

No branches or pull requests

3 participants