This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Hibernate one-to-one persistence with existing child object  RSS feed

 
moaad elamrani
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

if I have entity parent containing a foreign key to entity child (with Eager fetching).
If say I fetch an existing child from the database, and set it as the child of a parent instance.
When I save the parent, will hibernate try to override the existing child or instead try to find existing one and create the foreign key link?

Regards,
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!