David, Thanks for your reply. So the RequestFactory calls persist on my server-entity, because I call "persist" on the Request-object. In this case though, I don't understand why RequestFactory transmits the whole object-graph and what happens to it on the server? Can you elaborate on how I could implement the children's update in the parent entity's persist method?
Thanks, Tobias On Nov 3, 7:54 pm, David Chandler <drfibona...@google.com> wrote: > Tobias, > > RequestFactory doesn't do cascading updates or deletes. You'll have to > make a separate call from the client to do this (or possibly you could > implement in the parent entity's persist() method). By the way, > persist() is just an example method name. As far as RequestFactory is > concerned, it's just another service method that you create. > > HTH, > /dmc > > > > > > > > > > On Wed, Nov 3, 2010 at 12:09 PM, Tobias <thaberm...@gmail.com> wrote: > > Hi, > > > I am working on an example application to learn about RequestFactory > > and the new Editor framework. The idea is to edit a Recipe, which has > > multiple ingredients. The ingredients are displayed in CellTable. This > > still involves a couple of problems (e.g., > >http://groups.google.com/group/google-web-toolkit/browse_thread/threa... > > ), but I got it working to the point, where the Request seems to be > > correcty set up and contains the edited RecipeProxy as well as > > multiple IngredientProxy instances. > > > When I edit a direct property of the Recipe, eg the name (String), on > > the server Recipe.persist() is called and I can save the updated > > object easily (I am using Objectify for this). > > > However, when I am editing a String property "text" on one of the > > Ingredients, Ingredient.persist is NOT called for the edited > > instance. > > > I looked at the raw JSON of the request made, and it seems to include > > the updated Ingredient instance. Unfortunately, the DynatableRf and > > the Expenses examples don't deal with n-ary relationships on the > > entities. How is this done? Are there any more naming conventions for > > handling collections? > > > My proxy interfaces currently look like this: > > > @ProxyFor(Ingredient.class) > > public interface IngredientProxy extends EntityProxy { > > > String getId(); > > > String getText(); > > > void setText(String text); > > > �...@override > > EntityProxyId<IngredientProxy> stableId(); > > > } > > > @ProxyFor(Recipe.class) > > public interface RecipeProxy extends EntityProxy { > > > long getId(); > > > String getName(); > > > void setName(String name); > > > �...@override > > EntityProxyId<RecipeProxy> stableId(); > > > List<IngredientProxy> getIngredients(); > > > void setIngredients(List<IngredientProxy> ingredients); > > } > > > Regards, > > Tobias > > > -- > > 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-tool...@googlegroups.com. > > To unsubscribe from this group, send email to > > google-web-toolkit+unsubscr...@googlegroups.com. > > For more options, visit this group > > athttp://groups.google.com/group/google-web-toolkit?hl=en. > > -- > David Chandler > Developer Programs Engineer, Google Web > Toolkithttp://googlewebtoolkit.blogspot.com/ -- 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-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.