Skip to content

[Use Case]: Sort collation #1445

@FroMage

Description

@FroMage

As a ...

  • Application user/user of the configuration itself
  • API user (application developer)
  • SPI user (container or runtime developer)
  • Specification implementer

I need to be able to ...

Specify how comparisons and ordering are collated, such as by specifying a locale

Which enables me to ...

Handle more fine-grained ordering of strings.

Additional information

Using the Sort API, I can specify case insensitivity: https://jakarta.ee/specifications/data/1.1/apidocs/jakarta.data/jakarta/data/sort

But we've had users who expect to be able ot specify how the case sensitivity is collated, such as specifying the locale to use for ordering.

See quarkusio/quarkus#31254

This is coming from an original Mongo/Panache implementation which supports this, but we know Hibernate ORM also supports collation.

@yrodiere suggested that besides ordering, this might be useful as a query parameter too:

@Find
List<Book> books(@Collate("ucs_basic") String title);

Perhaps we should handle this use-case as well?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions