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

What happened to OrderBy support in simplified JPA queries? #1278

Open
jvosloo opened this issue Nov 6, 2018 · 5 comments
Open

What happened to OrderBy support in simplified JPA queries? #1278

jvosloo opened this issue Nov 6, 2018 · 5 comments
Assignees

Comments

@jvosloo
Copy link

jvosloo commented Nov 6, 2018

In 1.5.1 at least, the support for OrderBy in simplified JPA queries seems to be missing?
I.e. to be able to write simplified queries like this: Person.find("byNameOrderByName");

If I read this right: https://play.lighthouseapp.com/projects/57987/tickets/878-orderby-support-in-simplified-queries it was introduced in 1.3.x already?

Am I missing something?

@jvosloo
Copy link
Author

jvosloo commented Dec 7, 2018

?

@asolntsev
Copy link
Contributor

@jvosloo Wow. You found The Lost Change. :)

Support for OrderBy was added in commit b91659a7 - at that time it was in master branch.

Later, we found that master branch is not up-to-date with some other release branches. Me and @xael-fry decided that master was not in valid state, and renamed it to old_master. So we lost commit b91659a. :)

@xael-fry It seems that we need to merge 3 commits with commit message [#878] ... from master_old to master.

@xael-fry xael-fry self-assigned this Dec 13, 2018
@jvosloo
Copy link
Author

jvosloo commented Dec 14, 2018

Hehe... glad I could be helpful (and sorry for making more work for you!) 😄

xabolcs added a commit to xabolcs/play1 that referenced this issue Jan 4, 2021
…om old_master to master

Commit b91659a
("[playframework#878] Add OrderBy support in simplified queries") was never ported
to master.

The changes from Pull Request playframework#504 touched some parts of it,
therefore half of the OrderBy change sneaked in to the "new" master.

Fixing by removing the irrelevant OrderBy change.

In method findByToJPQL in file framework/src/play/db/jpa/JPQL.java:
- old_master merge commit has only StringBuilder related change
- master "merge" commit has this OrderBy change too

old_master merge commit: b6797a1
ported master commit: 97c54d2

Fix: 97c54d2 ("Merge pull request playframework#504 from marcelmay/lighthouse-1502-patch")
xabolcs added a commit to xabolcs/play1 that referenced this issue Jan 4, 2021
[javac]
/home/travis/build/playframework/play1/framework/test-src/play/db/jpa/JPQLTest.java:20:
error: constructor JPQL in class JPQL cannot be applied to given types;
    [javac] 		jpql = new JPQL(null);
    [javac] 		       ^
    [javac]   required: no arguments
    [javac]   found: <null>
@xabolcs
Copy link
Contributor

xabolcs commented Jan 4, 2021

@xael-fry , @jvosloo

I tried my best in PR #1343 to port those commits to master.

xabolcs added a commit to xabolcs/play1 that referenced this issue Mar 23, 2022
…om old_master to master

Commit b91659a
("[playframework#878] Add OrderBy support in simplified queries") was never ported
to master.

The changes from Pull Request playframework#504 touched some parts of it,
therefore half of the OrderBy change sneaked in to the "new" master.

Fixing by removing the irrelevant OrderBy change.

In method findByToJPQL in file framework/src/play/db/jpa/JPQL.java:
- old_master merge commit has only StringBuilder related change
- master "merge" commit has this OrderBy change too

old_master merge commit: b6797a1
ported master commit: 97c54d2

Fix: 97c54d2 ("Merge pull request playframework#504 from marcelmay/lighthouse-1502-patch")
xabolcs added a commit to xabolcs/play1 that referenced this issue Mar 23, 2022
[javac]
/home/travis/build/playframework/play1/framework/test-src/play/db/jpa/JPQLTest.java:20:
error: constructor JPQL in class JPQL cannot be applied to given types;
    [javac] 		jpql = new JPQL(null);
    [javac] 		       ^
    [javac]   required: no arguments
    [javac]   found: <null>
xael-fry added a commit to xael-fry/play that referenced this issue Apr 2, 2022
xael-fry added a commit to xael-fry/play that referenced this issue Apr 2, 2022
xael-fry added a commit that referenced this issue Apr 2, 2022
[#1278, #1343]  OrderBy support in simplified JPA queries for 1.5.x
@xabolcs
Copy link
Contributor

xabolcs commented Apr 2, 2022

@jvosloo please check recent master!

My PR just landed, thanks to @xael-fry!

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

No branches or pull requests

4 participants