From 7b176df6b7ea316184390b82b84bec378d87cd27 Mon Sep 17 00:00:00 2001 From: Christian Beikov Date: Fri, 4 Oct 2024 10:46:52 +0200 Subject: [PATCH] HHH-18604 Fix some issues with older database versions --- .../function/json/PostgreSQLJsonArrayAppendFunction.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/function/json/PostgreSQLJsonArrayAppendFunction.java b/hibernate-core/src/main/java/org/hibernate/dialect/function/json/PostgreSQLJsonArrayAppendFunction.java index a37038fe69..7448e42ec4 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/function/json/PostgreSQLJsonArrayAppendFunction.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/function/json/PostgreSQLJsonArrayAppendFunction.java @@ -42,7 +42,7 @@ public class PostgreSQLJsonArrayAppendFunction extends AbstractJsonArrayAppendFu sqlAppender.appendSql( "jsonb_set_lax" ); } else { - sqlAppender.appendSql( "case when t.d#>t.p is not null then jsonb_set" ); + sqlAppender.appendSql( "case when (t.d)#>t.p is not null then jsonb_set" ); } sqlAppender.appendSql( "(t.d,t.p,(t.d)#>t.p||" ); if ( value instanceof Literal && ( (Literal) value ).getLiteralValue() == null ) {