Hibernate 与 Apache Torque

发布于 2024-08-29 11:27:02 字数 69 浏览 5 评论 0原文

谁能提供每个 ORM 的详细优点和缺点吗? 首先,我对 Hibernate 提供的东西感兴趣,而 Torquay 不感兴趣。

Can anybody provide detailed advantages and disadvantages of each ORM?
First of all I'm interested in things that Hibernate provides, and Torquay not.

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

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

发布评论

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

评论(2

娇女薄笑 2024-09-05 11:27:03

Hibernate:

  • 更旧且更稳定的
  • 实现 JPA(包括 JPA 2.0)
  • 支持注释
  • 处于活动状态

这些应该足以选择 Hibernate。自 2008 年 9 月 7 日起,Torque 没有任何消息

Hibernate:

  • is older and more stable
  • implements JPA (incl. JPA 2.0)
  • supports annotations
  • is active

Those should be enough to prefer Hibernate. Torque doesn't have any news since 07 September 2008

起风了 2024-09-05 11:27:03

我看到使用 Torque 的一个好处是,您可以拥有生成的代码(也可以根据应用程序需求进行自定义),并且如果您的操作直接映射到数据库表,则非常适合。使用 Torque,您不需要为 beans/pojo 和注释编写代码(其中大部分是生成的)。大多数 SQL 代码都在 ORM 类中。无需配置来处理 POJO。
您还可以通过使用 hibernate 进行逆向工程来实现此目的,但您需要了解 bean 属性如何映射到表列等。
是的,hibernate 很流行并且使用最多。

One benefit I see using torque is that you can have of generated code (can also be customized based on the application needs) and fits well if your operations directly map to the database tables. With Torque you don't need to write code for beans/pojos and annotations (most of them are generated). Most of the SQL code are all in the ORM classes. No configurations need to handle POJOs.
You can also achieve this by doing reverse engineering with hibernate, but you need to understand how the a bean property is mapped to table column and so on.
Yes, hibernate is popular and most used.

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