This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes [hibernate] OneToOne add a new child  :o( Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "[hibernate] OneToOne add a new child  :o(" Watch "[hibernate] OneToOne add a new child  :o(" New topic

[hibernate] OneToOne add a new child :o(

Alessandro Ilardo
Ranch Hand

Joined: Dec 23, 2005
Posts: 218
Hi there,
I'm new with persistence, and I'm having a problem updating an object which has a chlid object referenced by a OneToOne relation.
When I update the child properties a new row is added into the table, while I'd like just udpate the existing one.

The father

the child

On my session bean I call the merge method on the user instance.
Any suggestions?

Thanks in advance

trying to decode a woman mind....
I agree. Here's the link:
subject: [hibernate] OneToOne add a new child :o(
It's not a secret anymore!