When mapping a relation as such:
Code:
<many-to-one name="Parent" column="parent_id" not-null="false" />
the parent is not retrieved when no parent_id is available in the database.
However, if the mapping is a composite key like so:
Code:
<many-to-one name="Parent" not-null="false" >
<column name="parent_id1" />
<column name="parent_id2" />
</many-to-one>
I would expect that a null in any of the id's (p_id1 or id2) would also cause the relation to be not retrieved.
There does not seem to be a way to let nhibernate know that the relation does not exist!