File tree 3 files changed +33
-0
lines changed
main/antlr4/org/springframework/data/jpa/repository/query
test/java/org/springframework/data/jpa/repository/query
3 files changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -602,6 +602,7 @@ identification_variable
602
602
| INNER
603
603
| KEY
604
604
| LEFT
605
+ | NEW
605
606
| ORDER
606
607
| OUTER
607
608
| FLOOR
Original file line number Diff line number Diff line change @@ -1584,4 +1584,20 @@ and CTM_UTLRAW_NLSSORT_LOWER(b.nome) like lower(:nome)
1584
1584
order by CTM_UTLRAW_NLSSORT_LOWER(b.nome) ASC
1585
1585
""" );
1586
1586
}
1587
+
1588
+ @ Test // GH-3128
1589
+ void newShouldBeLegalAsPartOfAStateFieldPathExpression () {
1590
+
1591
+ assertQuery ("""
1592
+ SELECT j
1593
+ FROM AgentUpdateTask j
1594
+ WHERE j.creationTimestamp < :date
1595
+ AND (j.status = com.ca.apm.acc.configserver.core.domain.jobs.AgentUpdateTaskStatus.NEW
1596
+ OR
1597
+ j.status = com.ca.apm.acc.configserver.core.domain.jobs.AgentUpdateTaskStatus.STARTED
1598
+ OR
1599
+ j.status = com.ca.apm.acc.configserver.core.domain.jobs.AgentUpdateTaskStatus.QUEUED)
1600
+ ORDER BY j.id
1601
+ """ );
1602
+ }
1587
1603
}
Original file line number Diff line number Diff line change @@ -967,4 +967,20 @@ void timeShouldBeAValidParameterName() {
967
967
WHERE L.isLocked = FALSE OR L.forceUnlockTime < :time
968
968
""" );
969
969
}
970
+
971
+ @ Test // GH-3128
972
+ void newShouldBeLegalAsPartOfAStateFieldPathExpression () {
973
+
974
+ assertQuery ("""
975
+ SELECT j
976
+ FROM AgentUpdateTask j
977
+ WHERE j.creationTimestamp < :date
978
+ AND (j.status = com.ca.apm.acc.configserver.core.domain.jobs.AgentUpdateTaskStatus.NEW
979
+ OR
980
+ j.status = com.ca.apm.acc.configserver.core.domain.jobs.AgentUpdateTaskStatus.STARTED
981
+ OR
982
+ j.status = com.ca.apm.acc.configserver.core.domain.jobs.AgentUpdateTaskStatus.QUEUED)
983
+ ORDER BY j.id
984
+ """ );
985
+ }
970
986
}
You can’t perform that action at this time.
0 commit comments