Nhibernate:object references an unsaved transient instance save the transient instance before flushing.

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

原文地址:https://www.cnblogs.com/jiguixin/p/2597451.html