-->
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.  [ 4 posts ] 
Author Message
 Post subject: Update "problem"?
PostPosted: Tue Apr 04, 2006 12:01 pm 
Beginner
Beginner

Joined: Tue Mar 21, 2006 5:49 pm
Posts: 20
I have small issue I am not sure how to solve..

I load a parent object with children objects and afterward I save the parent object cascading to the children. But there is one problem. Every object that has been changed and actually updated in the database, needs to have one additionally change written to the database. i.e every object has one field that needs to be updated if and only if the object has been changed.

How do I solve this? A loop that checks every every object if they have been changed and then update the needed field if so is the case? Or is there a more practically way?



Regards,

BTJ

_________________
Someone wrote:
"I understand that if you play a Windows CD backwards you hear strange Satanic messages"
To which someone replied:
"It's even worse than that; play it forwards and it installs Windows"


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 04, 2006 12:44 pm 
Senior
Senior

Joined: Wed Aug 17, 2005 12:56 pm
Posts: 136
Location: Erie, PA (USA)
What about an Interceptor? Search for audit interceptor from the Hibernate main page.

Curtis ...


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 04, 2006 12:51 pm 
Beginner
Beginner

Joined: Tue Mar 21, 2006 5:49 pm
Posts: 20
That looks promising, thx... :)

BTJ

_________________
Someone wrote:
"I understand that if you play a Windows CD backwards you hear strange Satanic messages"
To which someone replied:
"It's even worse than that; play it forwards and it installs Windows"


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 04, 2006 12:51 pm 
Beginner
Beginner

Joined: Tue Mar 21, 2006 5:49 pm
Posts: 20
But there is one thing though, how do I pass on the value that the field should be updated with?

BTJ

_________________
Someone wrote:
"I understand that if you play a Windows CD backwards you hear strange Satanic messages"
To which someone replied:
"It's even worse than that; play it forwards and it installs Windows"


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.