Reputation: 201
I keep in my database domains per organisation, and I'm using method existsByMailDomainAndOrganisationId
to check if new domain which I want to add is already exists in this organisation.
What i read in various documentations and pages I saw it should be case sensitive by default but when I have already [email protected] and want add [email protected], existBy...
returns that it already exist (findBy...
for [email protected] and organisationId returns [email protected]).
Upvotes: 1
Views: 214
Reputation: 44970
This is most likely caused by your database and schema setup. For example if you are using MySQL as per 10.1 Character Sets and Collations in General strings are compared using a variety of collations. Some database default to case-insensitivity string comparison collations e.g. SQL Server.
Upvotes: 2