Hibernate version: 3
Bonjour,
J'ai un problème de mapping de collection.
Lorsque le lance un HQL, la collection associée à ma classe se charge. Très bien c'est ce que je veux!
Code:
List result = session.createQuery(("FROM Discipline")).list() ;
Code:
<hibernate-mapping package="com.unifr.sis.stiftung.business">
<class name="Discipline" table="STI_DISCIPLINE">
...
<set name="texts" lazy="false">
<key column="ID" />
<one-to-many class="DisciplineLib" />
<filter name="filDisciplineTexts" condition="LNG=:alLng" />
</set>
...
Selects générés la première fois:
Code:
Hibernate: select discipline0_.ID as ID from STI_DISCIPLINE discipline0_
select texts0_.ID as ID__, texts0_.LNG as LNG__, texts0_.ID as ID0_, texts0_.LNG as LNG0_, texts0_.LIBELLE as LIBELLE11_0_ from STI_DISCIPLINE_LIB texts0_ where texts0_.LNG=? and texts0_.ID=?
select texts0_.ID as ID__, texts0_.LNG as LNG__, texts0_.ID as ID0_, texts0_.LNG as LNG0_, texts0_.LIBELLE as LIBELLE11_0_ from STI_DISCIPLINE_LIB texts0_ where texts0_.LNG=? and texts0_.ID=?
select texts0_.ID as ID__, texts0_.LNG as LNG__, texts0_.ID as ID0_, texts0_.LNG as LNG0_, texts0_.LIBELLE as LIBELLE11_0_ from STI_DISCIPLINE_LIB texts0_ where texts0_.LNG=? and texts0_.ID=?
Par contre lorsque je relance le HQL, les selects pour remplir la collection ne se relancent pas. J'aimerai les relancer étant donné que j'ai un <filter>.
Select généré la seconde fois:
Code:
select discipline0_.ID as ID from STI_DISCIPLINE discipline0_
Avez-vous une idée?
Merci
Cédric