-->
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: Force of update of attributes with each update/insert
PostPosted: Fri Jul 16, 2004 4:50 am 
Newbie

Joined: Tue Jul 06, 2004 9:56 am
Posts: 14
Hi there,

I am looking of a way to force Hibernate to always include a specified attribute (of type Long) in EVERY update/insert operation hibernate ever makes. The attribute is always set by an interceptor in onSave/onFlushDirty. This attribute is needed for the DB triggers to work.

I have noticed that right now I have to closely watch in which order I save/update objects in case one object depends on another. Then it may be that all columns are updated except for the foreign key (e.g. because the other object must be created first), then the foreign is updated separately. During this foreign key update, I *also* want the specified attribute updated (even if it has already been during the first update/insert). Is this possible?

Thanks,
Thomas


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 16, 2004 10:18 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
No there is no way to parametrize the Hibernate update statement (except using dynamic-update="false", but I think you've already done that)

_________________
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.