I study QueryOver, but I cannot figure out in my life how to make simple answers to many.
I wrote the following:
var result = Session.CreateCriteria(typeof (Product)) .CreateAlias("Categories", "categories") .Add(Property.ForName("categories.Id").Eq(categoryId)) .List<Product>();
This gives the desired result. I basically
Product> ProductCategory <Category
ProductCategory has only ProductId / CategoryId, and I'm trying to select all products of a certain category.
I don't know where to start trying to do this with a query.
nhibernate queryover
Phill
source share