Hello,
a have a table TmpAjustCpe which references the table projet
here is the mapping for this relation in the xml file projet.xml :
<set name="tmpAjustCpes" inverse="true" >
<key>
<column name="PRJ_ID" precision="7" scale="0" not-null="true" />
</key>
<one-to-many class="com.thales.project.TmpAjustCpe" />
</set>
in the bean associated to projet , i wanna access a property of TmpAjustCpe
for this i implemented this getter
public BigDecimal getDernierCpeEmporte() {
if(getProjet().getTmpAjustCpes()!=null){
for (Iterator<TmpAjustCpe> iterator = getProjet().getTmpAjustCpes().iterator(); iterator.hasNext();) {
TmpAjustCpe tmpAjustCpe = (TmpAjustCpe) iterator.next();
return tmpAjustCpe.getDernierCpeEmporte();
}
}
return BigDecimal.ZERO;
}
the problem is that the data related to TmpAjustCpe have not been loaded
any one have an idea what should i do in the xml file to load this property,
Regards
Elyes