Hello Please help me with this query

#1
#2

First you should get the parseobject for a pointer and query based on that object for example
if you have a column with pointer type named owner in your class your query to find rows belong to current user will be like this in android sdk:

ParseQuery<ParseObject> query = ParseQuery.getQuery("YourClass");
query.whereEqualTo("owner",ParseUser.getCurrentUser());
query.findInBackground();

another example if you have a Product class with pointer relation to Company class you should query company first like the following code and pass to second query after you find it:

ParseQuery brandQuery = ParseQuery.getQuery("Company");
brandQuery.whereEqualTo("name","Benz");
brandQuery.getFirstInBackground(new GetCallback<ParseObject>() {
          @Override
           public void done(final ParseObject company, ParseException e) {
                ParseQuery<ParseObject> query = ParseQuery.getQuery("Product");
                query.whereEqualTo("brand",company);
                query.findInBackground(new FindCallback<ParseObject>() {
                            @Override
                            public void done(List<ParseObject> objects, ParseException e) {
                                if(e == null){
                                      //Do something
                                }
                            }
                 });
          }
});
#3

Hello thank you for reply but what should i put inside done method to retreive the value? … By the way do you know about a good tutorial that teaches me everything about querys?

#4

Hi :wave:,

Welcome to the Parse Community!

I’ve just posted an answer on your Stack Overflow question - please take a look.

Please refrain from cross posting not only is this topic not serving a purpose and potentially wasting people’s time if answers are cross posted. Also please don’t come to expect instant answers as we are all volunteering our time here so patience and independence are key in our community.

Therefore I am going to close and later delete this post, please don’t take this personally.

#10

@TomWFox Hello Tom im from Colombia and having trouble in understanding what you mean with cross posting. If you explain to me what is this i will not do it. thank you for your excelent responce in Stack.

Can you please tell me where i can find documentation on how to create a class in Android Studio which extends ParseObject and how to create the setter and getters with pointers?

#11

Absolutely, by cross posting I mean posting the same question/content etc to multiple platforms/websites. It just can end up confused with different answers on different sites which can wastes people’s time.

We recently made the decision to more clearly direct code level questions to stack overflow as it has the right tools & scale for those types of questions. So you were absolutely right to post on stack overflow I would just rather you didn’t post it here too!

I hope that makes sense…

#12

Then if i post my question on Stack how should i get responce from this community?

#13

You could take a look at the subclasses section on the Android guide.

I’ve never use then Android SDK or made an Android app so I can’t help you more that this. I would ask that you have a good look at this section in the docs & have a go writing the code and then if you get stuck or something doesn’t seem to work feel free to post a question on stack overflow.

#14

This community is quite aware of the fact that we are directing code level questions to stack overflow - as you have probably seen there is a ‘banner’ topic that you first see when you sign up that explains where questions should be asked.

I have also continued to try and make people aware of this so hopefully over time we should get more ‘parse experts’ over on stack overflow but me and some of the core maintainers have already been answering questions (as you can see).

1 Like
#15

Great customer service thanks tom!

#16

No worries, It’s not just customer service, it’s volunteer service :wink: - if you ever feel like paying it forward we love to see new faces contributing!!

1 Like
#18

i will need to pay when i release my app and have many users.

closed #19
unlisted #20