-->
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.  [ 1 post ] 
Author Message
 Post subject: Changing Collections Cascade behavior at runtime
PostPosted: Fri Sep 12, 2008 10:58 pm 
Beginner
Beginner

Joined: Sun Oct 14, 2007 7:29 pm
Posts: 23
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hello,

I am using Hibernate 3.2 and I was hoping to be able to change the cascading behavior of a one to many relationship at runtime rather than having to lock-in the behavior at build time. Depending on what is happening in my application, I would like to programatically select Cascade persist, merge, and save-update at certain times but I don't want this to be bhe default behavior all the time (hence, setting the cascade property in the mapping file to persist, merge, save-update will not work.

In the Hibernate Reference manual, section 10.11, last paragraph of this section, it states that "Finally, note that cascading operations can be applied to an object graph at call time or at flush time.", but I am not able to find any documentation that explains how to accomplish this.

Do any of you have an idea?

Thanks,

Matt



Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


Problems with Session and transaction handling?

Read this: http://hibernate.org/42.html


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

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.