I am modifying my Android app to work with ORMLite, and it currently uses a number of CursorAdapters, which I quite want to keep in an attempt to minimise coding.
I\
Wrap your cursor with another one that treats "_id" as an alias to your real primary key column. Example:
cursor = new CursorWrapper(cursor) {
@Override
public int getColumnIndexOrThrow(String columnName) throws IllegalArgumentException {
if ("_id".equals(columnName)) columnName = "id";
return super.getColumnIndexOrThrow(columnName);
}
};