Hello,
I have a problem running the following scenario
Supplier
Id
Name
1
|
|
|
N
bill
Id
Supplier_Ref
CreationDate
when I create a bill with a supplier that does not exist, the system does not create the supplier in cascade when using session.save(bill) though the cascade all option has been set up. As you can seen it is a non bi-directional relationship. Can I model such a scenario with Hibernate and be able to save a bill with a supplier that is in a not already persisted state or should I do it in two operations session.save(supplier); session.save(bill) ?
Thx in advance
|