Thanks for explaining the usage. But I am afraid it looks confusing/non-intuitive to me.
1. If the graphs are in EMF scope, why the following method is on EM?
* Return all named EntityGraphs that have been defined for the provided class type.
* @param entityClass entity class
* @return list of all entity graphs defined for the entity
* @throws IllegalArgumentException if the class is not an entity
public <T> List<EntityGraph<? super T>> getEntityGraphs(Class<T> entityClass);
2. If two entitymanagers separately call createEntityGraph(String egName) but with the same input argument, they get two separate mutable copies -- right?
Now if they mutate their respective copies differently and replace back to the EMF, which copy of the original graph wins?
The other entitymanagers later when gets the graph by the same name will now receive a graph with new structure -- right?
So then what does immutability will signify in such case?
3. And above all, why all these needless complexity?
Chair, Apache OpenJPA Project http://openjpa.apache.org/
JPA Expert Group Member
Application & Integration Middleware
Linda DeMichiel ---04/15/2013 04:38:18 PM---On 4/15/2013 3:57 PM, Pinaki Poddar wrote: > The scope of EntityGraph should be persistence unit, no
From: Linda DeMichiel <linda.demichiel@...>
Date: 04/15/2013 04:38 PM
Subject: [jsr338-experts] Re: scope of EntityGraphs
[jpa-spec users] [jsr338-experts] Re: scope of EntityGraphs