File tree Expand file tree Collapse 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 Expand file tree Collapse file tree 4 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -768,6 +768,7 @@ reservedWord
768768 | JOIN
769769 | KEY
770770 | LAST
771+ | LATERAL
771772 | LEADING
772773 | LEFT
773774 | LIKE
Original file line number Diff line number Diff line change @@ -1024,4 +1024,11 @@ void entityNameWithPackageContainingReservedWord(String reservedWord) {
10241024 String source = "select new com.company.%s.thing.stuff.ClassName(e.id) from Experience e" .formatted (reservedWord );
10251025 assertQuery (source );
10261026 }
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+ }
10271034}
Original file line number Diff line number Diff line change @@ -1566,6 +1566,13 @@ void typeShouldBeAValidParameter() {
15661566 assertQuery ("select te from TestEntity te where te.type = :type" );
15671567 }
15681568
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+
15691576 @ Test // GH-3099
15701577 void functionNamesShouldSupportSchemaScoping () {
15711578
Original file line number Diff line number Diff line change @@ -963,6 +963,13 @@ void typeShouldBeAValidParameter() {
963963 assertQuery ("select te from TestEntity te where te.type = :type" );
964964 }
965965
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+
966973 @ Test // GH-3061
967974 void alternateNotEqualsOperatorShouldWork () {
968975 assertQuery ("select e from Employee e where e.firstName != :name" );
You can’t perform that action at this time.
0 commit comments