【发布时间】:2009-11-02 15:11:06
【问题描述】:
当我根据以下链接中的建议选择 Student 对象时,我正在使用以下 HQL 查询尝试加载一组对象。 http://www.javalobby.org/articles/hibernate-query-101/
from gradebook.model.Student student where student.studentId=1 left join fetch student.scores
我收到以下错误。 意外标记:靠近第 1 行第 64 列 我已将映射文件的相关部分粘贴在下面。
<set name="scores" inverse="true" lazy="true" table="score" fetch="select">
<key>
<column name="student_id" not-null="true" />
</key>
<one-to-many class="gradebook.model.Score" />
</set>
【问题讨论】: