Login

Username

Password





Register   Reset password

This is a read-only archive of the forum.

# leecook 6/20/2007 3:21 AM
Hi,

I basically wanted to use the max property of sql to find the current highest value of a field. I found the following example code:

IList results = session.CreateCriteria(typeof(Cat))
.SetProjection( Projections.ProjectionList()
.Add( Projections.Max("Weight") )
)
.List();

However we don't seem to have the SetProjection Method available to us in Cuyahoga. Am I missing something?
# martijnb 6/20/2007 5:00 AM
I think projections is an NHibernate 1.2 feature and Cuyahoga 1.5 is still using 1.0.4. As an alternative, you could use a plain hql query (with the IQuery interface).