I have some news.
In my unit test class, i have several test methods. When i comment out all mthese methods except the one that give me some trouble, everything works as expected. Here is the debug log obtained from Hibernate :
[code] [junit] testGetService getContacts start... [junit] [xpa] DEBUG [main] SessionImpl.initializeCollection(3251) | initializing collection [org.cg83.xpa.model.Service.contacts#20] [junit] [xpa] DEBUG [main] SessionImpl.initializeCollection(3252) | checking second-level cache [junit] [xpa] DEBUG [main] SessionImpl.initializeCollection(3258) | collection not cached [junit] [xpa] DEBUG [main] BatcherImpl.logOpenPreparedStatement(196) | about to open: 0 open PreparedStatements, 0 open ResultSets [junit] [xpa] DEBUG [main] BatcherImpl.getPreparedStatement(237) | select contacts0_.IDCONTACT as IDCONTACT__, contacts0_.IDSERVICE as IDSERVICE__, contacts0_.IDCONTACT as IDCONTACT1_, contacts0_.CVLCONTACT as CVLCONTACT1_, contacts0_.COMCONTACT as COMCONTACT1_, contacts0_.DATDERMOD as DATDERMOD1_, contacts0_.FAXCONTACT as FAXCONTACT1_, contacts0_.CODFONCTION as CODFONCT6_1_, contacts0_.EMAILCONTACT as EMAILCON7_1_, contacts0_.NOMCONTACT as NOMCONTACT1_, contacts0_.PRENOMCONTACT as PRENOMCO9_1_, contacts0_.TELCONTACT as TELCONTACT1_, contacts0_.USERDERMOD as USERDERMOD1_, fonction1_.CODFONCTION as CODFONCT1_0_, fonction1_.LIBFONCTION as LIBFONCT2_0_ from CONTACT contacts0_, FONCTION fonction1_ where contacts0_.IDSERVICE=? and contacts0_.CODFONCTION=fonction1_.CODFONCTION(+) [junit] [xpa] DEBUG [main] BatcherImpl.getPreparedStatement(241) | preparing statement [junit] [xpa] DEBUG [main] NullableType.nullSafeSet(46) | binding '20' to parameter: 1 [junit] [xpa] DEBUG [main] Loader.handleEmptyCollections(327) | result set contains (possibly empty) collection: [org.cg83.xpa.model.Service.contacts#20] [junit] [xpa] DEBUG [main] SessionImpl.getLoadingCollection(3009) | uninitialized collection: initializing [junit] [xpa] DEBUG [main] Loader.doQuery(197) | processing result set [junit] [xpa] DEBUG [main] NullableType.nullSafeGet(68) | returning '10' as column: CODFONCT1_0_ [junit] [xpa] DEBUG [main] NullableType.nullSafeGet(68) | returning '60' as column: IDCONTACT1_ [junit] [xpa] DEBUG [main] Loader.getRow(405) | result row: 10, 60 [junit] [xpa] DEBUG [main] Loader.loadFromResultSet(536) | Initializing object from ResultSet: 10 [junit] [xpa] DEBUG [main] Loader.hydrate(605) | Hydrating entity: org.cg83.xpa.model.Fonction#10 [junit] [xpa] DEBUG [main] NullableType.nullSafeGet(68) | returning 'Responsable Administratif' as column: LIBFONCT2_0_ [junit] [xpa] DEBUG [main] Loader.loadFromResultSet(536) | Initializing object from ResultSet: 60 [junit] [xpa] DEBUG [main] Loader.hydrate(605) | Hydrating entity: org.cg83.xpa.model.Contact#60 [junit] [xpa] DEBUG [main] NullableType.nullSafeGet(68) | returning 'M.' as column: CVLCONTACT1_ [junit] [xpa] DEBUG [main] NullableType.nullSafeGet(68) | returning 'A contacter si besoin de renseignements [junit] administratifs. Utiliser de pr
|