should all-delete-orphan work for both unidirectional and bidirectional (one2many association) ? is there any rule for this ..
I am trying to delete a child element using all-delete-orphan.... but getting following exception.. .
INFO: Checking 0 named queries
Hibernate: select dept0_.id as id0_, dept0_.name as name1_0_ from dept dept0_ where dept0_.id=?
Hibernate: select emp0_.deptid as deptid__, emp0_.id as id__, emp0_.id as id0_, emp0_.name as name0_0_, emp0_.deptid as deptid0_0_ from emp emp0_ where emp0_.deptid=?
Exception in thread "main" java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(Unknown Source)
at java.util.HashMap$KeyIterator.next(Unknown Source)
select emp0_.deptid as deptid__, emp0_.id as id__, emp0_.id as id0_, emp0_.name as name0_0_, emp0_.deptid as deptid0_0_ from emp emp0_ where emp0_.deptid=?
Throw that code right into you SQL tool and send it directly to the database with a valid deptid and see what happens. I want to see that the error isn't at the database level, and is in fact, a problem with the Hibernate mapping. Is that possible? Which database are you using?