哪些Java ORM适用于Android操作系统,并支持懒惰的名单?适用于、懒惰、操作系统、名单

2023-09-06 03:11:40 作者:战骨踏为尘メ

我要选择一个最好的,合适的ORM库为Android在我的应用程序使用。我知道GreenADO和ORMLite但不是很多。

I wanna choose a best and suitable ORM library for android to use in my app. I know about GreenADO and ORMLite but not a lot.

你能不能在它们之间进行比较,并提到他们的优势/劣势? 而且还告诉其中一个支持懒列表?

Could you compare between them and mention advantages/disadvantages of them? And also tell which one support lazy list?

感谢

推荐答案

我用GreenDAO,因为它的快速性,(见性能)。它很容易使用,你可以这样做很容易lazyLoading。 ORMLite有一个更大的社区我的看法,但似乎慢。

I use GreenDAO, because of its rapidity (see performance). It's easy to use and you can do very easily lazyLoading. ORMLite has a bigger community I think but seems slower.

关于延迟加载,在ORMLite你必须使用DAO.iterator(查询),它返回一个迭代器,所以你需要一个定制的适配器。随着greendao,你可以使用Query.lazyList(),它返回一个列表。

About lazy-loading, in ORMLite you have to use DAO.iterator(Query) which returns an iterator, so you need a custom adapter. With greendao, you can use Query.lazyList(), which returns a list.

我会建议你去GreenDAO。

I would suggest you to go to GreenDAO.