spring-data-mongodb
spring-data-mongodb copied to clipboard
Add collation for an index via @CompoundIndex and @Index annotations.
Closes #3002, closes #4130
- [x] You have read the Spring Data contribution guidelines.
- [x] You use the code formatters provided here and have them applied to your changes. Don’t submit any formatting related changes.
- [x] You submit test cases (unit or integration tests) that back your changes.
- [x] You added yourself as author in the headers of the classes you touched. Amend the date range in the Apache license header if needed. For new types, add the license header (copy from another file and set the current year only).
Hi, I recently wanted to use Collation with Spring Data and saw there is no support to implement it only with annotations for a specific field. A use case would be to have an unique index which is case insensitive. My PR adds support to use it with annotations (currently it is only possible programmatically). I hope the implementation did not miss an obvious hurdle for this feature.
Still missing in this PR:
- Proper documentation in
@Index&@CompoundIndex(see TODO)
@StefanTirea Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.
@StefanTirea Thank you for signing the Contributor License Agreement!
Thank you @StefanTirea! Merged to main.