symfony - Symfony2 - Share Entity Between Bundles with different relationships -
how share entity between multiple bundles different relationships? for example both zooanimalbundle , farmanimalbundle need user entity. third bundle accountuserbundle has user entity. in both zoo , farm animalbundles create user entity so: use account\userbundle\entity\user baseuser; class user extends baseuser { } i have hospital entity in zoo: class hospital { /** * @orm\manytomany(targetentity="zoo\anaimalbundle\entity\user") * @orm\jointable(name="users_zoo_animals") */ protected $users; and room entity in farm: class room { /** * @orm\manytomany(targetentity="farm\anaimalbundle\entity\user") * @orm\jointable(name="users_farm_animals") */ protected $users; everything works far in can call zoo.room->getusers() or farm.hospital->getusers() however problem i'm not sure on how set inverse relationship in respective user entities. if example update farmanimal user entity , run doctrine:generate:entitie...