Support nested projection in get_projection
#24
ryotatomioka
started this conversation in
Feature Request
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently,
bunnet.odm.utils.projection.get_projection
does not support nested projection model. Although I only have experience with Mongo DB backed up by Azure Cosmos DB, in my experience this makes a huge difference (~50-100x) in query speed when the size of the field to be projected is much smaller (e.g., a single string) compared to the hierarchy of models containing it.For example,
The following simple change fixes this (returns
{"level_1.level_2.id": 1}
)Beta Was this translation helpful? Give feedback.
All reactions