spring-data-mongodb icon indicating copy to clipboard operation
spring-data-mongodb copied to clipboard

Add collation for an index via @CompoundIndex and @Index annotations.

Open StefanTirea opened this issue 3 years ago • 2 comments

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 avatar Jul 29 '22 00:07 StefanTirea

@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.

pivotal-cla avatar Jul 29 '22 00:07 pivotal-cla

@StefanTirea Thank you for signing the Contributor License Agreement!

pivotal-cla avatar Jul 29 '22 00:07 pivotal-cla

Thank you @StefanTirea! Merged to main.

christophstrobl avatar Aug 25 '22 07:08 christophstrobl