I've (for now) given up on implementing this without defining an
entity for the (unary) relation.  But I'm still having troubles.

We're using Fluent NHibernate, so you'd think something like this
would work:

public class DefaultPayerSelection : DomainObject {
        public virtual Guid? Id { get; set; }
        public virtual Payer Payer { get; set; }
}

public class DefaultPayerSelectionMap :
ClassMap<DefaultPayerSelection> {
        public DefaultPayerSelectionMap() {
                WithTable("KioskTopPayer");

                Id(dps => dps.Id, "PayerID").GeneratedBy.Foreign("Payer");
                HasOne(dps => 
dps.Payer).WithForeignKey("PayerID").Constrained();
        }
}

But I get an AssertionFailure deep from within the NHibernate code
with a message of 'null identifier'.  Anybody seen this before?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to nhusers@googlegroups.com
To unsubscribe from this group, send email to 
nhusers+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to