The-Devoyage / subgraph

A POC written in rust to generate a functional API based on a simple config/schema.
GNU General Public License v3.0
7 stars 0 forks source link

Mongo - Find by nested objects in list does not work #46

Closed nickisyourfan closed 1 year ago

nickisyourfan commented 1 year ago

Searching for nested objects in a list does not work.

Steps to reproduce:

  1. Create a mongo database and entity that has a field that is an array of objects. coffee.comments.name
  2. Try to find the coffee that has a comment which has a name of x.

The sent to the mongo server is incorrect.

Actual:

{
  "comments": [
    {
      "name": "joey"
    }
  ]  
}

Required:

{
  "comments.name": "joey"
}