KnpLabs / DoctrineBehaviors

Doctrine2 behavior traits that help handling Blameable, Loggable, Sluggable, SoftDeletable, Uuidable, Timestampable, Translatable, Tree behavior
http://knplabs.com
MIT License
911 stars 287 forks source link

Sluggable doesn't work with multiple Entity Managers and Connections #707

Open jfsenechal opened 1 year ago

jfsenechal commented 1 year ago

Hi,

if there are several connections configured like here

https://symfony.com/doc/current/doctrine/multiple_entity_managers.html

The connection taken in the file, Knp\DoctrineBehaviors\Repository\DefaultSluggableRepository is the connection by "default" and not customer connection

The class 'App\Entity\Customer\Man' was not found in the chain configured namespaces App\Entity\Main

Is there a way to configure this ?