I linked data from a SQLite database table to a ListView with SimpleCursorAdapter. This works well when I use _id INTEGER PRIMARY KEY AUTOINCREMENTmy table as the primary key. However, I am trying to use a composite primary key, for example:
CREATE TABLE table (
column1,
column2,
column3,
PRIMARY KEY (column1, column2));
From what I can assemble, the constructor SimpleCursorAdapterrequires the _id column to work. I cannot find a way to build SimpleCursorAdapterusing a composite primary key.
source
share