You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 of EntityManager, EntityAgent, and EntityManagerFactory and pull up all the operations to this supertype.
Add a createGraph() method to EntityType, making it possible to write Book_.class_.createGraph().
Note that these enhancements should be completely trivial to implement for any existing JPA provider.
The text was updated successfully, but these errors were encountered:
Currently operations for obtaining an
EntityGraph
are distributed apparently at random betweenEntityManager
andEntityManagerFactory
. By rights they belong onEntityManagerFactory
, but I suppose people wanted to economize on a call togetEntityManagerFactory()
for typical usage patterns. NowEntityAgent
is also in the picture.I have two proposals:
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.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.
The text was updated successfully, but these errors were encountered: