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 @@ -1026,4 +1026,11 @@ void entityNameWithPackageContainingReservedWord(String reservedWord) {
1026
1026
String source = "select new com.company.%s.thing.stuff.ClassName(e.id) from Experience e" .formatted (reservedWord );
1027
1027
assertQuery (source );
1028
1028
}
1029
+
1030
+ @ Test // GH-3496
1031
+ void lateralShouldBeAValidParameter () {
1032
+
1033
+ assertQuery ("select e from Employee e where e.lateral = :_lateral" );
1034
+ assertQuery ("select te from TestEntity te where te.lateral = :lateral" );
1035
+ }
1029
1036
}
Original file line number Diff line number Diff line change @@ -1568,6 +1568,13 @@ void typeShouldBeAValidParameter() {
1568
1568
assertQuery ("select te from TestEntity te where te.type = :type" );
1569
1569
}
1570
1570
1571
+ @ Test // GH-3496
1572
+ void lateralShouldBeAValidParameter () {
1573
+
1574
+ assertQuery ("select e from Employee e where e.lateral = :_lateral" );
1575
+ assertQuery ("select te from TestEntity te where te.lateral = :lateral" );
1576
+ }
1577
+
1571
1578
@ Test // GH-3099
1572
1579
void functionNamesShouldSupportSchemaScoping () {
1573
1580
Original file line number Diff line number Diff line change @@ -965,6 +965,13 @@ void typeShouldBeAValidParameter() {
965
965
assertQuery ("select te from TestEntity te where te.type = :type" );
966
966
}
967
967
968
+ @ Test // GH-3496
969
+ void lateralShouldBeAValidParameter () {
970
+
971
+ assertQuery ("select e from Employee e where e.lateral = :_lateral" );
972
+ assertQuery ("select te from TestEntity te where te.lateral = :lateral" );
973
+ }
974
+
968
975
@ Test // GH-3061
969
976
void alternateNotEqualsOperatorShouldWork () {
970
977
assertQuery ("select e from Employee e where e.firstName != :name" );
You can’t perform that action at this time.
0 commit comments