📅  最后修改于: 2020-11-16 08:17:19             🧑  作者: Mango
iBATIS和Hibernate之间存在主要差异。考虑到它们的特定领域,这两种解决方案都可以很好地工作。建议使用iBATIS-
如果环境由对象模型驱动并且需要自动生成SQL,请使用Hibernate。
Hibernate和iBATIS都是业界可用的开源对象关系映射(ORM)工具。这些工具的使用取决于您使用它们的环境。
下表重点介绍了iBATIS和Hibernate之间的区别-
iBATIS | Hibernate |
---|---|
iBATIS is simpler. It comes in a much smaller package size. | Hibernate generates SQL for you which means you don’t have to spend time on generating SQL. |
iBATIS is flexible. It offers faster development time. | Hibernate is highly scalable. It provides a much more advanced cache. |
iBATIS uses SQL which could be database dependent. | Hibernate uses HQL which is relatively independent of databases. It is easier to change db in Hibernate. |
iBatis maps the ResultSet from JDBC API to your POJO Objets, so you don’t have to care about table structures. | Hibernate maps your Java POJO objects to the Database tables. |
It is quite easy to use stored procedure in iBATIS. | Use of stored procedures is a little difficult in Hibernate. |
Hibernate和iBATIS都从SPRING框架获得了良好的支持,因此选择它们之一应该不是问题。