Reputation: 14195
Account.cs
public IList<Alert> Alerts { get; set; }
Alert.cs
public Account Account { get; set; }
Bag<Alert>(x => x.Alerts, c => { }, r => { r.OneToMany(); });
and on the alert side
AlertMap.cs
ManyToOne(x => x.Account);
Can someone confirm that this mapping is correct?
Upvotes: 1
Views: 1479
Reputation: 30813
Inverse()
setBag(x => x.Alerts, c => { c.Inverse(); c.Key("account_id"); }, r => { r.OneToMany();
});
ManyToOne(x => x.Account, c => c.Column("account_id"));
Note:
Upvotes: 1