1:1の関係にある2つのテーブルがあり、コンテンツプロバイダーとカーソルローダーを使用しています。
カーソルローダーで動作するように結合クエリを作成するにはどうすればよいですか?コンテンツプロバイダー内のrawSqlでなんとかハックすることはできますが、カーソルローダーコンストラクターでそれを行う方法は私を超えています。
どうもありがとう !
private static final String CREATE_TABLE_ARTICLES = "create table "
+ TABLE_ARTICLES + "("
+ COLUMN_ARTICLE_ID + " integer primary key autoincrement, "
+ COLUMN_URL + " text not null unique, "
+ COLUMN_TITLE + " text not null, "
+ COLUMN_PRICE + " text not null, "
+ COLUMN_ADDED + " text not null, "
+ COLUMN_IMG_URL + " text);";
private static final String CREATE_TABLE_ARTICLE_DETAIL = "create table "
+ TABLE_ARTICLE_DETAILS + "("
+ COLUMN_ARTICLE_DETAIL_ID + " integer primary key autoincrement, "
+ COLUMN_DESC + " text not null, "
+ COLUMN_LOCALITY + " text, "
+ COLUMN_TYPE + " text not null, "
+ COLUMN_SELLER + " text not null, "
+ COLUMN_SELLER_PHONE + " text, "
+ COLUMN_IMAGE_COUNT + " integer default 0, "
+ COLUMN_ARTICLE + " integer, foreign key (" + COLUMN_ARTICLE + ") references " + TABLE_ARTICLES + "(" + COLUMN_ARTICLE_ID + "));";