I'm working with a legacy system that has multiple systems updating the data, not all user Hibernate.
Using dynamicUpdate, the query size is smaller and the update is actually faster (tested), so that's a plus, but it's not solving our biggest issue.
Is there a way for Hiberate to detect changed columns on a mapped object *without* comparing it to the database?
We have 3 use cases that need this: 1) User A and User B both modify the same object, but User A changes field 2 and User B changes field 5. Both of their updates should succeed. 2) User A opens mapped object MyObject and makes a change to field 1. While it's open, before User A saves, an update service, Service B, from another non-Hibernate system updates field 4 of that object. User A's changes will overwrite Service B's change. 3) MyObject has been created and updated by users and is happy. A web-service call that only sends a few fields creates a Hibernate object and updates; the fields not included in the web-service call are nulled out.
I'm about to embark on an originalState/currentState implementation that only updates the fields actually changed by the user or the fields actually specified by the web service, and ignore the other fields.
Is there anything out there that already does this? Our team has googled for days and we haven't seen anything.
Thanks in advance, Larry
|