This week's giveaway is in the Beginning Java forum.
We're giving away four copies of Bad Programming Practices 101 (e-book) and have Karl Beecher on-line!
See this thread for details.
Win a copy of Bad Programming Practices 101 (e-book) this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Many to many be able to save from both side  RSS feed

 
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use spring boot with spring-data-jpa and hibernate implementation

I have a many to many relations





Actually if I take a person, add some address and save... person and address are saved.

I would like to be able to do also from the other side: address, add person and save

tried to put on both cascade = {CascadeType.MERGE, CascadeType.PERSIST} on both side, but it don't work
 
rubbery bacon. crispy tiny ad:
Why should you try IntelliJ IDEA ?
https://coderanch.com/wiki/696337/IntelliJ-IDEA
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!