Re: fetch group question

2007-10-15 Thread Joerg von Frantzius
A workaround could be to define a fetch group for every single field in the .jdo file, and then assembling the desired combination at runtime (I remember somebody having done that before). Karan Malhi schrieb: > Sorry, > > The code should read as: > Query query = pm.newQuery(Person.class); > Fetch

Re: fetch group question

2007-10-15 Thread Matthew Adams
Hi Karan, Currently, there is no standardized way to dynamically define fetch groups. We'll look into adding this to the specification. You might consider requesting this of your current JDO vendor. Thanks for your feedback! Sincerely, Matthew On Oct 14, 2007, at 7:43 PM, Karan Malhi wr

Re: fetch group question

2007-10-14 Thread Karan Malhi
Sorry, The code should read as: Query query = pm.newQuery(Person.class); FetchGroup criteria = new FetchGroup(Person.class); // or I could also do // FetchGroup criteria = new FetchGroup(query); criteria.add("firstName").add("lastName"); query.getFetchPlan().clearGroups().addGroup(criteria); On

fetch group question

2007-10-14 Thread Karan Malhi
For a PC object like class Person{ String firstName; String lastName; String address; } Currently I can set a named fetch-group in the .jdo file and add it in the fetch plan. It would've been great if I would've been able to do the following: Query query = pm.newQuery(Person.class);