开发者

Are there any good ORMs (preferably JPA implementations) that support SQLite (on Android)? [closed]

开发者 https://www.devze.com 2023-01-03 18:04 出处:网络
Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing
Closed. This question is opinion-based. It is not currently accepting answers.

Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.

Closed 9 years ago.

Improve this question 开发者_JS百科

I found a post from a while ago that addresses a similar question but I think it's a bit outdated. I realize implementations of JPA tend to be more on the heavy/dense side, so if you know of any lightweight (non-JPA) ORMs I'll most certainly appreciate your input. I did see the answer about ActiveAndroid in the other post and am curious to know if anyone tried it out.

Update:

In the end, I decided to go with a more lightweight solution and chose DB4O. So far I've been very happy with my choice. It's extremely easy to use and requires a minimal amount of configuration. The website contains a wealth of information including sample projects and an in-depth tutorial that covers just about everything a developer might need to know about DB4O. Oh, and did I mention that it's free (unlike some other alternatives... coughActiveDroidcough)?


Regarding JPA implementations, there is at least a third party Dialect for SQLite for Hibernate. I'm not 100% sure but EclipseLink seems to be an option too (although SQLite is not officially supported).

But for Android development, I would definitely check ActiveAndroid.

Just in case, here are some other alternatives: jPersist, Ebean, Dreamsource ORM (have a look at the announcement on TSS).


ORMLite is not fully JPA compliant but it does support Sqlite on Android. It makes calls to the native Android OS database APIs to support its ORM functionality. We have a large number of Android users who are using it very successfully.

http://ormlite.com/sqlite_java_android_orm.shtml


BatooJPA is the only full featured JPA 2.0 spec compliant option. For mobile platforms, CPU consumption should be consider because of battery life limited CPU power etc. BatooJPA is perfect when full spec required and CPU resource does matters. For the SQLite case as far as you can provide a JDBC driver, Batoo JPA will do the rest.

0

精彩评论

暂无评论...
验证码 换一张
取 消