Wednesday, 15 July 2015

android - Two levels of pointers - one query parse.com -



android - Two levels of pointers - one query parse.com -

i have 3 classes,

class a: --pointer class b class b: --pointer class c class c: --name

i create 1 query classa, , retrieve classc.name how can that?

i did seek include classa.classb , getparseobject classc didn't succeed.

you need utilize include() method follows:

parsequery<parseobject> query = parsequery.getquery("classa"); query.include("pointertob.pointertoc"); query.findinbackground(new findcallback<parseobject>() { public void done(list<parseobject> results, parseexception e) { (parseobject in results) { parseobject b = a.getparseobject("pointertob"); parseobject c = b.getparseobject("pointertoc"); string name = c.getstring("name"); } } });

this assumes column on class called pointertob, , column on class b called pointertoc.

android parse.com

No comments:

Post a Comment