Re: Best practice: Using fetch groups or a simple DTO?

2011-07-29 Thread Daryl Stultz
On Tue, Jul 26, 2011 at 6:02 AM, M. Walter marc.wal...@sbb.ch wrote: I did the following: final OpenJPAQuery ojpaQuery = OpenJPAPersistence.cast(em.createNamedQuery( StammdatenQueryNames.FIND_ALL_BP.name())); ojpaQuery.getFetchPlan().removeFetchGroup(FetchGroup.NAME_DEFAULT);

Re: Best practice: Using fetch groups or a simple DTO?

2011-07-27 Thread M. Walter
: http://openjpa.208410.n2.nabble.com/Best-practice-Using-fetch-groups-or-a-simple-DTO-tp6598057p6625117.html Sent from the OpenJPA Users mailing list archive at Nabble.com.

Re: Best practice: Using fetch groups or a simple DTO?

2011-07-26 Thread M. Walter
(FetchGroup.NAME_DEFAULT); ojpaQuery.getFetchPlan().addFetchGroup(short); final ListBp result = ojpaQuery.getResultList(); All fields and all relationships are loaded. Another idea? -- View this message in context: http://openjpa.208410.n2.nabble.com/Best-practice-Using-fetch-groups-or-a-simple-DTO

Re: Best practice: Using fetch groups or a simple DTO?

2011-07-26 Thread Pinaki Poddar
); do ojpaQuery.getFetchPlan().clearFetchGroups(); - Pinaki Poddar Chair, Apache OpenJPA Project -- View this message in context: http://openjpa.208410.n2.nabble.com/Best-practice-Using-fetch-groups-or-a-simple-DTO-tp6598057p6622661.html Sent from the OpenJPA Users mailing list archive

Re: Best practice: Using fetch groups or a simple DTO?

2011-07-26 Thread M. Walter
.n2.nabble.com/Best-practice-Using-fetch-groups-or-a-simple-DTO-tp6598057p6622771.html Sent from the OpenJPA Users mailing list archive at Nabble.com.

Re: Best practice: Using fetch groups or a simple DTO?

2011-07-26 Thread Pinaki Poddar
plan has not regressed. If you can supply a JUnit test with assertions, that will help further analysis. - Pinaki Poddar Chair, Apache OpenJPA Project -- View this message in context: http://openjpa.208410.n2.nabble.com/Best-practice-Using-fetch-groups-or-a-simple-DTO-tp6598057p6622886

Re: Best practice: Using fetch groups or a simple DTO?

2011-07-25 Thread M. Walter
://openjpa.208410.n2.nabble.com/Best-practice-Using-fetch-groups-or-a-simple-DTO-tp6598057p6617686.html Sent from the OpenJPA Users mailing list archive at Nabble.com.

Re: Best practice: Using fetch groups or a simple DTO?

2011-07-25 Thread Rick Curtis
Try removing the default fetchgroup? Thanks, Rick On Mon, Jul 25, 2011 at 4:49 AM, M. Walter marc.wal...@sbb.ch wrote: It does not work as described in the documentation. Or am I missing something? Here is my entity: @Entity @Table(name = BP) @FetchGroup(name = short, attributes = {

Re: Best practice: Using fetch groups or a simple DTO?

2011-07-20 Thread M. Walter
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

Best practice: Using fetch groups or a simple DTO?

2011-07-19 Thread M. Walter
? Thanks for your input! -- View this message in context: http://openjpa.208410.n2.nabble.com/Best-practice-Using-fetch-groups-or-a-simple-DTO-tp6598057p6598057.html Sent from the OpenJPA Users mailing list archive at Nabble.com.