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

Sort.Order ignoreCase does not work when query uses selectionAlias #2280

Closed
lonely-development opened this issue Aug 19, 2021 · 1 comment
Closed
Assignees
Labels
type: bug A general bug

Comments

@lonely-development
Copy link

When using Pageable containing a Sort with ignore case set to true and using a query with selectionAlias, lower is never added to resulting query.

  1. Pageable with Sort.Order(...,"name", ...).ignoreCase().
  2. Query example with selectionAlias:
    @Query("SELECT customer.id as id, customer.name as name FROM CustomerEntity customer")
    Page<CustomerInfo> findAllActiveTaskInfo(Pageable pageable);
  1. org.springframework.data.jpa.repository.query.QueryUtils.java never reaches lower modifier (line 308) because of selectionAlias check (line 293), getOrderClause() method.
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Aug 19, 2021
@mp911de mp911de added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Aug 23, 2021
@somayaj
Copy link

somayaj commented Nov 21, 2021

hi, can this be worked?

gregturn added a commit that referenced this issue Jan 4, 2022
gregturn added a commit that referenced this issue Jan 4, 2022
When writing a select with a field alias, properly handle Sort.Order's ignoreCase.

Closes #2280.
schauder added a commit that referenced this issue Jan 5, 2022
Minor formatting.

See #2280
Original pull request #2399
schauder pushed a commit that referenced this issue Jan 5, 2022
When writing a select with a field alias, properly handle Sort.Order's ignoreCase.

Closes #2280
Original pull request #2399
schauder added a commit that referenced this issue Jan 5, 2022
Minor formatting.

See #2280
Original pull request #2399
schauder pushed a commit that referenced this issue Jan 5, 2022
When writing a select with a field alias, properly handle Sort.Order's ignoreCase.

Closes #2280
Original pull request #2399
schauder added a commit that referenced this issue Jan 5, 2022
Minor formatting.

See #2280
Original pull request #2399
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

5 participants