Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 2.1.8 on JDK 1.3.1
Mapping documents:
Code between sessionFactory.openSession() and session.close(): I am using session fulsh per request
Full stack trace of any exception that occurs:
Name and version of the database you are using: Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
Let me explain the scenario:
I have object hierarchy as below (ignore dots):
................................A
......................../.......|........\
..................B.............C..........D
........../.......|......\
........E.........F........G
................/|\
........H.........I.........J
............................|
............................K
All parents can have one or more child.
The relationship is bidirectional and many to one is mapped using set. Cascade has been put up for delete. But strange behaviour arising. While deletion, the foollowing sequence is executed:
1. delete c
2. delete d
3. delete e
4. delete h
5. delete i
6. delete j (should have been delete k followed by this)
As K exists for J, foreign key violation is appearing (ORA-02292). Suggest if you have any solution to this.