Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use whereMatchesKeyInQuery with pointer to class

I call them tables but in the code they are actually just classes. I got table of users (class that extends ParseUser) I got table TableAClass (class that extends ParseObject), and I got table TableBClass (class that extends ParseObject) B contains pointers to MyUserClass and to TableAClass

ParseQuery<MyUserClass> query = ParseQuery.getQuery(MyUserClass.class);


ParseQuery<TableBClass> secondQuery = new ParseQuery<TableBClass>(
                    MyInstallsClass.class);

now the key part, I can't query like this

query.whereMatchesKeyInQuery( "objectId", "myuser_id",secondQuery);

because 'myuser_id' is not an String it is a Pointer to MyUserClass How should I make this query work without adding additional String columns with of String type that will contain the objectId

like image 651
user3564382 Avatar asked Dec 07 '25 20:12

user3564382


1 Answers

Not sure if this is still relevant, anyway, you may do secondQuery.whereMatchesKeyInQuery("myUserId","objectId",query);

like image 166
apatian Avatar answered Dec 10 '25 09:12

apatian



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!