I have classes Task { public virtual User Reporter { get; set; } public virtual User AssignedTo { get; set; } } class TaskMap{ ... References(x => x.AssignedTo).Nullable(); References(x => x.Reporter) .Nullable(); } and class User{... public virtual ICollection<RelationUserProjectRole> Relations { get; set; } } class UserMap{ ... HasMany(x => x.Relations).Cascade.All() .AsSet().OrderBy("Id"); }
class RelationUserProjectRole { ... public virtual User User { get; private set; } ...} class RelationUserProjectRoleMap{ ... References(x => x.User).Not.Nullable(); } generates the following database: Task[ ... AssignedTo_Id Reporter_Id ] these colomns have references to column Id table User and Table RelationUserProjectRole [ .... AssignedTo_Id ] this colomn have references to column Id table User The question is why mapped so ?Why is this column AssignedTo_Id in the table RelationUserProjectRole ? I have no field AssignedTo in the class RelationUserProjectRole thanks -- You received this message because you are subscribed to the Google Groups "Fluent NHibernate" group. To post to this group, send email to fluent-nhibern...@googlegroups.com. To unsubscribe from this group, send email to fluent-nhibernate+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/fluent-nhibernate?hl=en.