Hello all,
I have two tables
tblPart
(
partId,
subpartId UNIQUE NULL
)
tblSubpart
(
subpartId
)
So I can only have zero or one subPart associated with the part at the same time.
I'm trying to map this as
ClassMap<Part>
{
HasOne(x=>x.Subpart);
}
and the convention rewrites the foreign key so it uses subpartId instead of partId.
however generated query ads
subpart.partId
into the query, which does not exist.
What am I doing wrong here?