@@ -606,6 +606,7 @@ identification_variable
|
||||
| OUTER
|
||||
| FLOOR
|
||||
| SIGN
|
||||
| TIME
|
||||
| TYPE
|
||||
| VALUE)
|
||||
;
|
||||
|
||||
@@ -544,9 +544,11 @@ class JpqlQueryRenderer extends JpqlBaseVisitor<List<JpaQueryParsingToken>> {
|
||||
|
||||
ctx.update_item().forEach(updateItemContext -> {
|
||||
tokens.addAll(visit(updateItemContext));
|
||||
NOSPACE(tokens);
|
||||
tokens.add(TOKEN_COMMA);
|
||||
});
|
||||
CLIP(tokens);
|
||||
SPACE(tokens);
|
||||
|
||||
return tokens;
|
||||
}
|
||||
|
||||
@@ -958,4 +958,13 @@ class JpqlQueryRendererTests {
|
||||
void dateAndFromShouldBeValidNames() {
|
||||
assertQuery("SELECT e FROM Entity e WHERE e.embeddedId.date BETWEEN :from AND :to");
|
||||
}
|
||||
|
||||
@Test // GH-3092
|
||||
void timeShouldBeAValidParameterName() {
|
||||
assertQuery("""
|
||||
UPDATE Lock L
|
||||
SET L.isLocked = TRUE, L.forceUnlockTime = :forceUnlockTime
|
||||
WHERE L.isLocked = FALSE OR L.forceUnlockTime < :time
|
||||
""");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user