Hibernate version: 3.1.3
Mapping documents:
Code:
<hibernate-mapping>
<class name="modele.Membre">
...
<bag name="amis" lazy="true">
<key column="Membre_idMembre"/>
<one-to-many class="modele.Ami"/>
</bag>
</class>
</hibernate-mapping>
I have an entity "Membre" which owns n "Ami", but I would like those "Amis" to be loaded from my DB
each time I call getAmis() from my Membre bean.
I tried both lazy="true" and lazy="false" and I always get the same result :
"Amis" are loaded when my Membre is loaded :( No query is executed each time I call getAmis()