how to get cursor with ORMlite

104 views
Skip to first unread message

Budi Hartono

unread,
Oct 17, 2012, 11:43:39 PM10/17/12
to ormlite...@googlegroups.com
hello

could somebody tell me.
how to get cursor with ORMlite in android. i like to use it with cursoradapter.
i try from gray post : http://stackoverflow.com/questions/7159816/android-cursor-with-ormlite-to-use-in-cursoradapter
but the problem is, there must be _id in class.

is there any way to get cursor without change any class i have?

TIA
budi

jc

unread,
Nov 16, 2012, 9:49:08 PM11/16/12
to ormlite...@googlegroups.com
The "_id" requirement is an API requirement, it has nothing to do with OrmLite:   http://developer.android.com/reference/android/widget/CursorAdapter.html 

You either need to add the _id column to your table to meet the API requirements or you can take a look at this post in the other forum that has details about this and also includes a CursorWrapper I posted that you could use:  https://groups.google.com/forum/?fromgroups=#!topic/ormlite-user/SbRoHIov5pI

Reply all
Reply to author
Forward
0 new messages