Any good ORM tools for Android development? [close

2019-01-01 07:39发布

Anyone working on the Android ('gPhone') have or know of a place where I can find a good ORM tool for it? The code is written in Java, and the database is SQLite. What I would like to find is a tool that given the object definition, can auto-generate the tables and the CRUD functions (that would be awesome), or, barring that, a tool that can take the table definition, the object definition, and auto-generate the CRUD functionality. The rub is that all of this must happen within the Android framework, which has its own conventions as to how database access works.

16条回答
千与千寻千般痛.
2楼-- · 2019-01-01 08:11

http://hadi.sourceforge.net

This tool is very simple and easy to use.

查看更多
伤终究还是伤i
3楼-- · 2019-01-01 08:11

I have developed my own implementation of the JPA ORM for Android. It is not yet fully feature complete, but you can annotate class with the @Entity, @Id, @Column annotations and you get JPA entities that can be stored and retrieved from the SQLite database. It needs some more features & cleanup before I'll post it to the public, but if there is enough interest it might accelerate my effort.

查看更多
琉璃瓶的回忆
4楼-- · 2019-01-01 08:13

https://github.com/ahmetalpbalkan/orman

Orman framework might help you. It is especially designed for that and very small and useful.

查看更多
有味是清欢
5楼-- · 2019-01-01 08:14

My own DroidParts /http://droidparts.org/ just reached v0.5. It's a DI/ORM library & more.
Not much documentation, but includes a sample app.

查看更多
像晚风撩人
6楼-- · 2019-01-01 08:15

If performance and code size matter, check out greenDAO. I'm the author of it, and my motivation to create another ORM was to avoid reflection in the hotspots. It turned out that greenDAO can be up to 4 times faster than ORMLite. Checkout the feature page for details.

查看更多
与君花间醉酒
7楼-- · 2019-01-01 08:17

ActiveAndroid ($20) looks like it may be exactly what you need.

查看更多
登录 后发表回答