Lookups on model objects #878
thorin-schiffer
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, linked documents can be used in lookups with their ID field. It's only convenience, but it would also be useful to make lookups with model objects, like
await Car.find(Car.wheel == wheel1).to_list()
. Also, some additional type checking would be useful, asawait Car.find(Car.wheel.id == wheel1.id).to_list()
works, butawait Car.find(Car.wheel.id == str(wheel1.id)).to_list()
doesn't and this is not so extraterrestrial that the IDs are turned to string objects while being serialized, for example.Beta Was this translation helpful? Give feedback.
All reactions