parsing - Android/Parse - Querying values in a column of Class B using values in another column, and the latter are actually pointers to ObjectId of Class A -
I have read many platforms on this topic but none of these is specific to Android / Pars
I have There is a parse orbit called "Ranking Board" which looks like this:
Object ID & nbsp; UserId & nbsp; Assessment Record - ---------- & nbsp; & Nbsp; & Nbsp; --------- & nbsp; & Nbsp; ----------------- ----- 123456 & nbsp; ABCDE & nbsp; 5.0
The above "UserID" column is actually an indicator for the "object" column in the user (the default class in Pars).
ObjectID
ABCDE
And so I hope the following code To get the value of ratingAugraget (i.e. 5.0) in the "rating" ("rankingboard") in GetQuery, to get the value of where Excel ("UserID," "ABCDE") is used.
list & lt; ParseObject & gt; Ob; Last Rating Bayer Rating Bar; Ratingbar = (ratingbar) v.findViewById (RID .artingbar); Letter userid = user.getObjectId (); ParseQuery & LT; ParseObject & gt; Query = ParseQuery.getQuery ("Rankingboard"); Query.whereEqualTo ("UserID", userid); Try {ob = query.find (); Log.d ("status", "+ ob.size ()); For (int i = 0; i
But that does not work because "UserID" is an indicator and there is no string.
I read somewhere else that I have to use "included", but I could not get the code to work.
Hope anyone can highlight me
Note:
(1) I am using a customized list adapter which is used for an input The form is called a portusuer object (user). This is the reason that you see the user.getObjectID () in the code and I have verified that ObjectIDs are correct. (2) ob.size () is always 0 because the query is not working. When I printed query.size () instead, then the total number of entries in the rankingboard is correct.
I got the solution, I had the same problem when you use
query.whereEqualTo ("UserID", userid);
This is an indicator, when you are doing the equivalent, you can not use the string. The way to do this is to present the object itself:
string userid = user.getObjectId (); Enter
and user
, where you had user ID
query.whereEqualTo ("UserID", user); & Lt; ParseObject & gt; Ob; Last Rating Bayer Rating Bar; Ratingbar = (ratingbar) v.findViewById (RID .artingbar); ParseQuery & LT; ParseObject & gt; Query = ParseQuery.getQuery ("Rankingboard"); Query.whereEqualTo ("UserID", user); Try {ob = query.find (); Log.d ("status", "+ ob.size ()); For (int i = 0; i
Comments
Post a Comment