File tree 3 files changed +12
-0
lines changed
antlr4/org/springframework/data/jpa/repository/query
java/org/springframework/data/jpa/repository/query
test/java/org/springframework/data/jpa/repository/query
3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -606,6 +606,7 @@ identification_variable
606
606
| OUTER
607
607
| FLOOR
608
608
| SIGN
609
+ | TIME
609
610
| TYPE
610
611
| VALUE )
611
612
;
Original file line number Diff line number Diff line change @@ -544,9 +544,11 @@ public List<JpaQueryParsingToken> visitUpdate_clause(JpqlParser.Update_clauseCon
544
544
545
545
ctx .update_item ().forEach (updateItemContext -> {
546
546
tokens .addAll (visit (updateItemContext ));
547
+ NOSPACE (tokens );
547
548
tokens .add (TOKEN_COMMA );
548
549
});
549
550
CLIP (tokens );
551
+ SPACE (tokens );
550
552
551
553
return tokens ;
552
554
}
Original file line number Diff line number Diff line change @@ -958,4 +958,13 @@ void alternateNotEqualsOperatorShouldWork() {
958
958
void dateAndFromShouldBeValidNames () {
959
959
assertQuery ("SELECT e FROM Entity e WHERE e.embeddedId.date BETWEEN :from AND :to" );
960
960
}
961
+
962
+ @ Test // GH-3092
963
+ void timeShouldBeAValidParameterName () {
964
+ assertQuery ("""
965
+ UPDATE Lock L
966
+ SET L.isLocked = TRUE, L.forceUnlockTime = :forceUnlockTime
967
+ WHERE L.isLocked = FALSE OR L.forceUnlockTime < :time
968
+ """ );
969
+ }
961
970
}
You can’t perform that action at this time.
0 commit comments