Try setting inverse on the has many mapping and see if that helps On Dec 29, 2009 11:54 AM, "kberridge" <kevin.w.berri...@gmail.com> wrote:
I have a simple parent child relationship where the parent class has a collection of children, but the child class doesn't have a reference to the parent. I'm mapping it with a HasMany. In my database, the foreign key column does not allow nulls, but when NH tries to insert into these tables it is bombing out because it's trying to insert the child first (with null in the FK col) and come back and update the FK column after it inserts the parent. I found an earlier message on this group that briefly discusses this issue: http://www.mail-archive.com/fluent-nhibernate@googlegroups.com/msg05124.html Is the only way I can get around this problem still to add the reference to the parent on the child class? Thanks, Kevin Berridge -- You received this message because you are subscribed to the Google Groups "Fluent NHibernate" group. To post to this group, send email to fluent-nhibern...@googlegroups.com. To unsubscribe from this group, send email to fluent-nhibernate+unsubscr...@googlegroups.com<fluent-nhibernate%2bunsubscr...@googlegroups.com> . For more options, visit this group at http://groups.google.com/group/fluent-nhibernate?hl=en. -- You received this message because you are subscribed to the Google Groups "Fluent NHibernate" group. To post to this group, send email to fluent-nhibern...@googlegroups.com. To unsubscribe from this group, send email to fluent-nhibernate+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/fluent-nhibernate?hl=en.