Skip to content

Commit da2cf17

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

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -994,9 +994,18 @@ 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+
That form will result in bytecode enhancement NOT happening (unfortunately silently).
1006+
To enable bytecode enhancement, make sure to always use the block form (with `{}`).
1007+
====
1008+
10001009
// [discrete]
10011010
// ==== Attribute-level lazy fetching
10021011

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)