Re: RequestFactory: persisting object graph
Thanks, you have given me a very good clarification.
-- Two follow up questions if I may:
- Is there a way to know which graph "nodes" have been edited on the client so that my server service only persists those or is that also a business thing?
- Similarly, if on the client I add a new "node" to my graph. Does it also get reconstructed on the server by RF?
- Similarly, if on the client I add a new "node" to my graph. Does it also get reconstructed on the server by RF?
Thanks, thanks a lot.
On Friday, 4 October 2013 11:45:32 UTC+2, Thomas Broyer wrote:
On Friday, 4 October 2013 11:45:32 UTC+2, Thomas Broyer wrote:
"saving" is a business thing. RF will reconstruct the "object graph" on the server-side before passing it to service methods (one of which can be about "saving"). Whether the whole graph is persisted at once (cascading) or you need to call a "save" service method for each "node" is a business decision or technical constraint, but in any case RF doesn't care.Note that RF does care that you have a request-scoped entity cache though (Objectify has one, I don't know if it's enabled by default or not though)
On Friday, October 4, 2013 11:00:37 AM UTC+2, Manu Botija wrote:Hi,Just a quick question for clarification.With RF, we can send to the server an entire Object graph thanks to the with() method. This object graph may of course have its own entities inside (persisted entities I mean) which if we are using frameworks like Objectify will get loaded automatically.Now, let's say we edit the object graph in the client and maybe also add a few new nodes.Is then the client responsible for persisting any entitiy that has changed on the object graph which is not the root object of the graph as well as the newly created ones? Or is there a similar "auto-graph-save" like in the load case? If yes, how does it work?Sorry for making too many questions but I can't find answers anywhere else.Thanks,Manuel
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home