• Post Reply Bookmark Topic Watch Topic
  • New Topic

Hibernate CascadeType.PERSIST and DELETE_ORPHAN

Kim Long
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

When i use these settings everything works fine :

@OneToMany(mappedBy="user",fetch=FetchType.EAGER,cascade = {CascadeType.PERSIST,CascadeType.MERGE})

but when i delete the CascadeType.PERSIST and for example delete a member of my Collection it doesn't update the Database anymore when i synchronize it with merge. I don't understand this why do i have to set PERSIST too, that DELETE_ORPHAN works correctly?

thanks for your help

Mr. Long
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!