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