データベースから「course_id」で「モジュール」のリストを取得するために、次の行を取得しました。
return sessionFactory.getCurrentSession().createCriteria(Module.class).add(Restrictions.eq("course_id",course_id)).list();
実行すると、次のエラーで失敗します。
WARNING: StandardWrapperValve[dispatcher]: PWC1406: Servlet.service() for servlet dispatcher threw exception
org.hibernate.QueryException: could not resolve property: course_id of: miniVLE.beans.Module
Course_id - 文字列です。course_id がデータベースの外部キーであるためでしょうか?
@ManyToOne
@JoinColumn(name="course_id")
private Course course;