Yes, the correct entity is updated during the save procedure in my PocoSaveAdapter class.
I can retrieve these POCO objects, modify them at the client, verify the entity state has changed, and persist the changes via the SaveChanges method. At some point after the changes have been saved, the EM throws an exception on the client side (see the above exception).
I have a method defined as follows:
public void UpdateCustomField(CustomField current, CustomField original)
If I set a breakpoint at the beginning of this method, both "current" and "original" are fully populated objects, with the same ID. This method executes without exceptions. After updating and receiving the exception, if I restart my application I can pull up the entity and verify the changes were persisted.
The DevForce internal post save client-side merge operation is failing for POCO objects only. If I don't modify a POCO object, everything works as expected.
It might be worth noting that I couldn't get an EntityServerPocoSaveAdapter implementation to be discovered, but the convention based approach outlined in the wiki at http://drc.ideablade.com/xwiki/bin/view/Documentation/POCOSupportInDevForce - worked.
I'd prefer the EntityServerPocoSaveAdapter approach, due to the BeforeSave and AfterSave overrides.
|