Light weight alternative to Hibernate? [closed]

2020-01-27 09:11发布

I have a single user java program that I would like to have store data in a light weight database such as Derby or Sqlite. I would like to use a data abstraction layer in my program. Hibernate appears to require a lot of configuration and is overkill for what I need. What are light weight alternatives to Hibernate?

14条回答
时光不老,我们不散
2楼-- · 2020-01-27 09:43

Hibernate requires next to zero configuration if you use annotations. It even can auto-discover mapped beans in the classpath! I don't see any alternative to it from both simplicity and power point of view.

It can also expose itself as JPA, which is (IMHO) even simpler.

查看更多
该账号已被封号
3楼-- · 2020-01-27 09:45

You can have a look at Ebean ORM. - No sessions - lazy loading just works - Simpler API to use and learn.

查看更多
做自己的国王
4楼-- · 2020-01-27 09:45

If using a relational database is not mandatory, give db4o a try.

查看更多
看我几分像从前
5楼-- · 2020-01-27 09:50

I created sormula as an alternative to heavyweight ORM's. It is CRUD-ready, POJO-friendly, simple to use, configure, and understand. Zero-configuration use is possible. www.sormula.org

查看更多
6楼-- · 2020-01-27 09:52

Cayenne has served me well. Relatively easy to understand and to get it up and running. I find the reverse engineering part particularly charming. Configuration can be done with a GUI.

查看更多
我想做一个坏孩纸
7楼-- · 2020-01-27 09:53

You might want to take a look at prevayler (on sourceforge). A somewhat more lightweight approach to persistence. Or were you thinking about doing reporting against the DB?

查看更多
登录 后发表回答