ProductCategory productCategory = null;
var subquery = QueryOver.Of<Product>()
.JoinAlias(product => product.ProductCategories, () => productCategory)
.Where(() => productCategory.Category.Id == parameter.Category.Id);
カテゴリの種類は何ですか?これがエンティティの場合:
productCategory.Category.Id == parameter.Category.Id
これが基本プロパティの場合:
productCategory.Category == parameter.Category
多対多の関係ですか?(製品とカテゴリー)
Category category = null;
var subquery = QueryOver.Of<Product>()
.JoinAlias(product => product.Category, () => category)
.Where(() => category.Id == parameter.Category.Id);