ITeye博客

Collection has neither generic type or OneToMany.targetEntity() defined:

east_java · 2009-12-27 01:13 · Hibernate · 企业架构 · Markdown

如出现类似以下异常:

org.hibernate.AnnotationException: Collection has neither generic type or OneToMany.targetEntity() defined: org.svse.org.model.Order.orderItems

请检查orderItems这个属性是否使用了泛型,如:Set<OrderItem>.

如果未使用泛型,请在OneToMany注释中使用targetEntity指定元素的类型

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。