在哪里可以找到 jpa orm.xml 使用示例

发布于 2024-10-10 04:36:26 字数 1536 浏览 0 评论 0原文

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

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

发布评论

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

评论(2

少女的英雄梦 2024-10-17 04:36:27

这可能不是一个完整的答案,但是 http://www.jpox.org/ docs/1_2/tutorials/jpa_tutorial.html 使用 JPA 1.0。然而,当我为 JPA 2.0 创建 ORM.xml 时,它很有用。我知道 O'Reilly 的“Enterprise JavaBeans 3.0”也有很好的例子。否则,您必须查看架构(将发布链接,但显然我没有足够的代表来发布多个链接)并将其与注释示例相匹配......至少这是我必须做的。

ORM.xml 似乎不再受注释版本的青睐,这解释了很难找到任何好的 ORM.xml 文件示例。

This may not be a complete answer but, http://www.jpox.org/docs/1_2/tutorials/jpa_tutorial.html uses JPA 1.0. However, it was of use when I created my ORM.xml for JPA 2.0. I know "Enterprise JavaBeans 3.0" from O'Reilly has good examples too. Otherwise you have to look at the schema (would post the link but apparently I don't have enough rep to post multiple links) and match it up with annotations examples...at least that is what I had to do.

ORM.xml appears to be falling out of favor for the annotation version, which explains the difficulty of finding any good examples of ORM.xml file.

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