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

fix: a not caseSensitive bone should lock the lower value #1378

Merged

Conversation

sveneberth
Copy link
Member

The idea of caseINSensitive bones is that the upper/lower case does not matter and "Test", "test", and "TEST" are equivalent.

If you now have a unique contstraint UniqueLockMethod.SameValue, it is still possible to create the three entries.


Alternatively, we could of course also introduce UniqueLockMethod.EqualValue, which controls this even more precisely.

The idea of _caseINSensitive_ bones is that the upper/lower case
does not matter and `"Test"`, `"test"`, and `"TEST"` are equivalent.

If you now have a unique contstraint `UniqueLockMethod.SameValue`,
it is still possible to create the three entries.

---

Alternatively, we could of course also introduce `UniqueLockMethod.EqualValue`,
which controls this even more precisely.
@sveneberth sveneberth added bug(fix) Something isn't working or address a specific issue or vulnerability invalid This doesn't seem right Priority: High After critical issues are fixed, these should be dealt with before any further issues. labels Jan 22, 2025
phorward
phorward previously approved these changes Jan 22, 2025
Copy link
Member

@phorward phorward left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok for me

@phorward phorward self-requested a review January 23, 2025 00:05
@sveneberth
Copy link
Member Author

Sorry, forgot the multiple case first. This makes the changes more complex due to the poor _hashValueForUniquePropertyIndex implementation.

@phorward phorward merged commit a40c6d3 into viur-framework:3.6 Jan 23, 2025
4 checks passed
@sveneberth sveneberth deleted the fix/caseInsensitive_and_unique branch January 24, 2025 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug(fix) Something isn't working or address a specific issue or vulnerability invalid This doesn't seem right Priority: High After critical issues are fixed, these should be dealt with before any further issues.
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

2 participants