私はこのSQLクエリを持っています:
select pr.*, det.Description, det.Name
from Product pr
inner join ProductDetail det on det.Product_id = pr.id
where pr.Id = XX and det.IsDefault = yy
QueryOverでこれを行うにはどうすればよいですか?
ありがとう、
アップデート :
public ProductMap()
{
Id(x => x.Id).GeneratedBy.Native();
Map(x => x.Code)
.Length(20)
.Not.Nullable();
Map(x => x.CreationDate).Not.Nullable();
Map(x => x.IsDeleted);
Map(x => x.Price);
HasManyToMany(x => x.Categories)
.AsSet()
.Cascade
.SaveUpdate()
.Table("ProductsCategories");
}
public class ProductDetailMap : ClassMap<ProductDetail>
{
public ProductDetailMap()
{
Id(x => x.Id).GeneratedBy.Native();
Map(x => x.Name)
.Length(50)
.Not.Nullable();
Map(x => x.Description)
.Length(250);
Map(x => x.IsDefault);
References(x => x.Language);
References(x => x.Product);
}
}