如果您直接从Parse进行查询,则可以执行以下操作:
ParseQuery query = ParseQuery.getQuery("Conference");
...
query.include("name_of_the_column_containing_a_pointer");
query.include("another_pointer_column");
query.findInBackground(new FindCallback() {
public void done(List results, ParseException e) {
if (e == null) {
// You can now access the pointers specified in the include
} else {
showLog(e.toString());
}
}
});
否则,如果您要查询本地数据存储区:
ParseQuery query = ParseQuery.getQuery("Conference");
...
query.findInBackground(new FindCallback() {
public void done(List results, ParseException e) {
if (e == null) {
ParseObject parseObject = results.get(0); // Get the object
parseObject.fetchIfNeededInBackground(new GetCallback() {
public void done(ParseObject result, ParseException e) {
if (e == null)
// Do something with result
}
}
} else {
showLog(e.toString());
}
}
});