Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

querying ref / nested properties #59

Open
pantchox opened this issue Nov 17, 2017 · 5 comments
Open

querying ref / nested properties #59

pantchox opened this issue Nov 17, 2017 · 5 comments

Comments

@pantchox
Copy link

pantchox commented Nov 17, 2017

Hi,

How can i use queryman to query references schema properties?
lets say i have City Model and Streets Model where

  id: 123,
  name: 'my city',
  streets: [..]
}

where streets is sub resource ref fields for example in the City Schema its defined like this:

    type: Schema.ObjectId,
    ref: 'Streets',
    field: 'cityId'
  }]

so when doing query man i want to search bit city name and streets name like so:

    term: {
      type: RegExp,
      paths: ['name', 'streets.name'],
        }
url?term="york"

so if i search for york it will give me cities that have "york" in their name and streets that have "york" in their name also.

hope i was clear,

Thanks!

@lucas-subli
Copy link

+1

2 similar comments
@yl-flyer
Copy link

+1

@j0k3rabg
Copy link

+1

@jorgecuevas92
Copy link

Anyone found a way to do this?

@tkosudi
Copy link

tkosudi commented Apr 19, 2022

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants