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

support for ObjectId based reference search #12

Open
SGeri opened this issue Nov 11, 2023 · 2 comments
Open

support for ObjectId based reference search #12

SGeri opened this issue Nov 11, 2023 · 2 comments

Comments

@SGeri
Copy link

SGeri commented Nov 11, 2023

If we have a user document in the users collection like the following schema: (example)

{
_id: ObjectId(A)
profile: ObjectId(B)
}

and a profile document in the profiles collection:

{
_id: ObjectId(B)
name: "test"
}

...and I want to make a search in the users collection where we query the user.profile.name field, currently this package does not offer a solution. Are you planning to implement a built-in lookup aggregation pipleine solution for this case? Thanks a lot.

@balazsnemeth
Copy link

@NathanAdhitya @paulr113 do you think you can take a look? We also met this limitation.

@NathanAdhitya
Copy link
Owner

NathanAdhitya commented Nov 17, 2023

Hi. Unfortunately, for now, document joins on the server are outside of the scope of this project. In such cases, forking and building upon this repository may be desirable.

For such queries, does the ReferenceField family of components not work for your use case?

PS. many of the methods provided by this package can be reused. If you need certain custom behaviour, it is possible to disable a route e.g. list, and then implement/extend your own list route.

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

3 participants