休眠未知实体 [英] Hibernate Unknown Entity

查看:78
本文介绍了休眠未知实体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个映射了休眠类的jar文件.一个jar文件可以正常工作,而对于下一个jar文件,则不会被映射.我收到未知实体异常.Persistence.xml很好,但我不知道为什么会这样.任何猜测是什么问题吗?

I have two jar files with hibernate classes mapped. One jar file is perfectly working and for the next jar file it is not mapped. I get Unknown Entity exception. Persistence.xml is good but i dont know why this is happening. Any guess what mite be the issue???

推荐答案

检查是否具有

Check if you have @Entity on your Equipment class.

此注释( @Entity )将一个类标记为休眠(JPA)实体.

This annotation (@Entity) is marking a class as Hibernate (JPA) entity.

这篇关于休眠未知实体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆