I have found out a few more details
relating to this problem.
I have an Editor that implements
LeafValueEditor<List<PhoneProxy>>.
When a user
wants to add a new PhoneProxy to my editor I call
context.create().
Sometimes the user cancels the process.
When
the user cancels the process the PhoneProxy created remains in the
list of beans that are sent to the server for constraint validation.
This always fails because the PhoneProxy has been cleared out by the
cancel operation.
It seems like there may be a
bug here. The canceled ProxyPhone bean shows up in the list to be
validated but when I override the ServiceLayerDecorator.validate
method bypassing validation it is removed prior to the persist()
method.
When trying to save a complex EntityProxy I receive validation errors on empty entities that should not be there. When I inspect the entity to be sent to the server I see a total of 6 entities to be saved but when I inspect the IdToEntityMap that is used for validation I see a total of 9 entities to be validated. The 3 additional entities are just empty entities. If I disable validation through my ServiceLayerDecorator the empty entities do not show up on the server, just the entities I submitted.
Here is the entities I see when validate is called:
{1@1@com.mjnservices.lms.core.shared.model.proxy.EmailProxy=com.google.web.bindery.autobean.vm.impl.ProxyAutoBean@42538425, 2@1@com.mjnservices.lms.core.shared.model.proxy.PhoneProxy=com.google.web.bindery.autobean.vm.impl.ProxyAutoBean@33d2158c, 3@1@com.mjnservices.lms.core.shared.model.proxy.AddressProxy=com.google.web.bindery.autobean.vm.impl.ProxyAutoBean@58d48756, "5"@0...@com.mjnservices.lms.core.shared.model.proxy.PhoneProxy=com.google.web.bindery.autobean.vm.impl.ProxyAutoBean@69014ca9, "1"@0...@com.mjnservices.lms.core.shared.model.proxy.EmailProxy=com.google.web.bindery.autobean.vm.impl.ProxyAutoBean@5450211a, "1"@0...@com.mjnservices.lms.core.shared.model.proxy.AddressProxy=com.google.web.bindery.autobean.vm.impl.ProxyAutoBean@35ca01cb, "3"@0...@com.mjnservices.lms.core.shared.model.proxy.PhoneProxy=com.google.web.bindery.autobean.vm.impl.ProxyAutoBean@58ad5d34, "3"@0...@com.mjnservices.lms.core.shared.model.proxy.ContactProxy=com.google.web.bindery.autobean.vm.impl.ProxyAutoBean@78b8f5f5, "3"@0...@com.mjnservices.lms.core.shared.model.proxy.RegisteredUserProxy=com.google.web.bindery.autobean.vm.impl.ProxyAutoBean@f62b12d}
The first 3 are the empty ones and the last 6 are the ones I submitted. Does anyone have any ideas why I would have additional entities present for validation?
Thanks!
Steve