wolli wrote:
Hmm strange ... sounds more like a basic problem that anything with the query in special.
Does the query work in this way:
ICriteria crit = _session.CreateCriteria(typeof(LunchDish));
IList<LunchDish> result = crit.List<LunchDish>();
Can you post the stacktrace ? Btw. which hibernate version do you use ?
i can get all lunches in a list with no problem. i use the nhibernate 2.0 i think it is, the one that is avalible on for download from the site now. i use Jet driver to but that shouldent be any problems because everything else works. i would post the trace but its all in swedish. thing is i changed from 1 to 2 lunches, so i did the ilist and it works.
i tried the setfirst and setmax the other day but it didnt work, i cant remember what the exception was. but then i think the criteria query was wrong.
i am goin to do this top1 agin later today with another part of the application im building so i bet ill be back haha, so please check back on me.
thanks for your time, i really appricate it.