oui je peux.
mais il me semble avoir trouvé ma reponse :
Hibernate currently does not support joining a collection of components or other value types with Criteria. Use HQL or submit a patch that implements this functionality.
sinon voici le mapping:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| <class name="SessionDatee" table="SESSION_DATEE">
....
....
<set name="reservationsRessources" table="RESERVATION_RESSOURCE" lazy="false" cascade="all-delete-orphan">
<key>
<column name="SESSION_DATEE" precision="22" scale="0" not-null="true"/>
</key>
<composite-element class="ReservationRessource">
<property name="numeroCreneau" type="java.lang.Integer">
<column name="NUMERO_CRENEAU" precision="22" scale="0" />
</property>
<property name="dateDebut" type="java.util.Date">
<column name="DATE_DEBUT" not-null="true"/>
</property>
<property name="dateFin" type="java.util.Date">
<column name="DATE_FIN" not-null="true"/>
</property>
<many-to-one name="ressource" class="Ressource" lazy="false">
<column name="RESSOURCE" precision="22" scale="0" not-null="true"/>
</many-to-one>
</composite-element>
</set>
</class> |
voila
Partager