1
私はLoquacious Nhibernateでマップしようとしている2つのクラスがあります。Loquacious Nhibernateと複合ID外部キー
マッピングは、以下の
public class FooMap : ClassMapping<Foo>
{
Table("FooTableName");
ComposedId(compIDMapper =>
{
compIDMapper.Property(x => x.SomeInt, m => m.Column("SomeInt"));
compIDMapper.ManyToOne(x => x.SomeReference, m => m.Column("SomeReference"));
});
}
public class BarMap : ClassMapping<Bar>
{
Table("BarTableName");
Id(x => x.ID, m => m.Column("barID"));
ManyToOne(x => x.Foo, m => m.Columns(columnMapper =>
{
columnMapper.Name("SomeIntID"); //Both of these columns are in the BarTableName like they should be
columnMapper.Name("SomeReferenceID");
}));
}
のようなものです。しかしマッピングが、私は次のエラーを取得する構築されているとき:
Foreign key (FK554EAF2427B2CA28:BarTableName[SomeIntID])) must have same number of columns as the refe,renced primary key (FooTableName[SomeInt, SomeReference])
は私が間違ってやっているかわからないんだけど、それをそれはうまくいくように見えますが、私はこれで私の頭をしばらく叩いていて、どこにも手を入れていません。私が間違っていることに関するアイデアは?