-
Notifications
You must be signed in to change notification settings - Fork 87
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
[WIP] Support case-sensitive uniqueness validation #221
Conversation
Hi @shioyama, is this PR also related to do a uniqueness validation of an attribute with json backend? As an example, i've got an attribute and 2 locales and i want that the attribute is unique based on the locale scope. |
@Gbeschbacher Yes, Mobility currently already supports uniqueness by locale for every backend, see here. However it is case-sensitive uniqueness only. I'm planning to support case-insensitive uniqueness as well once some big changes are done. Currently if you try to use case insensitive uniqueness Mobility will issue a warning telling you it is not supported. |
Thanks for the very fast reploy @shioyama! I'm also already using MySQL in the same Setup as metioned here. Guess I'm having some problems with MySQL there not related to your gem.
EDIT: if this is any relevant for you, please tell me so and i'll post that wherever you want it to have it. If this is irrelevant, feel free to delete it. |
@Gbeschbacher I'm really not very familiar with JSON support by MySQL, but what I found indicates you need to be using at least version 5.7.13 for the
Yes I am actually very interested. I don't think it should be very hard to support MySQL JSON, just a matter of getting the right syntax. So any notes you have, please go ahead and post them here and I will use them in the future (although maybe not for a while...) |
Hmm, reading the MySQL docs now, looks like perhaps the syntax is actually a bit different: |
I'm closing this since before we can support case-insensitive uniqueness validation, we need to support |
This is a first attempt to leverage the new query plugin added in #216. The PG nodes were missing support for
LOWER
so I've added it.Related: #141