EkinoWordpressBundle icon indicating copy to clipboard operation
EkinoWordpressBundle copied to clipboard

Model return empty entity when multiple Entity Manager

Open lele140686 opened this issue 9 years ago • 2 comments

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.

lele140686 avatar Feb 04 '16 15:02 lele140686

hello,

same problem for me

epci avatar Mar 02 '16 13:03 epci

Hi @lele140686,

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

eko avatar Apr 20 '16 19:04 eko