Pinaki Poddar wrote:
> 
> FetchPlan
> 
Great! But now how does it work? Do you have a detailed example? The OpenJPA
documentation is very spare about it (Chapter 5.7 of the reference guide
just lists the interface's methods - there are no hints about the results
and the Magazine entity is not complete).

My questions:
1) There is no way to dynamically create a new FetchPlan at runtime? I have
to declare FetchGroup by annotations first in order to use the FetchPlan
feature?
2) When I have an entity with 15 fields and I would like to load only two of
them (no relations), I have to create a FetchGroup accordingly. In the next
step I execute OpenJPAPersistence.cast(...), add my FetchGroup and then what
exactly do I get? My entity with the two fields only? My entity with two
fields filled and the remains initialized to default values?
3) What will be the result if the entity has some relations? Are they
initialized with "null" if they are not defined in my custom FetchGroup?

I'm using OpenJPA 1.2.3 so please keep that in mind when answering. Thank
you!

--
View this message in context: 
http://openjpa.208410.n2.nabble.com/Best-practice-Using-fetch-groups-or-a-simple-DTO-tp6598057p6601589.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to