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 Transaction
{
public virtual int Id{get; set;}
public virtual Item Item {get; set;}
public virtual User Seller{get; set;}
public virtual User Buyer{get; set;}
}
Notice how I have two relationships back to the User object. When FHN generates the table schema I get 3 FK relationships from the transaction table back to the User table, "Buyer_id", "Seller_id", "User_id"
I think it's auto generating the "User_id" field erroneously based on the fact it by default expects the referencing property to be called "User"
How would I specify this mapping using FNH?
Yarg!
I finally figured it out when doing the auto mapping you have to specify an override with two separate Has Many mappings