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