Inserting parent and children with NHibernate at the same time
问题 I am attempting to save(insert) a Parent entity with list Child entities. Both entites use a Guid as primary keys. The keys are none nullable and there is no key relationship set up in the db. The save doesn't work, an exception is thrown claiming - that I am trying to save a null into Parent foreign key in the Child table. I was expecting nhibernate to create a key for the Parent and let its Child objects know about it. Is this a limitation of NHibernate or of using Guids as primary keys?