I've bound data from a SQLite database table to a ListView using a SimpleCursorAdapter
. This works well when I use _id INTEGER PRIMARY KEY AUTOINCREMENT
as my table's primary key. However, I'm trying to use a composite primary key such as the following:
CREATE TABLE table (
column1,
column2,
column3,
PRIMARY KEY (column1, column2));
From what I can gather, the SimpleCursorAdapter
constructor requires the _id column to work. I cannot find a way to construct the SimpleCursorAdapter
with the composite primary key.