0

これが私のモデルです:

public class Class {
    @ManyToMany(etc etc)
    @JoinTable(etc etc)
    public List<Course> Courses;

これが私の見解です:

<c:forEach items="${classes}" var="class">
<tr>
    <td>${class.className}</td>
    <td>
    <c:forEach items="${courses}" var="course">
        <input type="checkbox"
            <c:if test="${class.Courses.contains(course)}"> checked</c:if>>
        ${course.courseName}
    </c:forEach>
    </td>
</tr>
</c:forEach>

ビューは次の 500 エラーのみを生成します。

javax.el.PropertyNotFoundException: クラス 'com.springapp.mvc.Class' にはプロパティ 'Courses' がありません。

4

1 に答える 1