Hi,
I have a situation where I have a lot of existing objects in the database that get created elsewhere.
I have other objects which have a one-to-many relationship with these child objects. They are defined as a List association in the parent, and mapped in the database through a link table.
I really don't want to load all the child objects, add them to the parent, and then save the parent to link them together. But getting the child id's for the parent, and saving them directly to the link table with teh parent id, seems wrong.
What is the Hibernate way to do this?
cheers,
David
|