1

I have these Classes in parse db.

User ...

Post (user pointer<_User> | images Relation )

Image (post pointer | image File )

Follow ( user_from pointer | user_to pointer)

The questions are,

1- How to get the list of posts with their images of users who i am following. (in java android)

2- How to get a list of my posts.

3- How o get a list of my followers.

4- example of java class of User, Post, Image and Follow objects.

enter image description here

enter image description here

enter image description here

enter image description here

thanks

Hatim
  • 1,516
  • 1
  • 18
  • 30

1 Answers1

0

probably you'll need to construct a relational queries, like the example below:

ParseQuery<ParseObject> innerQuery = ParseQuery.getQuery("Post");
innerQuery.whereExists("image");
ParseQuery<ParseObject> query = ParseQuery.getQuery("_User");
query.whereEqualTo("postPointer", innerQuery);
query.findInBackground(new FindCallback<ParseObject>() {
  public void done(List<ParseObject> commentList, ParseException e) {
    // comments now contains the comments for posts without images.
  }
});

You can check more about it at Parse Docs

nataliec
  • 502
  • 4
  • 14