1、在android 应用程序开发中使用mybatis的不利方面:
A、需要对mybatis针对Dalvik编译
B、对于手持设备来讲有点太“重量级”
C、存在其他可用与Android app 的ORM框架
The first thing to do in order to do that isto compile myBatis for Dalvik. But it's likely to be too heavy for adevice like a smartphone.If you are looking for a lightweight persistence layer, you could look at Ammentos:
http://www.ammentos.org/
Same trouble: you will need to compile it for Dalvik.
Existing ORMs for Android:
http://ormlite.sourceforge.net/sqlite_java_android_orm.html
https://www.activeandroid.com/
2、两个可用的ORM框架
A、abatis
http://code.google.com/p/abatis/B、OrmLite
http://ormlite.com/
推荐使用OrmLite,
原因:
A、资料比较多
B、是一种轻量级别的工具,相对于功能复杂的其他ORM工具,
C、OrmLite 仅仅提供访问数据库的一些基本方法、但是我们可以方便的扩张我们需要的功能。