hey guys, I'm using NHibernate version 2.1.2.4000.
The Entity
class bowl
{
int id { get; set; }
List<fruit> fruits { get; set; }
}
The Desired (pseudo) Query
var bowls = repository.where(b => b.fruits.count > 1);
The Question
How do I do the above query using the NHibernate criteria API?
Ideally I'd like to be able to do something like this (no subqueries, no detached criterias):
var bowls = repository.where(Restrictions.Gt("fruits.count", 1));
Is the above possible somehow?
cheers!