Есть такой код.
public void refreshTransactions(){
Cursor cursor = dbHelper.getAllTransactions(db);
String[] from = new String[] {"a.name","c.name","t.date", "t.amount"};
int[] to = new int[] { R.id.tvAccount, R.id.tvCategory, R.id.tvDate, R.id.tvAmount };
SimpleCursorAdapter cursorAdapter = new SimpleCursorAdapter(this,R.layout.item_journal_transaction,
cursor,from,to,0);
ListView listView = (ListView)findViewById(R.id.list_JournalTransaction);
listView.setAdapter(cursorAdapter);
}
//из dbHelper
public Cursor getAllTransactions(SQLiteDatabase db) {
return db.query(TableNames.VIEW_TRANSACTIONS,
null,null,null,null,null,null);
}
//строка создающая представление
String VIEW_TRANSACTIONS = "" +
"create view \n" +
TableNames.VIEW_TRANSACTIONS+" "+
"as select t._id, t.date,a.name,c.name, t.amount\n" +
"from accounts a, categorys c, transactions t\n" +
"where t.categorys_id = c._id\n" +
"and t.accounts_id = a._id;";

Видно, что представление отрабатывает нормально.

Но в ListView адаптер дублирует account и category.
В чем может быть проблема?