Skip to main content

[jpa-spec users] [jsr338-experts] scope of EntityGraphs

  • From: Pinaki Poddar <ppoddar@...>
  • To: jsr338-experts@...
  • Subject: [jpa-spec users] [jsr338-experts] scope of EntityGraphs
  • Date: Mon, 15 Apr 2013 15:57:31 -0700
  • List-id: <>

The scope of EntityGraph should be persistence unit, not persistence context.

The method such as EntityManager.createEntityGraph(String name) etc. looks non-intuitive. If an application wants to create a graph at runtime,  it should call EntityManagerFactory.createEntityGraph(String name).

As the API currently stands, it seems to allow EntityGraph of the same name be defined by two separate persistence contexts -- opening up a pandora's box of confusion. It is much safer to define these graphs scoped at EntityManagerFactory level and imposing uniqueness on the name of the graphs.

Regards --

Pinaki Poddar                          
Chair, Apache OpenJPA Project 
JPA Expert Group Member
Application & Integration Middleware

[jpa-spec users] [jsr338-experts] scope of EntityGraphs

Pinaki Poddar 04/15/2013

[jpa-spec users] [jsr338-experts] Re: scope of EntityGraphs

Linda DeMichiel 04/15/2013

[jpa-spec users] [jsr338-experts] Re: scope of EntityGraphs

Pinaki Poddar 04/16/2013
Please Confirm