NHibernate Forge
The official new home for the NHibernate for .NET community

Comments: from NH1.2.1GA to NH2.0.0

Comments (1)
History (1)

from NH1.2.1GA to NH2.0.0

Sort by: Published Date | Most Recent | Most Useful
By: suvi Posted on 07-21-2010 5:43

How about the criteria.SetProjection()

in NH1.2.x, we can do like this:

ICriteria c = session.CreateCriteria(typeof(TUser));

c.SetProjection(Projections.RowCount());

Int32 rcount = c.UniqueResult();

c.SetProjection(null);

return c.List();

we can do just c.SetProjection(null) to clear the projections for a criteria and then continue to call it. But in NH2.x,

c.SetProjection(null) is no longer valid.

Powered by Community Server (Commercial Edition), by Telligent Systems