• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Strange behavior in merge detached collection

 
avihai marchiano
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey.

working with hibernate core versin - 3.3.6GA

i tried to remove element (element number -2) from detached collection and merge the container.

there was strange behaviour with differents annotation.

in bidirectional i update both sides.

case 1- bidirectional without delete orphans:
dosnt delete.

case 2- bidrectional with delete orphan and in the many side cascade all:
delete the collection and the container

case 3- bidrectional with delete orphan and cascade in the many side:
delete element 2 from the database - the expected behaviour.

code:

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic