I have a child object in the database that looks like this:
CREATE TABLE Child
(
ChildId uniqueidentifier not null,
ParentId uniqueidentifier not null
)
An then I have a parent like so.
CREATE TABLE Parent
(
ParentId uniqueidentifier not null
)
Now, the problem is that in my Parent class, I have
public virtual Child Child { get; set; }
I don't want to use a list if possible. I know I could use a hasmany to a list and then just select the top 1 from the list in my Parent.Child property.
I've tried references, hasone, referencesany and can't seem to get the mapping right. Anyone have any ideas?
Thanks,