How to extract some links is a single request #1212
Unanswered
YedidyaHKfir
asked this question in
Question
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I’m trying to use Beanie as my MongoDB client.
My data model includes multiple relations, and I’d like to selectively eager-load certain related documents when querying—based on my own logic.
Here’s a simplified example of my setup:
According to the documentation, I can fetch linked documents like this:
But this results in multiple round trips to the database.
My Question:
Is there a way to eager-load specific linked fields (like data and data2) in a single query?
If so, how should I structure that call? If not, is such a feature planned or recommended?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions