This may be a naive question, but how are immutable entities supposed to
work with the RequestContext lifecycle?

I think the more normal approach is something like this:

- fetch an entity using a RequestContext
- start editing it
- commit it back, using the same RequestContext

Alternately you can do this:
 - fetch entity
 - mark as immutable (detach it)
 - keep it in a cache for read-only purposes

It seems like it might be not be legitimate to start editing an
immutable entity without first re-fetching it from the server. You're
editing a random version of the entity that doesn't correspond to
anything on the server. We could create a diff based on that entity and
try to apply it to the server-side object and often it will happen to
work, but I'm not sure that's intended to work? Maybe the "right" thing
to do is to re-fetch the entity when the user starts to edit it, so this
use-case should just be disallowed with a clear error?




http://gwt-code-reviews.appspot.com/1601806/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to