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
Case insensitive uniqueness #263
Case insensitive uniqueness #263
Conversation
Not 100% sold on this one - Maybe I'd be happier if it was a custom field - then we could be more explicit about the costs of this approach. |
@rozza I changed it to be a custom field. How do you like it now? |
Looks good! I think this should go into: https://github.com/MongoEngine/extras-mongoengine The fields themselves need docs and then we need a generic way to hook into mongoengine/base.py and do modifications there. What do you think? |
Hey Ross! You're right, extras-mongoengine looks like a more suitable place for these fields. Feel free to close this PR, I'll make a new one in the other repo. |
Having given it more thought, I'm afraid that moving these changes to the other repo is non-trivial. I'd have to override the original Am I not seeing an obvious, easier solution? |
I think we'd need to include some sort of hook in mongoengine to call from the field class. Let me ponder it :) |
@rozza, just following up - how's the pondering going? :) I would like to implement something like this in one of my projects very soon and am wondering whether to wait for the upstream changes or change my fork. |
Came up with a simpler implementation that can be easily included in https://github.com/MongoEngine/extras-mongoengine. I'll open a PR there soon. |
Changes Unknown when pulling 80cbe9d on elasticsales:case-insensitive-uniqueness into * on MongoEngine:master*. |
results in: