Skip to content

Commit

Permalink
[playframework#1281] Fix porting of pull request playframework#504 fr…
Browse files Browse the repository at this point in the history
…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")
  • Loading branch information
xabolcs committed Jan 4, 2021
1 parent f818294 commit 3597eeb
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions framework/src/play/db/jpa/JPQL.java
Original file line number Diff line number Diff line change
Expand Up @@ -248,11 +248,7 @@ public String findByToJPQL(String findBy) {
public String findByToJPQL(String dbName, String findBy) {
findBy = findBy.substring(2);
StringBuilder jpql = new StringBuilder();
String subRequest;
if (findBy.contains("OrderBy"))
subRequest = findBy.split("OrderBy")[0];
else subRequest = findBy;
String[] parts = subRequest.split("And");
String[] parts = findBy.split("And");
int index = 1;
for (int i = 0; i < parts.length; i++) {
String part = parts[i];
Expand Down

0 comments on commit 3597eeb

Please sign in to comment.