Account.cs
public IList<Alert> Alerts { get; set; }
Alert.cs
public Account Account { get; set; }
Bag<Alert>(x => x.Alerts, c => { }, r => { r.OneToMany(); });
アラート側
AlertMap.cs
ManyToOne(x => x.Account);
誰かがこのマッピングが正しいことを確認できますか?
Account.cs
public IList<Alert> Alerts { get; set; }
Alert.cs
public Account Account { get; set; }
Bag<Alert>(x => x.Alerts, c => { }, r => { r.OneToMany(); });
アラート側
AlertMap.cs
ManyToOne(x => x.Account);
誰かがこのマッピングが正しいことを確認できますか?
Inverse()
設定する必要がありますBag(x => x.Alerts, c => { c.Inverse(); c.Key("account_id"); }, r => { r.OneToMany();
});
ManyToOne(x => x.Account, c => c.Column("account_id"));
ノート: