Hi,
I need a little advice. I'm using version 2.1 of Hibernate.
I have 3 tables
ORDER
ORDER_SEQ (pk)
ORDER_ID
ORDER_NAME
ORDER_GRP_RLT
ORDER_SEQ (fk)
ORDER_GRP_SEQ (fk)
ORDER_GRP
ORDER_GRP_SEQ (pk)
TYPE
When I create an Order, I can create the OrderGrp using a <many-to-many> without any problem.
What I am having a problem with, is that I need to associate existing Orders to the Order group I just created.
Example:
Order
001
ID1
Order1
OO2
ID2
Order2
OrderGrpRlt
002
002
001 <---(This is the relationship back to order 1)
001
OrderGrp
001
TypeA
When I'm createing Order 2, I have to make the association to Order1 which is already in the DB.
How do I do this?
Thanks For you Help.
Chris...
|