I have the following method. This works fine if i remove the following line
.Add(Restrictions.Eq("Product.IsPopItem", true))
The error message is
could not resolve property: Product.IsPopItem of: EStore.Domain.Model.ProductCategory
I'm confident the "Product.IsPopItem" is mapped correctly as i can call this property. Do i need to add a few criteria.
public ICollection<ProductCategory> FindByCompanyIdAndCategoryIdAndIsPop(int companyId, int id)
{
var products = _session
.CreateCriteria(typeof(ProductCategory))
.Add(Restrictions.Eq("CompanyId", companyId))
.Add(Restrictions.Eq("CategoryId", id))
.Add(Restrictions.Eq("Product.IsPopItem", true))
.List<ProductCategory>();
return products;
}