I get the following error:
NHibernate.TransientObjectException : object references an unsaved transient instance - save the transient instance before flushing
I NOW know that is because of the way my mapping is set up IE something is not being saved down before the flush. I completely understand that. Now my question is given a mapping like this:
References(x => x.Result).Column("ResultId").Nullable();
How do I tell NHibnerate to ignore this object when Persisting? I found that I can add the ReadOnly() to this which helps to sort out some of the issues with it in some cases. FURTHERMORE, is it best practice to map the objects when they are not going to be called or should I just map(map (x => x.ResultId)
) it as an int and be done with it?