This is a real newbie question. I am the proud owner of "Hibernate in Action" but I haven't encountered the solution to this (not to say its not there just that I haven't seen it yet).
I have two tables PARENT and CHILD
Code:
PARENT
ID #
other columns
CHILD
PARENT_ID #
other columns
What is the correct way to map this? The CHILD rows are dependant on their PARENT row. The conceptual issue for me is I have to have an <id> tag in the child.hbm.xml but it isn't generated from a sequence, hilo or anything else; it comes from the parent. If I had to guess I would say that I should use the "assigned" value for the generator...
I am using Hibernate 2.1 against Oracle 8i.
Thanks for any suggestions
Ian.