大鱼

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

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

如出现类似以下异常:

 

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

 

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

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

posted on 2009-03-16 22:19 大鱼 阅读(359) 评论(0)  编辑  收藏 所属分类: EJB


只有注册用户登录后才能发表评论。


网站导航: