Skip to content
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

Unique comparison is case sensitive #8

Closed
ivanvermeyen opened this issue Feb 6, 2020 · 3 comments
Closed

Unique comparison is case sensitive #8

ivanvermeyen opened this issue Feb 6, 2020 · 3 comments

Comments

@ivanvermeyen
Copy link
Contributor

It seems that the where clause in the unique_translation rule is case sensitive.

protected function findTranslation($connection, $table, $column, $locale, $value)
{
return DB::connection($connection)->table($table)->where("{$column}->{$locale}", '=', $value);
}

According to my Google searches, MySQL is supposed to be case insensitive when using a collation that ends in _ci (I'm using utf8mb4_unicode_ci). But that's not what my tests are saying...

Is anyone else having this issue?

@Tahiaji
Copy link
Contributor

Tahiaji commented Nov 30, 2022

yep

@ivanvermeyen
Copy link
Contributor Author

Fixed by #22

@ivanvermeyen
Copy link
Contributor Author

Just for later reference: using a LIKE query seems to be case insensitive too and improves compatibility with other database types than MySQL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants