-
Notifications
You must be signed in to change notification settings - Fork 211
Allow dot notation indices of embedded documents #77
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
Conversation
We should also recurse in to embedded models. I can definitely help you with implementation if you're stuck. |
I wasn't stuck, it was just 2am and I was tired :) |
Gna. I wanted the diff show this: https://github.com/django-mongodb-engine/mongodb-engine/compare/master...issue77 I think that makes the |
I'm not sure how I feel about using is_instance. I used I'm far from a python grandmaster though, and my intuition could be way off. Thoughts? |
Ellie: It's clearer with [OT]Python is duckly typed in theory but (in my opinion) misses some important constructs (like interfaces) to make type checks usable (for example, there's no straightforward duckly way to check for a string/unicode/list/dict etc). That's why nobody uses duck-type-checks in practice. The only exception I know about is Besides that, I'm not totally happy with how @flaper87 do you have some time to review my patch? |
Ok, fair enough. I'll pull your commit in and push, I think that's the appropriate workflow? |
If you want to change anything, yes. Otherwise I can just merge my branch into master. |
My pep8 changes were done after you forked my branch, so I'll need to push with those. |
…odb-engine into index_dotnotation
I mentioned earlier on the mailing list that I wanted to index embedded documents, as Mongo allows, and I was curious as to weather it was possible. It wasn't, so I did my best to fix it.
I made sure to preserve column aliases at the root level, but in the case of embedded models I do not currently check for aliases. Is this an important feature, or is what I've written reasonable?