HashMap <key:student =“”,=“”value =“”:=“”list <evals =“”>&gt;返回Student Not Object of Student </key:>的引用

时间:2013-12-20 10:15:38

标签: java hibernate entitymanager

我有返回Map<AcadStudent, List<AcadStudentEvaluation>>的方法。我通过实体管理器的查找方法从数据库中获取了Student对象,并通过查询获得了Evaluations。然后我这样做:

myMap.put(Student,Evaluations);

当我在控制台看到结果时,我得到了这样的学生参考:ge.gov.mia.academy.entities.AcadStudent@74dc9778

有人可以告诉我什么是错的或有什么问题吗?

1 个答案:

答案 0 :(得分:0)

正如Ian Roberts所说,你没有覆盖toString方法来从java对象中获取字符串。

相关问题