Hi everyone, I have an Order object that is mapped to an Order table in the database. I also have a child OrderStatus object that's mapped to an OrderStatus table in the database.
For this to work, I have to allow the OrderID column in the OrderStatus to be Nullable. It looks like NHibernate inserts the rows into the child table first and has to insert a null for this OrderID, then it inserts the row into the Order table, and finally updates the OrderStatus with the correct OrderID value. Is this how NHibernate works? is there any way around this? I can always make the OrderID column nullable, but it's part of my primary key. Do I just need to use an identity for the Primary Key in my OrderStatus table, and make the OrderID Nullable? thanks in advance for any help, Phil --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---
