Saturday 15 May 2010

android - Parse query.whereEqualTo String issue -



android - Parse query.whereEqualTo String issue -

i using parse backend android app. need query database record has field specific string value. next parse code

strobjectid string initialised parse objectid follows

string strobjectid = myparseobject.getobjectid();

parse code

parsequery<parseobject> query = parsequery.getquery("mydatatable"); query.whereequalto("code", code); query.getfirstinbackground(new getcallback<parseobject>() { public void done(parseobject object, parseexception e) { if (object == null) { return; } else { showtoast("record found!"); } } });

the problem works okay when 'code' hardcoded follows prior running above query

string code = "krerzgz9is";

but not work when code assigned parse objectid follows

string code = strobjectid;

obviously info table have record 'code' field value 'krerzgz9is'

your help appreciated

thanks

have tried print out strobjectid? if object not yet saved in parse, or object not loaded parse. not have object id.

also, have tried check equality objectid directly?

query.whereequalto("code", myparseobject.getobjectid());

android jquery string parse.com objectid

No comments:

Post a Comment