I'm migrating web project asp.net VS2008 to VS2010, and NH 2.1 to NH 3.2.
Now, paging using NH 3.2 not work.
NHibernate 3.2 SetFirstresult, Setmaxresults paging problem oracle
https://groups.google.com/forum/#!topic/nhusers/1kp0hDfVol0
Code, the same for vs2008 and vs2010, but using NH 3.2, paging not works
var response = new GetComunicacionesXFiltroResponse();
//Sesion
using (ISession session = NHibernateHelper.OpenSession(FlushMode.Never))
{
IQuery query = GetQueryForGetComunicacionesXFiltro(request, false, session);
if (request.PagingInfo != null)
{
query.SetMaxResults(request.PagingInfo.RowCount);
query.SetFirstResult((request.PagingInfo.PageNumber - 1) * request.PagingInfo.RowCount);
}
response.Comunicaciones = ComunicacionMapper.Map(query.List<Comunicacion>());
}
Config for NH 3.2
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2" >
<reflection-optimizer use="false"/>
<session-factory>
<property name="connection.connection_string_name">XXX.ConnectionStrings.Oracle.XXX</property>
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="connection.driver_class">NHibernate.Driver.OracleDataClientDriver</property>
<property name="connection.isolation">ReadCommitted</property>
<property name="dialect">NHibernate.Dialect.Oracle9iDialect</property>
<property name="query.substitutions">true 1, false 0, yes 'Y', no 'N'</property>
<property name="show_sql">false</property>
<property name="use_proxy_validator">false</property>
<!--DEPRECATED<property name="use_outer_join">true</property>-->
<mapping assembly="XXX.MonitorizacionB2b.DomainModel"/>
</session-factory>
</hibernate-configuration>
any suggestions about it ?