# Efficient Query for Nested Pointer Filtering

**URL:** <https://community.parseplatform.org/t/efficient-query-for-nested-pointer-filtering/5007>\
**Category:** Parse Server 📡\
**Tags:** query\
**Created:** [August 21, 2025, 2:30pm UTC](https://community.parseplatform.org/t/efficient-query-for-nested-pointer-filtering/5007 "2025-08-21T14:30:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![7ala](https://community.parseplatform.org/letter_avatar_proxy/v4/letter/7/bc79bd/32.png) [@7ala](https://community.parseplatform.org/u/7ala)\
**Post date:** [August 21, 2025, 2:30pm UTC](https://community.parseplatform.org/t/efficient-query-for-nested-pointer-filtering/5007/1 "2025-08-21T14:30:17Z")

</div>

Hi Parse Community,

I’m working with a nested class structure and need help crafting an efficient query

### **Schema Structure** :

- `Property` class → has pointer to `Project`
- `Project` class → has pointer to `Developer` and `ProjectStatus`

### **What I Need** :

I want to filter `Property` objects based on:

1. `ProjectStatus` of the related Project
2. Specific `Developer` of the related Project

# Current Approach:

const developerQuery = new Parse.Query(‘Developer’);  
developerQuery.equalTo(‘objectId’, developerId);

const projectQuery = new Parse.Query(‘Project’);  
projectQuery.matchesQuery(‘developer’, developerQuery);

const propertyQuery = new Parse.Query(‘Property’);  
propertyQuery.matchesQuery(‘project’, projectQuery);

# My Questions:

1. Is this the most efficient approach for deep nested filtering?
2. Should I use \*\*aggregation pipelines instead (I’m using MongoDB)?
