最后添加的对象是重复的

Last object added is duplicated

我觉得图像更清晰所以这个代码

    <c:forEach items="${empleado.ventas}" var="venta">
    <table>
        <tr>
            <td>Número de venta</td>
            <td><c:out value="${venta.numero_factura}"></c:out></td>
        </tr>
        <tr>
            <td>Productos</td>
            <td><c:forEach items="${venta.productos}" var="producto">
                    <c:out value="${producto.nombreProducto}"></c:out>
                    <br>
                </c:forEach></td>
        </tr>
        <tr>
            <td>Fecha de ingreso de la venta</td>
            <td><c:out value="${venta.fechaDeIngreso}"></c:out></td>
        </tr>
    </table>
    <br>
</c:forEach>

return me this

添加另一个销售后,

return me this (last sell is duplicated)

这只发生在视图中,数据库插入工作正常。

如果我注销并重新登录,视图会修复。

我在员工中增加了两倍的销售额

这对数据库没有影响,因为休眠配置正在更新,但它对会话对象有影响。