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
|