Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hibernate vs. Apache Torque

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

like image 800
Pavel Vyazankin Avatar asked Apr 20 '10 06:04

Pavel Vyazankin


2 Answers

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

like image 50
Bozho Avatar answered Nov 10 '22 06:11

Bozho


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.

like image 28
rajguru Avatar answered Nov 10 '22 06:11

rajguru