I Want to create table (SQL Server) that contains users identity GUID and make reference to it in Fluent NHibernate, here is my model:
public class Invoice {
public virtual Guid Identity { get; set; }
public virtual MembershipUser User { get; set; }
public virtual int Price { get; set; }
}
So the mapping should be:
public class InvoiceMap : ClassMap<Invoice> {
public InvoiceMap() {
Id(x => x.Identity).GeneratedBy.GuidNative();
Reference(x => x.User).Column("User");
Map(x => x.Price);
Table("invoices");
}
}
But there are only one problem. The class MembershipUser
also should be mapped.
How I can do this without mapping MembershipUser
?