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: orderBy does not work when used on formula property #2188

Merged
merged 1 commit into from
Jul 13, 2021

Conversation

rPraml
Copy link
Contributor

@rPraml rPraml commented Mar 2, 2021

or in conjunction with "exists" query

Hello @rbygrave
We have found a severe bug, when using "orderBy" + "findIds"

  • on a formula property: The property is not part of the select, so the join will not be added
  • using it on an exists query (probably also other distinct queries), the order by will not be added to the select.

Please take a look at my solution. I'm not sure if the change in DefaultOrmQuery::createExtraJoinsToSupportManyWhereClause is really the right place (as method name suggests something different)

Cheers
Roland

@rbygrave
Copy link
Member

rbygrave commented Mar 2, 2021

My first look says it's an ok fix. I should get to have another look tonight.

@rbygrave rbygrave added this to the 12.10.0 milestone Jul 13, 2021
@rbygrave rbygrave merged commit 787c2f9 into ebean-orm:master Jul 13, 2021
@rPraml rPraml deleted the fix-order-by branch February 25, 2022 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants