-->
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.  [ 2 posts ] 
Author Message
 Post subject: Write change records
PostPosted: Wed May 06, 2009 2:25 am 
Newbie

Joined: Sun Nov 30, 2008 8:54 am
Posts: 4
Hello,
is there a posibility to automatically write change records to a table or logfile for some classes?

Example:

class person {
private int id;
private String name;
private string forename;
}

Persistent state:
1 Mueller Jon

-> Forename is updatet to George
New persistant state:
1 Mueller George

A change record similar to this should be generated:
Type: Person
Id: 1
Property: Forename
New Value: George
Old Value: Jon
Timestamp: 20090506101223

Thanks
Andi


Top
 Profile  
 
 Post subject: Re: Write change records
PostPosted: Wed May 06, 2009 2:43 am 
Regular
Regular

Joined: Thu Sep 06, 2007 2:22 am
Posts: 108
Location: Noida,India
You can do this by Intercepting Hibernate events.

Read section 12.3.2 from "Java Persistence With Hibernate".


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

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.