Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 73ce257

Browse files
authored
Merge pull request #961 from grails/hibernate-ehcache-breaking-change
document hibernate-ehcache breaking change in documentation
2 parents 6a4aa88 + 58d464d commit 73ce257

File tree

2 files changed

+29
-3
lines changed

2 files changed

+29
-3
lines changed

docs/src/docs/asciidoc/gettingStarted.adoc

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1-
To use GORM {pluginVersion} for Hibernate in Grails 3 you can specify the following configuration in `build.gradle`:
1+
To use GORM {pluginVersion} for Hibernate in Grails 7 you can specify the following configuration in `build.gradle`:
22

33
[source,groovy,subs="attributes"]
44
----
55
dependencies {
6-
compile "org.grails.plugins:hibernate5:{pluginVersion}"
7-
compile "org.hibernate:hibernate-ehcache"
6+
implementation "org.grails.plugins:hibernate5:{pluginVersion}"
7+
runtimeOnly 'org.hibernate:hibernate-ehcache:5.6.15.Final', {
8+
// exclude javax variant of hibernate-core
9+
exclude group: 'org.hibernate', module: 'hibernate-core'
10+
}
11+
runtimeOnly 'org.jboss.spec.javax.transaction:jboss-transaction-api_1.3_spec:2.0.0.Final', {
12+
// required for hibernate-ehcache to work with javax variant of hibernate-core excluded
13+
}
814
}
915
----
1016

docs/src/docs/asciidoc/gettingStarted/hibernateVersions.adoc

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
There are various changes you have to make to your build depending on the version of Grails when using GORM {version}.
22

3+
==== Grails 7.0.0 and above with Hibernate 5.6.x
4+
5+
Grails 7.0.x is based on Spring Boot 3.4.x which enforces Hibernate 5.6.x as the default version.
6+
7+
[source,groovy]
8+
.build.gradle
9+
----
10+
dependencies {
11+
implementation "org.grails.plugins:hibernate5:{pluginVersion}"
12+
runtimeOnly 'org.hibernate:hibernate-ehcache:5.6.15.Final', {
13+
// exclude javax variant of hibernate-core
14+
exclude group: 'org.hibernate', module: 'hibernate-core'
15+
}
16+
runtimeOnly 'org.jboss.spec.javax.transaction:jboss-transaction-api_1.3_spec:2.0.0.Final', {
17+
// required for hibernate-ehcache to work with javax variant of hibernate-core excluded
18+
}
19+
}
20+
----
21+
22+
323
==== Grails 3.2.x and above with Hibernate 4
424

525
Grails 3.2.x is based on Spring Boot 1.4.x which enforces Hibernate 5.0.x as the default version. If you want to continue to use Hibernate 4 you must explicitly declare the Hibernate 4 dependences in `build.gradle`.

0 commit comments

Comments
 (0)