Let say I\'m doing a basic transaction system where I have the following objects.
public class User
{
public virtual int Id{get; set;}
}
public class Transac
Yarg!
I finally figured it out when doing the auto mapping you have to specify an override with two separate Has Many mappings
return Fluently.Configure()
.Database(persistenceConfigurer)
.Mappings(m => m.AutoMappings.Add(
AutoMap.AssemblyOf<User>()
.Override<User>(map=> map.HasMany(user=> user.Transactions).KeyColumn("Buyer_id"))
.Override<User>(map => map.HasMany(user => user.Transactions).KeyColumn("Seller_id"))
))
.ExposeConfiguration(BuildSchema)
.BuildSessionFactory();