Wednesday 14 February 2007

NHibernate save error.

Error: "object references an unsaved transient instance...."

This occurred when saving a object that had a 1:M relationship that was represented by a list.



Parent --- child1

--- child2



To fix the error add cascade="all" to the that represents the 1:M relationship in the DB Mapping file.