这是因为引用了未保存的对像实例,要解决这个问题,在配置文件中,加上级联操作。在Nhibernate Fluent中可以用这种方式:HasMany(x => x.Products).Cascade.All();