Here's a workaround, if you have collections in your entity then before returning the collection from a data access method like findAll or something, just access each collection property somehow.
For eg. List<User> users = Query.execute().getReturnList(); for(User user : users) user.getAddresses().size(); return users; That should ensure that the collection properties are included in the proxy object that is returned. I think it's some kinda optimization on JPA's part to reduce lookups until they are needed. Heh, lazy! Cheers and thanks for everyone's help. Gaurav On Oct 19, 1:29 pm, keyvez <[email protected]> wrote: > I will try to write a small app from scratch which tries this feature > so I can be sure that I am doing it the right way. > > On Oct 19, 9:40 am, keyvez <[email protected]> wrote: > > > > > Hi, > > > Thanks for the suggestions, my addresses are a set of strings so I > > tried calling like so: > > > Request<UserProxy> createReq = > > request.authenticate().using(user).with("addresses"); > > > createReq.fire(new Receiver<UserProxy>() { > > > @Override > > public void onSuccess( UserProxy authenticatedUser ) { > > > System.out.println(authenticatedUser.getFirstname()); // > > prints "First name of Person" as expected > > > System.out.println(authenticatedUser.getAddresses().size()); // > > prints > > 0 instead of the no. of addresses, which is more than 0 for this user > > } > > > } > > > But it's the same result as before, maybe I am missing another piece > > of the equation. Thanks for your help. > > > Gaurav > > > On Oct 19, 6:18 am, Thomas Broyer <[email protected]> wrote: > > > > On 19 oct, 14:47, agi <[email protected]> wrote: > > > > > Does it work recurential? > > > > so lets say I have classes: > > > > Person > > > > { > > > > List<Address> adresses; > > > > > } > > > > > Address > > > > { > > > > Telephone telephone; > > > > > } > > > > > I should write > > > > personRequest.findAll().with("adresses", "telephone").fire(...) > > > > ? > > > > with("adresses.telephone") -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
