-->
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: Persistent modifications in @Pre- or @Post-Events
PostPosted: Thu Jun 07, 2007 2:27 pm 
Newbie

Joined: Mon Aug 28, 2006 6:31 am
Posts: 16
Hello

during the @PostLoad the system recognizes the need to persist some modification of an affected object (for example, ending an auction). How should i do it properly?

Thanks,
gena


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 14, 2007 7:16 am 
Beginner
Beginner

Joined: Mon Sep 12, 2005 3:27 am
Posts: 48
Isn't it a non-todo to change the object of an event-listener inside this listener ? Don't really know, we only do queries based on this object or persist NEW objects inside hibernate-listeners....

But you could try to manually persist this (changed) entity via SF.saveOrUpdate(changed_entity). The only problem for you is to insert the SessionFactory inside the listener. This depends on what you are using - an Application-Server like jboss or standalone java client...


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.