CUSTOMER、COMPANY、および企業と顧客の間の関係を保持するリレーショナル テーブル CUSTOMER_COMPANY。
私はメールのリストを持っています
メールリストを一覧表示
特定の会社に属し、そのメールアドレス (フィールド) がこの emailList にある顧客を検索したい。QueryOver を使用するにはどうすればよいですか?
public class CustomerMap : ClassMap<Customer>
{
public CustomerMap()
{
Id(x => x.Id);
Map(x => x.Name);
Map(x => x.Email);
//... Other Fields
HasMany(x => x.CompanyCustomers);
}
}
public class CompanyMap : ClassMap<Company>
{
public CompanyMap()
{
Id(x => x.Id);
Map(x => x.Title);
//... Other Fields
HasMany(x => x.CompanyCustomers);
}
}
public class CompanyCustomerMap : ClassMap<CompanyCustomer>
{
public CompanyCustomerMap()
{
Id(x => x.Id);
Map(x => x.IsActive);
Map(x => x.CustomerType);
...
References(x => x.Customer);
References(x => x.Company);
}
}
メーリングリストに存在する会社に属する顧客を取得したい...