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
+52-8Lines changed: 52 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,13 +40,6 @@ See the link:{releaseSeriesBase}#whats-new[website] for the list of new features
40
40
41
41
This section describes changes to contracts (classes, interfaces, methods, etc.) which are considered https://hibernate.org/community/compatibility-policy/#api[API].
42
42
43
-
* Code underlying the session builder APIs was reengineered, and the behavior of `noInterceptor()` for `SharedSessionBuilder` and `SharedStatelessSessionBuilder` was aligned with the preexisting semantics of this method on `SessionBuilder` and `StatelessSessionBuilder`.
44
-
The previous behavior may be recovered by calling `noSessionInterceptorCreation()`.
45
-
46
-
* `org.hibernate.dialect.AzureSQLServerDialect` was deprecated. Use `org.hibernate.dialect.SQLServerDialect` instead.
47
-
If you set `hibernate.boot.allow_jdbc_metadata_access=false` for offline startup,
48
-
remember to also set the targeted database version through `jakarta.persistence.database-product-version`;
49
-
this would be 16.0 for SQL Server 2022 or 17.0 for SQL Server 2025.
50
43
51
44
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
52
45
// SPI changes
@@ -57,7 +50,58 @@ This section describes changes to contracts (classes, interfaces, methods, etc.)
57
50
58
51
This section describes changes to contracts (classes, interfaces, methods, etc.) which are considered https://hibernate.org/community/compatibility-policy/#spi[SPI].
59
52
60
-
* Some operations of `TypeConfiguration`, `JavaTypeRegistry`, and `BasicTypeRegistry` used unbound type parameters in the return type. The generic signatures of these methods have been changed for improved type safety.
53
+
[[registry-generic-signatures]]
54
+
=== Registry Generic Signatures
55
+
56
+
Some operations of `TypeConfiguration`, `JavaTypeRegistry`, and `BasicTypeRegistry` had previously used unbound type parameters in the return type. The generic signatures of these methods have been changed for improved type safety.
57
+
58
+
59
+
[[AzureSQLServerDialect]]
60
+
=== AzureSQLServerDialect Deprecation
61
+
62
+
`org.hibernate.dialect.AzureSQLServerDialect` was deprecated; use `org.hibernate.dialect.SQLServerDialect` instead.
63
+
64
+
[IMPORTANT]
65
+
====
66
+
If you set `hibernate.boot.allow_jdbc_metadata_access=false` for offline startup,
67
+
remember to also set the targeted database version through `jakarta.persistence.database-product-version` - this would be 16.0 for SQL Server 2022 or 17.0 for SQL Server 2025.
68
+
====
69
+
70
+
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71
+
// Changes in Behavior
72
+
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
73
+
74
+
[[behavior-changes]]
75
+
== Changes in Behavior
76
+
77
+
[[child-session-flush-close]]
78
+
=== Child Session Flush/Close Behavior
79
+
80
+
`Session` and `StatelessSession` which share transactional context with a parent now have slightly different semantics in regard to flushing and closing -
81
+
82
+
* when the parent is flushed, the child is flushed
83
+
* when the parent is closed, the child is closed
84
+
85
+
[NOTE]
86
+
====
87
+
This led to a change in triggering of flush events for both -
88
+
89
+
* `SessionEventListener` registrations
90
+
* JFR events
91
+
92
+
In both cases, the events are now triggered regardless of whether any entities or collections were actually flushed.
93
+
Each already carried the number of entities and the number of collections which were actually flushed.
94
+
Previously, when no entities and no collections were flushed to the database no event was generated; the event is now generated and both values will be zero.
95
+
96
+
Interestingly, this now also aligns with handling for auto-flush events which already always triggered these events.
97
+
====
98
+
99
+
100
+
[[child-session-no-interceptor]]
101
+
=== Child Session No-Interceptor Behavior
102
+
103
+
The behavior of `noInterceptor()` for `SharedSessionBuilder` and (the new) `SharedStatelessSessionBuilder` was aligned with the preexisting semantics of this method on `SessionBuilder` and `StatelessSessionBuilder`.
104
+
The previous behavior may be recovered by calling `noSessionInterceptorCreation()`.
Copy file name to clipboardExpand all lines: whats-new.adoc
+19Lines changed: 19 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,25 @@ Describes the new features and capabilities added to Hibernate ORM in {version}.
11
11
12
12
IMPORTANT: If migrating from earlier versions, be sure to also check out the link:{migrationGuide}[Migration Guide] for discussion of impactful changes.
13
13
14
+
[[child-stateless-sessions]]
15
+
== Child StatelessSession
16
+
17
+
Creation of child `StatelessSession` is now supported, just as with child `Session`.
18
+
This is a `StatelessSession` which shares "transactional context" with a parent `Session` or `StatelessSession`.
19
+
Use `Session#statelessWithOptions` or `StatelessSession#statelessWithOptions` instead of `#sessionWithOptions`.
0 commit comments