Reviewers: rdayal,

Message:
http://code.google.com/p/google-web-toolkit/issues/detail?id=5952

Description:
Fix for issue 5952: RequestContext#isChanged.

The issue is that as soon as a EntityProxy references another
EntityProxy, the reference property is seen as changed by
AutoBeanUtils.diff(), because the referenced EntityProxy is
automatically edit()ed too, and equals() against its immutable parent
version returns false (because they have different RequestContext).
The workaround is to null the RequestContext of all the edited entities
before diff'ing so equals() returns what we want.
We also temporarily lock the RequestContext so that resolving properties
during diff'ing won't auto-edit new proxies.
And we of course restore everything to the previous state afterwards.

Please review this at http://gwt-code-reviews.appspot.com/1601806/

Affected files:
M user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java M user/test/com/google/web/bindery/requestfactory/gwt/client/RequestFactoryTest.java


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

Reply via email to