> """
> When querying the server, RequestFactory does not automatically
> populate relations in the object graph. To do this, use the with()
> method on a request and specify the related property name as a String:
>
> Request findReq =
> requestFactory.personRequest().find(personId).with("address");
> """
> Source:http://code.google.com/webtoolkit/doc/trunk/DevGuideRequestFactory.ht...
>
> In your case, you'd have to do a with("b"), as your property is named
> getB(). it works the same whichever the type of the property (B,
> List<B> or Set<B>).
OK, but lets assume this:
At the beginning there are lots of Person entities. I don't need their
addresses until user choses one particular Person entity. So at the
beginning I do:
requestFactory.personRequest().findAll();
Then, user chooses one particular Person entity and this is a moment
when I need address entity. I can do:
requestFactory.personRequest().find(personId),with("address");
But this will cause:
1. Getting of Person entity which I already hold.
2. Creating new instance of Person entity and I have to look after
proper instance, as the old one does not contain address.
Is there any other way to solve this without above side effects?
Best regards!
Rafal
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
No comments:
Post a Comment