-->
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: Entity property change notification before on update.
PostPosted: Fri Feb 13, 2009 7:58 am 
Newbie

Joined: Thu Mar 15, 2007 7:43 am
Posts: 8
Hi All,

Is there a possibility using Hibernate to know some property is changed while doing the update. Hibernate internally finds it out before preparing the update Statement but is there a way Hibernate tells the application. This property was changed or collection of properties were changed.

Let me elobarate the requirement. I have a customer object if some of his property changes I need to store that column name, old value and new value into the database table.

In following example. If Customer name and his billing address street changes then I would insert two records in database

1)
columname - name
old value - Peter
new value - Thomas

2)
column name - street
old value - wall street
new value - east street

Classes look like as below.

class Customer
name String;
bilingAddress BillingAddress;

class BillingAddress
street String;
city String;

We use Hibernate version 3

Any help would be apreciated.

Best Regards
Prasad


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.