I am trying to create a ManyToOne map over a legacy database, as such need it to ignore any orphaned records.
The original xml way of describing it was:
<many-to-one not-found="ignore" />
But I am unable to describe it using NHibernate 3.2 Mapping by Code.
The code I am using to describe the map is below:
ManyToOne(x => x.Gang, manyToOne =>
{
manyToOne.Column("gang_code");
manyToOne.Cascade(Cascade.None);
manyToOne.NotNullable(true);
});
The NotNullable(true) is there since there should always be a gang for a new or updated record, but need the record to be read/selected to allow users to change it.
Thanks in advance for any help you can provide, it's driving me nuts.