我的休眠映射文件存在,找不到映射的可能原因是什么?

发布于 2024-10-02 08:15:57 字数 261 浏览 10 评论 0原文

我动态生成了我的 hbms。现在,当我尝试在 Eclipse 中使用 HQL 编辑器时,出现以下错误:

Hibernate 动态 SQL 窗口: HQL 有效,但没有生成 SQL。您的配置很可能没有定义任何映射。

Hibernate查询结果窗口: org.hibernate.hql.ast.QuerySyntaxException:系统未映射[来自系统]。

我的 hql 为:

来自 com.kevin.hibernate.Address

I dynamically generated my hbms. Now when I attempt to use the HQL Editor in Eclipse, I'm getting the following error:

Hibernate Dynamic SQL Window:
HQL was valid, but no SQL generated. Your configuration most likely does not have any mappings defined.

Hibernate Query Result Window:
org.hibernate.hql.ast.QuerySyntaxException: system is not mapped [from system].

My hql reads:

from com.kevin.hibernate.Address

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

茶色山野 2024-10-09 08:15:57

您是如何创建Hibernate 控制台配置的?您是否声明了 hibernate.cfg.xml?如果是,它是否列出映射?您在错误视图中得到任何有用的提示吗?

也许遵循 3.3 部分的步骤。创建 Hibernate 控制台配置将会有所帮助。

参考资料

How did you create your Hibernate Console Configuration? Did you declare a hibernate.cfg.xml? If yes, does it list the mappings? Do you get any useful hint in the Error View?

Maybe following the steps of the section 3.3. Creating a Hibernate Console configuration will help.

References

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文