You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: migration-guide.adoc
+65-1Lines changed: 65 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ This section describes changes to contracts (classes, interfaces, methods, etc.)
45
45
46
46
7.0 begins the process of reducing the visibility of `org.hibernate.LockOptions`.
47
47
This class was originally exposed as an API, even though it is more properly an SPI.
48
-
From an API perspective, `FindOption`, `LockOption` and `RefreshOption` are much better ways to specify that information.
48
+
From an API perspective, `FindOption`, `LockOption` and `RefreshOption` are much better ways to specify this information.
49
49
The class itself, as well as API methods which expose it, have been deprecated.
50
50
51
51
However, 2 aspects of `LockOptions` have been completely removed.
@@ -90,12 +90,76 @@ Applications should instead manage both sides of such associations directly as w
90
90
Second is a little-known feature called "extended" enhancement.
91
91
Applications should instead use proper object-oriented encapsulation, exposing managed state via getters and setters.
92
92
93
+
Additionally, attempting to re-enhance a class with different options is no longer allowed and will result in a `FeatureMismatchException`.
94
+
93
95
94
96
[[session-getLobHelper]]
95
97
=== Session#getLobHelper
96
98
97
99
The `Session#getLobHelper` method has been marked as deprecated in favor of the static `Hibernate#getLobHelper` and will be removed in a future *major* version.
98
100
101
+
[[H2-lock-timeout]]
102
+
=== WAIT, NO WAIT and SKIP LOCKED for H2
103
+
104
+
The for-update clause enhancements of H2 2.2.220 are now reflected in the Hibernate ORM dialect, allowing applications to use `wait`, `no wait` and `skip locked` options.
105
+
106
+
107
+
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
108
+
// SPI changes
109
+
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
110
+
111
+
[[spi-changes]]
112
+
== Changes to SPI
113
+
114
+
[[force-increment]]
115
+
=== Force-increment Locking for Version with Custom Generator
116
+
117
+
A new event type (`FORCE_INCREMENT`) has been added to
118
+
`org.hibernate.generator.EventType` to support
119
+
`OPTIMISTIC_FORCE_INCREMENT` and `PESSIMISTIC_FORCE_INCREMENT`
120
+
when used with `@Version` mappings with custom generators.
121
+
122
+
123
+
[[pessimistic-locking]]
124
+
=== Pessimistic Locking
125
+
126
+
A number of changes have been made to pessimistic locking support.
127
+
128
+
* Introduction of `org.hibernate.dialect.lock.spi.LockingSupport` which represents a Dialect's support for pessimistic locking.
129
+
* Introduction of `org.hibernate.sql.ast.spi.LockingClauseStrategy` to integrate into SQL AST translation.
130
+
* Changed standard implementation of `org.hibernate.dialect.lock.LockingStrategy` for pessimistic locking to one using SQL AST.
131
+
* Changes to `LockOptions` as <<lock-options,already discussed>>.
132
+
133
+
[NOTE]
134
+
More changes related to pessimistic locking are coming in later 7.x releases.
135
+
We've opted to tackle these in stages since they all relate and build on top of each other.
136
+
See https://hibernate.atlassian.net/browse/HHH-19551 for details.
137
+
138
+
[[format-mapper]]
139
+
=== JSON FormatMapper Enhancements
140
+
141
+
JSON mappings on Oracle 21+ will now try to leverage driver built-in OSON decoding to improve JSON parsing performance. In case of trouble, this can be disabled with the `hibernate.dialect.oracle.oson_format_disabled` configuration option.
142
+
143
+
144
+
[[enhancement-option-granularity]]
145
+
=== Enhancement Option Granularity
146
+
147
+
The actual enhancements written into bytecode were previously allowed to vary by class and sometimes even by attribute.
148
+
However, all Hibernate tooling only supported setting those "globally" per enhancement.
149
+
To this end, all `org.hibernate.bytecode.enhance.spi.EnhancementContext` methods which determine whether certain aspects of enhancement are applied have changed to no longer accept class/attribute.
Copy file name to clipboardExpand all lines: whats-new.adoc
+29-3Lines changed: 29 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,33 @@ Describes the new features and capabilities added to Hibernate ORM in 7.1.
10
10
11
11
If migrating from earlier versions, be sure to also check out the link:{migrationGuide}[Migration Guide] for discussion of impactful changes.
12
12
13
-
[[Teradata]]
14
-
== TeradataDialect
15
13
16
-
7.1 adds a Dialect for the Teradata database, supporting version 12 and higher.
14
+
[[resource-discovery]]
15
+
== Resource Discovery in SE Environments
16
+
17
+
The Jakarta Persistence specification defines the ability for a provider to discover "managed resources" in EE environments, alleviating the application from manually listing all classes and XML files.
18
+
However, it defines no such support in SE environments.
19
+
20
+
Starting with 7.1, Hibernate now supports this discovery in SE environments, by allowing applications to specify the root URL and zero-or-more "jar" URLs to search.
These URLs are searched for managed resources according to the process defined in https://jakarta.ee/specifications/persistence/3.2/jakarta-persistence-spec-3.2#a12305[the specification].
27
+
28
+
[[locking]]
29
+
== Locking
30
+
31
+
`org.hibernate.Locking` has been introduced to support various aspects of pessimistic locking:
32
+
33
+
* `Locking.Scope` is an extension of `jakarta.persistence.PessimisticLockScope` including some Hibernate-specific options.
0 commit comments