-
Notifications
You must be signed in to change notification settings - Fork 67
Open
Labels
candidate-for-4Good candidate for JPA 4Good candidate for JPA 4
Description
Currently operations for obtaining an EntityGraph
are distributed apparently at random between EntityManager
and EntityManagerFactory
. By rights they belong on EntityManagerFactory
, but I suppose people wanted to economize on a call to getEntityManagerFactory()
for typical usage patterns. Now EntityAgent
is also in the picture.
I have two proposals:
- Create a
GraphFactory/Registry/Manager
interface—or whatever you prefer to call it—as a supertype ofEntityManager
,EntityAgent
, andEntityManagerFactory
and pull up all the operations to this supertype. - Add a
createGraph()
method toEntityType
, making it possible to writeBook_.class_.createGraph()
.
Note that these enhancements should be completely trivial to implement for any existing JPA provider.
AleksNo and reda-alaoui
Metadata
Metadata
Assignees
Labels
candidate-for-4Good candidate for JPA 4Good candidate for JPA 4