Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 3
Mapping documents:
Criteria requeteParCriteres = session.createCriteria (FluxA.class);
requeteParCriteres.add (Restrictions.eq (FluxA.IDFLUX_, idflux));
requeteParCriteres.setFirstResult (indexPremierEnregistrement);
RequeteParCriteres.setMaxResults (nbParPage);
ListePaiement list = (List) requeteParCriteres.list ();
Full stack trace of any exception that occurs:
DB2 V8:
Hibernate: select this_.NUMINTFI as NUMINTFI2_0_, this_.NUMINTFG as this_.MOISPREL as MOISPREL2_0_, this_.CODEPAYS as CODEPAYS2_0_, this_.MOTIFREJ as MOTIFREJ2_0_, this_.IBANCORR as IBANCORR2_0_, this_.JETON as JETON2_0_ from GDFFIDET this_ where this_.NUMINTFG=?
[06/02/09 17:31:18:262 CET] 00000018 WSRdbManagedC W DSRA0080E: Une exception a été reçue par Data Store Adapter. Voir le message de l'exception d'origine : com.ibm.db2.jcc.b.SqlException: DB2 SQL error: SQLCODE: -471, SQLSTATE: 55023, SQLERRMC: SYSIBM.SQLCAMESSAGE;00E7900C
SQLCODE: -904, SQLSTATE: 57011
Hello,
I want to retrieve only the (n) the first element
of a table from a certain index of departure (indexPremierEnregistrement).
I use methods setFirstResult and setMaxResults of Class Criteria.
It works on a DB2 on AIX
but when I pass on z / os, it will return an SQLCODE: -471, SQLSTATE: 55023, SQLERRMC: SYSIBM.SQLCAMESSAGE; 00E7900C if the value argument setFirstResult is different from 0 (see code below).
when the value passed as argument setFirstResult is 0, the setMaxResults has no effect and returns all rows instead of the number of the setMaxResults 's argument.
My bdd Db2 V8 is installed on z / os
org.hibernate.dialect.DB2Dialect with the dialect and Hibernate3.
Criteria requeteParCriteres = session.createCriteria (FluxA.class);
requeteParCriteres.add (Restrictions.eq (FluxA.IDFLUX_, idflux));
requeteParCriteres.setFirstResult (indexPremierEnregistrement);
RequeteParCriteres.setMaxResults (nbParPage);
ListePaiement list = (List) requeteParCriteres.list ();
Session.close ();
Something that he had the same problem?
Is a matter of dialect or driver or version of DB2?
Thanks.