File tree 4 files changed +22
-0
lines changed
main/antlr4/org/springframework/data/jpa/repository/query
test/java/org/springframework/data/jpa/repository/query
4 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -768,6 +768,7 @@ reservedWord
768
768
| JOIN
769
769
| KEY
770
770
| LAST
771
+ | LATERAL
771
772
| LEADING
772
773
| LEFT
773
774
| LIKE
Original file line number Diff line number Diff line change @@ -1024,4 +1024,11 @@ void entityNameWithPackageContainingReservedWord(String reservedWord) {
1024
1024
String source = "select new com.company.%s.thing.stuff.ClassName(e.id) from Experience e" .formatted (reservedWord );
1025
1025
assertQuery (source );
1026
1026
}
1027
+
1028
+ @ Test // GH-3496
1029
+ void lateralShouldBeAValidParameter () {
1030
+
1031
+ assertQuery ("select e from Employee e where e.lateral = :_lateral" );
1032
+ assertQuery ("select te from TestEntity te where te.lateral = :lateral" );
1033
+ }
1027
1034
}
Original file line number Diff line number Diff line change @@ -1566,6 +1566,13 @@ void typeShouldBeAValidParameter() {
1566
1566
assertQuery ("select te from TestEntity te where te.type = :type" );
1567
1567
}
1568
1568
1569
+ @ Test // GH-3496
1570
+ void lateralShouldBeAValidParameter () {
1571
+
1572
+ assertQuery ("select e from Employee e where e.lateral = :_lateral" );
1573
+ assertQuery ("select te from TestEntity te where te.lateral = :lateral" );
1574
+ }
1575
+
1569
1576
@ Test // GH-3099
1570
1577
void functionNamesShouldSupportSchemaScoping () {
1571
1578
Original file line number Diff line number Diff line change @@ -963,6 +963,13 @@ void typeShouldBeAValidParameter() {
963
963
assertQuery ("select te from TestEntity te where te.type = :type" );
964
964
}
965
965
966
+ @ Test // GH-3496
967
+ void lateralShouldBeAValidParameter () {
968
+
969
+ assertQuery ("select e from Employee e where e.lateral = :_lateral" );
970
+ assertQuery ("select te from TestEntity te where te.lateral = :lateral" );
971
+ }
972
+
966
973
@ Test // GH-3061
967
974
void alternateNotEqualsOperatorShouldWork () {
968
975
assertQuery ("select e from Employee e where e.firstName != :name" );
You can’t perform that action at this time.
0 commit comments