Skip to content

Commit fa9c61f

Browse files
yrodieremarko-bekhta
authored andcommitted
HSEARCH-3277 Upgrade to Hibernate ORM 6.0.0.Beta3
1 parent 7d014a0 commit fa9c61f

File tree

38 files changed

+559
-891
lines changed

38 files changed

+559
-891
lines changed

build/config/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@
6868
<skip>${maven.javadoc.skip}</skip>
6969
<artifactItems>
7070
<artifactItem>
71-
<groupId>org.hibernate</groupId>
72-
<artifactId>hibernate-core-jakarta</artifactId>
71+
<groupId>org.hibernate.orm</groupId>
72+
<artifactId>hibernate-core</artifactId>
7373
<classifier>javadoc</classifier>
7474
<type>jar</type>
75-
<version>${version.org.hibernate}</version>
75+
<version>${version.org.hibernate.orm}</version>
7676
<outputDirectory>${tmpdir.dependencies-javadoc-packagelists}/hibernate-core</outputDirectory>
7777
</artifactItem>
7878
<artifactItem>

build/parents/public/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
-->
7373
<offlineLinks>
7474
<offlineLink>
75-
<url>${javadoc.org.hibernate.url}</url>
75+
<url>${javadoc.org.hibernate.orm.url}</url>
7676
<location>${javadoc.packagelists.directory}/hibernate-core</location>
7777
</offlineLink>
7878
<offlineLink>

documentation/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,8 +323,8 @@
323323
<hibernateSearchMigrationGuidesIndexUrl>https://hibernate.org/search/documentation/migrate/</hibernateSearchMigrationGuidesIndexUrl>
324324
<hibernateCommunityUrl>https://hibernate.org/community</hibernateCommunityUrl>
325325
<hibernateBlogUrl>https://in.relation.to/</hibernateBlogUrl>
326-
<hibernateVersion>${version.org.hibernate}</hibernateVersion>
327-
<hibernateDocUrl>${documentation.org.hibernate.url}</hibernateDocUrl>
326+
<hibernateVersion>${version.org.hibernate.orm}</hibernateVersion>
327+
<hibernateDocUrl>${documentation.org.hibernate.orm.url}</hibernateDocUrl>
328328
<javaeeUrl>https://www.oracle.com/java/technologies/java-ee-glance.html</javaeeUrl>
329329
<hibernateOrm6DocUrl>${documentation.org.hibernate.orm.url}</hibernateOrm6DocUrl>
330330
<hibernateOrm6Version>${version.org.hibernate.orm}</hibernateOrm6Version>

documentation/src/main/asciidoc/reference/compatibility.asciidoc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
|
1414
|Hibernate ORM (for the <<mapper-orm,Hibernate ORM mapper>>
1515
|{hibernateVersion}
16-
|Also compatible with version {hibernateOrm6Version}
17-
but requires <<other-integrations-orm6,different Maven artifacts>>.
16+
|
1817
|Jakarta Persistence (for the <<mapper-orm,Hibernate ORM mapper>>
1918
|{jakartaPersistenceVersion}
2019
|

documentation/src/main/asciidoc/reference/integrations.asciidoc

Lines changed: 8 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -17,64 +17,13 @@ Use <<other-integrations-jakarta,Jakarta EE>> instead.
1717
[[other-integrations-orm6]]
1818
== Hibernate ORM 6
1919

20-
include::components/incubating-warning.asciidoc[]
20+
In previous versions, Hibernate Search's main Maven artifacts used to target Hibernate ORM 5,
21+
while separate, dedicated Maven artifacts targeted Hibernate ORM 6.
2122

22-
Hibernate Search includes experimental support for link:{hibernateOrm6DocUrl}[Hibernate ORM 6],
23-
and it requires only one small change:
24-
when declaring the dependencies of your project,
25-
you must add `-orm6` to some artifact identifiers.
23+
This is no longer the case: the main Maven artifacts now target Hibernate ORM 6,
24+
and Hibernate ORM 5 is no longer compatible.
2625

27-
[WARNING]
28-
====
29-
The experimental support for Hibernate ORM 6 in Hibernate Search {hibernateSearchVersion}
30-
targets Hibernate ORM version {hibernateOrm6Version}.
31-
32-
Newer versions of Hibernate ORM 6 may introduce breaking changes,
33-
in which case they will no longer be compatible with
34-
the experimental support for Hibernate ORM 6 in Hibernate Search {hibernateSearchVersion},
35-
until Hibernate Search catches up in its next release.
36-
====
37-
38-
39-
For example, an application using Hibernate ORM 6 and the Elasticsearch backend
40-
will need to update its dependencies as follows:
41-
42-
[source, XML, subs="+attributes"]
43-
----
44-
<dependency>
45-
<groupId>org.hibernate.orm</groupId> <!--1-->
46-
<artifactId>hibernate-core</artifactId>
47-
<version>{hibernateOrm6Version}</version>
48-
</dependency>
49-
<dependency>
50-
<groupId>org.hibernate.search</groupId>
51-
<artifactId>hibernate-search-mapper-orm-orm6</artifactId> <!--2-->
52-
<version>{hibernateSearchVersion}</version>
53-
</dependency>
54-
<dependency>
55-
<groupId>org.hibernate.search</groupId>
56-
<artifactId>hibernate-search-backend-elasticsearch</artifactId> <!--3-->
57-
<version>{hibernateSearchVersion}</version>
58-
</dependency>
59-
----
60-
<1> Replaces `org.hibernate:hibernate-core`; notice how the groupId changed in Hibernate ORM 6.
61-
<2> Replaces `hibernate-search-mapper-orm`.
62-
<3> No replacement necessary: this artifact does not rely on Java EE or Hibernate ORM.
63-
64-
All artifacts relying directly or indirectly on Java EE or Hibernate ORM must be replaced with their ORM 6 counterpart.
65-
This includes in particular:
66-
67-
* https://in.relation.to/2018/12/06/hibernate-orm-600-alpha1-out/#artifacts[Hibernate ORM artifacts]
68-
* `hibernate-search-mapper-orm` => `hibernate-search-mapper-orm-orm6`
69-
* `hibernate-search-mapper-orm-batch-jsr352-core` => `hibernate-search-mapper-orm-batch-jsr352-core-orm6`
70-
* ...
71-
72-
Artifacts that do not rely on Java EE or Hibernate ORM at all, on the other hand,
73-
do not have an ORM 6 counterpart and must not be replaced.
74-
These artifacts should be excluded from your replacements in particular:
75-
76-
* `hibernate-search-engine`
77-
* `hibernate-search-backend-lucene`
78-
* `hibernate-search-backend-elasticsearch`
79-
* `hibernate-search-backend-elasticsearch-aws`
80-
* ...
26+
If your dependencies include references to artifacts ending with `-orm6`
27+
(e.g. `hibernate-search-mapper-orm-orm6`)
28+
just remove the `-orm6` (e.g. use `hibernate-search-mapper-orm` instead)
29+
when you upgrade to this version of Hibernate Search.

integrationtest/mapper/orm-envers/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
<scope>test</scope>
2424
</dependency>
2525
<dependency>
26-
<groupId>org.hibernate</groupId>
27-
<artifactId>hibernate-envers-jakarta</artifactId>
26+
<groupId>org.hibernate.orm</groupId>
27+
<artifactId>hibernate-envers</artifactId>
2828
<scope>test</scope>
2929
</dependency>
3030
<dependency>

integrationtest/mapper/orm-realbackend/src/test/java/org/hibernate/search/integrationtest/mapper/orm/realbackend/limitations/ConcurrentEmbeddedUpdateLimitationIT.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import org.hibernate.Session;
2727
import org.hibernate.SessionFactory;
2828
import org.hibernate.Transaction;
29-
import org.hibernate.dialect.CockroachDB192Dialect;
29+
import org.hibernate.dialect.CockroachDialect;
3030
import org.hibernate.dialect.SQLServerDialect;
3131
import org.hibernate.search.integrationtest.mapper.orm.realbackend.testsupport.BackendConfigurations;
3232
import org.hibernate.search.mapper.orm.Search;
@@ -67,7 +67,7 @@ public void indexingStrategySession() throws Throwable {
6767
.skipTestForDialect( SQLServerDialect.class,
6868
"The execution could provoke a failure caused by a deadlock on SQLServer, "
6969
+ "which will abort our requests and will make the tests fail." )
70-
.skipTestForDialect( CockroachDB192Dialect.class,
70+
.skipTestForDialect( CockroachDialect.class,
7171
"The execution could provoke a 'failed preemptive refresh due to a conflict' on CockroachDB,"
7272
+ " which will abort our requests and will make the tests fail." )
7373
.setup( Book.class, Author.class, BookEdition.class );

integrationtest/mapper/orm-spring/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@
6060
<groupId>org.springframework.boot</groupId>
6161
<artifactId>spring-boot-starter-data-jpa</artifactId>
6262
<exclusions>
63+
<!-- Using a newer version of Hibernate ORM, with a different groupID -->
64+
<exclusion>
65+
<groupId>org.hibernate</groupId>
66+
<artifactId>hibernate-core</artifactId>
67+
</exclusion>
6368
<!-- Using JBoss Logging -->
6469
<exclusion>
6570
<groupId>org.springframework.boot</groupId>

0 commit comments

Comments
 (0)