I haven't changed the collection, and SurveyProxy is an EntityProxy,
not a value proxy.  Here's the code from SimpleRequestProcessor that
handles this:
public boolean visitReferenceProperty(String propertyName, AutoBean<?>
value, PropertyContext ctx) {
  // containsKey to distinguish null from unknown
  if (flatValueMap.containsKey(propertyName)) {
    Class<?> elementType = ctx instanceof CollectionPropertyContext ?
((CollectionPropertyContext) ctx).getElementType() : null;
    Object newValue = EntityCodex.decode(state, ctx.getType(),
elementType, flatValueMap.get(propertyName));
    Object resolved = state.getResolver().resolveDomainValue
(newValue, false);
    service.setProperty(domain, propertyName,
service.resolveDomainClass(ctx.getType()), resolved);
  }
  return false;
}

There's nothing here that checks whether the collection has been
changed.  So unless this is supposed to happen on the client side (so
that the survey permissions object doesn't exist in the payload at
all, and therefore doesn't get visited), I don't see any way for this
to happen.  Should client side code be handling this?  I can debug
through there and try to figure out what's happening if need be.

Thanks for your help!
Ryan

On Jun 20, 1:33 pm, Thomas Broyer <t.bro...@gmail.com> wrote:
> If you haven't changed the collection in any way, and Survey is mapped as an
> EntityProxy (not a ValueProxy), the setter shouldn't be called.
>
> But back to your issue: if Hibernate is supposed to manage the collection,
> you either shouldn't have a setter (probably won't do well with
> RequestFactory though), or implement your setter as
> field.retainAll(newValue) (i.e. modifying the set in-place rather than
> swapping it with a new one)

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to