Hi,
I have a ternary association:
Code:
<class name="ambar.modelo.cuenta.Cuenta" table="cuenta">
......
<map name="periodos" table="cuenta_periodo" lazy="true">
<key column="cuenta"/>
<index-many-to-many column="periodo" class="ambar.modelo.periodo.Periodo"/>
<one-to-many class="ambar.modelo.cuenta.CuentaPeriodo"/>
</map>
</class>
I just don´t know how to see the keys or the values of the map in my JSP page. i´m using JSTL this seems to work fine:
Code:
<c:when test="${fn:length(modelo.periodos)==0}">
<p>Esta cuenta no tiene cuentaperiodos registradas</p>
</c:when>
but with this:
Code:
<c:otherwise>
<c:forEach var="reg" items="${modelo.periodos}">
<table>
<tr>
<td>
<c:out value="${reg.periodo}"/>
<!--OR--><c:out value="${reg.id}"/>
Tomcat tell me:
javax.servlet.jsp.el.ELException: Unable to find a value for "periodo" in object of class "ambar.modelo.cuenta.CuentaPeriodo" using operator "."
I´ll be very thankful if anyone can help me with anything (a link, an explanation...)
Sorry if this is a little off-topic but i think the answers could help others, not just me.
Regards,
Juan Gabriel Romero Silva