0
웹 프로젝트 asp.net VS2008을 VS2010으로, NH 2.1을 NH 3.2로 마이그레이션하려고합니다.NHibernate 3.2와 Paging Oracle
이제 NH 3.2를 사용한 페이징이 작동하지 않습니다.
NHibernate에 3.2 SetFirstresult,는 setMaxResults 페이징 문제 오라클
https://groups.google.com/forum/#!topic/nhusers/1kp0hDfVol0
코드, VS2008와 VS2010에 대해 동일하지만, NH 3.2 사용은 페이징하지
NH 3.2var 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>());
}
구성을 작동
<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>
그것에 대해 어떤 제안이 있습니까?
에서 야간 빌드를 끌어 NH 3.3 전체 안정적이다 - NH 3.2보다 더 ?? – Kiquenet
NH 3.3이 2012 년 4 월 21 일에 출시되었습니다. – Fran
아직도 저를 위해 일하지 않습니다. –