Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hi friends,
i am new to hibernate and want to know how can i perform on delete cascade operation using hibernate. i.e. i have two tables parent(parentid as PK) and child(parent id as FK), when using GUI i delete a parent, all the child of that parent and the parent itself should be deleted..
i have generated bi-directional .hbm files but have not specified anywhere cascade options.
should i mention cascade in parent or in child?
do i need to modify my database tables for cascade options?
thanks in advance.
nirav
Hibernate version:3.1
Mapping documents:
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
Name and version of the database you are using:MySQL 5.0
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
Problems with Session and transaction handling?
Read this:
http://hibernate.org/42.html