I having this exception when running my code :
NHIBERNATE object references an unsaved transient instance - save the transient instance before flushing or set cascade