am 46d6a4a7: When loading messages, use left join for Message and Body.

* commit '46d6a4a7cb98430088595a9e305060ac4273ab8f':
  When loading messages, use left join for Message and Body.
This commit is contained in:
Yu Ping Hu 2013-04-01 19:48:45 -07:00 committed by Android Git Automerger
commit 3a5f3044e4

View File

@ -2513,8 +2513,8 @@ outer:
}
}
StringBuilder sb = genSelect(getMessageViewMap(), uiProjection, values);
sb.append(" FROM " + Message.TABLE_NAME + "," + Body.TABLE_NAME + " WHERE " +
Body.MESSAGE_KEY + "=" + Message.TABLE_NAME + "." + Message.RECORD_ID + " AND " +
sb.append(" FROM " + Message.TABLE_NAME + " LEFT JOIN " + Body.TABLE_NAME + " ON " +
Body.MESSAGE_KEY + "=" + Message.TABLE_NAME + "." + Message.RECORD_ID + " WHERE " +
Message.TABLE_NAME + "." + Message.RECORD_ID + "=?");
String sql = sb.toString();
return new MessageQuery(sql, attachmentJson);