-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Update Only Dirty Fields Changed by User
PostPosted: Tue May 14, 2013 11:51 am 
Newbie

Joined: Tue May 14, 2013 11:37 am
Posts: 1
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.