Skip to content

Commit ee9505d

Browse files
committed
Gradle plugin bytecode enhancement configuration: updated the documentaiton and migration guide
1 parent 5595894 commit ee9505d

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

documentation/src/main/asciidoc/introduction/Advanced.adoc

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -994,9 +994,17 @@ plugins {
994994
id "org.hibernate.orm" version "{fullVersion}"
995995
}
996996
997-
hibernate { enhancement }
997+
hibernate {
998+
enhancement {}
999+
}
9981000
----
9991001

1002+
[CAUTION]
1003+
====
1004+
Some online documentation (including previous versions of the present one) suggest to use `hibernate { enhancement }`, which will _not_ work as it is interpreted by Gradle as a (pointless) getter call instead of actual configuration.
1005+
Make sure you always pass `{}` to the `enhancement` call.
1006+
====
1007+
10001008
// [discrete]
10011009
// ==== Attribute-level lazy fetching
10021010

migration-guide.adoc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,21 @@ Applications should instead use proper object-oriented encapsulation, exposing m
9292

9393
Additionally, attempting to re-enhance a class with different options is no longer allowed and will result in a `FeatureMismatchException`.
9494

95+
The Gradle plugin configuration has changed slightly. When using the default setup:
96+
97+
```
98+
hibernate { enhancement }
99+
```
100+
101+
it should be updated to:
102+
103+
```
104+
hibernate {
105+
enhancement {}
106+
}
107+
```
108+
109+
in order to properly enable Bytecode Enhancement.
95110

96111
[[session-getLobHelper]]
97112
=== Session#getLobHelper

0 commit comments

Comments
 (0)