Joined: Thu Nov 09, 2006 8:46 pm Posts: 7
|
|
I have a rich client application with Long running session ...
Now when i delete a object which has a cascade delete relation ..it issues a seprate sql query for each item in the collection ..
for example Order-->*OrderItems
session.delte(order)
N sql deltes for N OrderItems
1 sql delete for Order
OPTION 1: I can manually delte using sql statements myself because but that would cause my long running session cache to become corrupt .
OPTION 2 : Use bulk delete for each collection , but that has the same problem as above as stated in the ejb spec
[/quote]The persistence context is not synchronized with the result of the bulk update or delete.
Caution should be used when executing bulk update or delete operations because they may result in
inconsistencies between the database and the entities in the active persistence context. [quote]
Any ideas on how to deal with N+1 delete problem ??
Hibernate version: 3.1.2
Name and version of the database you are using: HSQLDB
PS : Tenwit where have u been ??
|
|