When a transaction is committed, the session is flushed to the database. That just means data changes are written to the database. This exception is telling us we’re trying to save an object, which is referenced another object that isn’t saved. We can infer that this means cascading is turned off for this relationship.
Reference: http://nhforge.org/blogs/nhibernate/archive/2009/08/23/part-5-fixing-the-broken-stuff.aspx