views:

27

answers:

0

Hi,

I'm trying to do select count(*) by ICriteria and when call to criteria.List it does update and after then it does the select clause

The update is the object which is now in cache

Example:

I do Session.Get<...> and after then

ICriteria criteria = Session.CreateCriteria(typeof(...)) .SetProjection(Projections.RowCount()) .UniqueResult();

why it happen? What to do to not perform the update?

Thanks, Chagit