SQLServerの構文は次のとおりです。
select tableAColumn1, tableAColumn2, tableBColumn1
from tableA, tableB
where ISNUMERIC(tableAColumn1) = 1
and CONVERT(INT, tableAColumn1) = tableBColumn1
and tableAColumn2 = 'something'
Fluent NHibernateでこれを達成するための最良の方法は何でしょうか?結果のClassMapを取得するには、いくつのクラスが必要で、どのように表示されますか?
編集:
public class BarausInfoMap : ClassMap<BarausInfo>
{
public BarausInfoMap()
{
Table("BARAUS");
Id(x => x.nr);
Map(x => x.betrag);
Join("BARAUSLANG", m =>
{
m.Fetch.Join();
m.KeyColumn("Ula");
m.Map(x => x.bezeichnung);
m.Map(x => x.sprache);
m.Map(x => x.la);
this.Where("m.la = 'SPE'");
});
}
}
nr列はintで、ula列は文字列ですが、これらを結合する必要があります。2.また、this.whereは外部テーブルを参照しますが、内部テーブルを参照する必要があります。