Fluent Nhibernate - Mapping child in parent when Child has reference to parent and not using a list
- by Josh
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've tried references, hasone, referencesany and can't seem to get the mapping right. Anyone have any ideas?
Thanks,