-
Notifications
You must be signed in to change notification settings - Fork 26
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
The fetch_links=True in beanie queries doesn't work #20
Comments
This looks like same issue with mongomock's implementation of DBRef (which is the core of beanie's links) as discussed in #5. I've created issue at mongomock (mongomock/mongomock#759), but I don't really want to patch internals of mongomock in this library. So currently support for links is limited. |
Thanks so much! In the interim, I changed my code to use fetch_all_links in an async for loop and for cases where I need to use fetch_links I skipped these unit tests for now. I have integration tests to cover these cases. However it would be great to have this working. |
Hello, Can you fix this? |
What exactly is not working for you? This issue refers to the internal implemetation of beanie that doesn't support some operations with |
So after getting a document calling fetch_all_links() works however when using the keyword argument it doesn't. Thus you can't do queries comparing the linked document properties. For example the below would not work:
doc = await House.find_one(House.front_door.color == 'Blue', fetch_links=True)
The text was updated successfully, but these errors were encountered: