是否有任何好的 ORM(最好是 JPA 实现)支持 SQLite(在 Android 上)? [英] Are there any good ORMs (preferably JPA implementations) that support SQLite (on Android)?

查看:24
本文介绍了是否有任何好的 ORM(最好是 JPA 实现)支持 SQLite(在 Android 上)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在不久前发现了一个帖子,它解决了一个类似的问题,但我认为它有点过时了.我意识到 JPA 的实现更倾向于重/密集方面,所以如果您知道任何轻量级(非 JPA)ORM,我肯定会感谢您的投入.我确实在另一篇文章中看到了关于 ActiveAndroid 的答案,我很想知道是否有人尝试过.>

更新:

最后,我决定采用更轻量级的解决方案并选择 DB4O.到目前为止,我对自己的选择非常满意.它非常容易使用,并且需要最少的配置.该网站包含丰富的信息,包括示例项目和深入的教程 几乎涵盖了开发人员可能需要了解的有关 DB4O 的所有内容.哦,我有没有提到它是免费的(不像其他一些替代品......coughActiveDroidcough)?

解决方案

关于 JPA 实现,至少有一个 SQLite 的第三方方言 用于 Hibernate.我不是 100% 确定,但 EclipseLink 似乎也是一个选项(尽管 SQLite 是未得到官方支持).

但对于 Android 开发,我肯定会检查 ActiveAndroid.

为了以防万一,这里有一些其他选择:jPersistEbean, Dreamsource ORM(查看公告在 TSS 上).

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).

这篇关于是否有任何好的 ORM(最好是 JPA 实现)支持 SQLite(在 Android 上)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆