-->
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: lastModified / dynamic-update
PostPosted: Thu Jan 08, 2004 7:28 am 
Beginner
Beginner

Joined: Thu Oct 30, 2003 6:29 am
Posts: 30
Location: Germany, KA
hi,

I want to implement a lastModified / modifiedBy property to all my persisten objects. all my objects subclass "PersistentObject" which already contains those properties. but now i want to implement a mechanism in this superclass that allows me to set those properties (maybe using the callbacks of hibernate). but therfore th emthod has to determine wether an entity really changed or not.
I stumbled over the dynamic-update property of the <class>-tag in the
hibernate-mapping-definition and I was wondering how this feature works internally, because it somehow must determine if an entity changed.

is there an easy way? how about performance? are both states of the persistent object accessible without querying the db (a) the one on the database and (b) the most actual one of the object before calling hibSess.save(obj)?

thanks alot
marie


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 12, 2004 7:39 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Interceptor.onFlushDirty() is called for dirty entities.
Check
http://www.hibernate.org/Documentation/PageViewAndUserTrackingViaInterceptors

_________________
Emmanuel


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.