Hello,
Is there any way to find list of all managed entities that belong to given persistence context?
In my application there are several modules, each having its own persistence.xml and managing different set of entities, thus resulting in several EntityManagers (ie. Sessions in hibernate terms). Then there is main block of code which uses these modules, however if I want to work with some entities I have to know to which PersistenceContext entity belongs and must choose proper EntityManager instance. If there would be any way to obtain list of all managed entities for given EntityManager (its PersistenceContext), I could work with entities transparently, without knowledge where entity belongs to.
Thanks for response Mike
|