From 5477f7060dbb5e8a59bdd052b7a7e70257443018 Mon Sep 17 00:00:00 2001 From: marko-bekhta Date: Wed, 3 Apr 2024 08:10:01 +0200 Subject: [PATCH] HSEARCH-5082 WIP-clarify: Upgrade to Hibernate ORM 7.0 --- .../outboxpolling/mapping/impl/AdditionalMappingBuilder.java | 2 +- .../orm/search/query/impl/HibernateOrmSearchQueryAdapter.java | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/mapper/orm-outbox-polling/src/main/java/org/hibernate/search/mapper/orm/outboxpolling/mapping/impl/AdditionalMappingBuilder.java b/mapper/orm-outbox-polling/src/main/java/org/hibernate/search/mapper/orm/outboxpolling/mapping/impl/AdditionalMappingBuilder.java index f906bbc8174..2c6ae05470e 100644 --- a/mapper/orm-outbox-polling/src/main/java/org/hibernate/search/mapper/orm/outboxpolling/mapping/impl/AdditionalMappingBuilder.java +++ b/mapper/orm-outbox-polling/src/main/java/org/hibernate/search/mapper/orm/outboxpolling/mapping/impl/AdditionalMappingBuilder.java @@ -56,7 +56,7 @@ public AdditionalMappingBuilder index(String name, String columns) { index.setColumnList( columns ); entity.getTable() - .getIndex() + .getIndexes() .add( index ); return this; } diff --git a/mapper/orm/src/main/java/org/hibernate/search/mapper/orm/search/query/impl/HibernateOrmSearchQueryAdapter.java b/mapper/orm/src/main/java/org/hibernate/search/mapper/orm/search/query/impl/HibernateOrmSearchQueryAdapter.java index 637751b82bf..3f80ad1b0bb 100644 --- a/mapper/orm/src/main/java/org/hibernate/search/mapper/orm/search/query/impl/HibernateOrmSearchQueryAdapter.java +++ b/mapper/orm/src/main/java/org/hibernate/search/mapper/orm/search/query/impl/HibernateOrmSearchQueryAdapter.java @@ -140,6 +140,9 @@ public HibernateOrmSearchQueryAdapter setTimeout(int timeout) { @Override public HibernateOrmSearchQueryAdapter setTimeout(Integer timeout) { + // TODO: this method comes from JPA and there timeout is in ms ? + // https://jakarta.ee/specifications/persistence/3.2/jakarta-persistence-spec-3.2-m2 ctrl+f "Set the query timeout, in milliseconds" + // but the one above is in sec from ORM itself (CommonQueryContract) delegate.failAfter( timeout == null ? null : timeout.longValue(), TimeUnit.SECONDS ); return this; }