Why isn't this possible?
Code:
public bool IsFull
{
get
{
return registrants.Count >= bookingLimit;
}
}
Code:
session.CreateQuery("select from TrainingClass where IsFull = false")
.List<TrainingClass>();
Seems like it would be easy enough for nhibernate to do. Figure out which properties are non persistent and narrow down the retrieved collection based upon them. Otherwise I'm left with expressing the same business logic in two different ways using both HQL and the model. I know I can filter the collection myself but still it would be cleaner.[/code]