Skip to content

Commit e91b76a

Browse files
committed
7.0 Beta1
1 parent 5f5551c commit e91b76a

File tree

2 files changed

+81
-43
lines changed

2 files changed

+81
-43
lines changed

migration-guide.adoc

Lines changed: 61 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -244,40 +244,72 @@ must be explicitly set to true.
244244
[[hbm-transform]]
245245
== hbm.xml Transformation
246246

247-
Previous versions of Hibernate performed transformations of `hbm.xml` files (with `hibernate.transform_hbm_xml.enabled=true`)
248-
one file at a time. This is now done across the entire set of `hbm.xml` files at once.
249-
While most users will never see this change, it might impact integrations which tie-in to
250-
XML processing.
247+
Hibernate's legacy `hbm.xml` mapping schema has been deprecated for quite some time, replaced by a new `mapping.xml`
248+
schema. In 7.0, this `mapping.xml` is stabilized and we now offer a transformation of `hbm.xml` files into `mapping.xml` files.
251249

250+
This tool is available as both -
251+
252+
* build-time transformation (currently only offered as a Gradle plugin)
253+
* run-time transformation, using `hibernate.transform_hbm_xml.enabled=true`
254+
255+
Build-time transformation is preferred.
256+
257+
[NOTE]
258+
====
259+
Initial versions of the transformation processed one file at a time.
260+
This is now done across the entire set of `hbm.xml` files at once.
261+
While most users will never see this change, it might impact integrations which tie-in to XML processing.
262+
====
252263

253264
[[cleanup]]
254265
== Cleanup
255266

256-
* Removed `SqmQualifiedJoin`. All joins are qualified.
257-
* Removed `AdditionalJaxbMappingProducer`, deprecated in favor of `AdditionalMappingContributor`
258-
* Removed `MetadataContributor`, deprecated in favor of `AdditionalMappingContributor`
259-
* Removed `@Persister`.
260-
* Removed `hibernate.mapping.precedence` and friends
261-
* Removed `org.hibernate.Session#save` in favor of `org.hibernate.Session#persist`
262-
* Removed `org.hibernate.Session#saveOrUpdate` in favor `#persist` if the entity is transient or `#merge` if the entity is detached.
263-
* Removed `org.hibernate.Session#update` in favor of `org.hibernate.Session.merge`
264-
* Removed `org.hibernate.annotations.CascadeType.SAVE_UPDATE` in favor of `org.hibernate.annotations.CascadeType.PERSIST` + `org.hibernate.annotations.CascadeType.MERGE`
265-
* Removed `@SelectBeforeUpdate`
266-
* Removed `org.hibernate.Session#delete` in favor of `org.hibernate.Session#remove`
267-
* Removed `org.hibernate.annotations.CascadeType.DELETE` in favor of `org.hibernate.annotations.CascadeType#REMOVE`
268-
* Removed `org.hibernate.Session#refresh(String entityName, Object object)` in favor of `org.hibernate.Session#refresh(Object object)`
269-
* Removed `org.hibernate.Session#refresh(String entityName, Object object, LockOptions lockOptions)` in favor of `org.hibernate.Session#refresh(Object object, LockOptions lockOptions)`
270-
* Removed the attribute value from `@DynamicInsert` and `@DynamicUpdate`
271-
* Removed `org.hibernate.integrator.spi.Integrator#integrate(Metadata,SessionFactoryImplementor,SessionFactoryServiceRegistry)` in favor of `org.hibernate.integrator.spi.Integrator#integrate(Metadata,BootstrapContext,SessionFactoryImplementor)`
272-
* Removed `org.hibernate.Interceptor#onLoad(Object, Serializable, Object[] , String[] , Type[] )` in favour of `org.hibernate.Interceptor#onLoad(Object, Object, Object[], String[], Type[] )`
273-
* Removed `org.hibernate.Interceptor#onFlushDirty(Object, Serializable, Object[] , Object[], String[] , Type[] )` in favour of `org.hibernate.Interceptor#onLoad(Object, Object, Object[], Object[], String[] , Type[] )`
274-
* Removed `org.hibernate.Interceptor#onSave(Object, Serializable, Object[], String[], Type[])` in favour of `org.hibernate.Interceptor#onSave(Object, Object, Object[], String[], Type[])`
275-
* Removed `org.hibernate.Interceptor#onDelete(Object, Serializable, Object[], String[], Type[])` in favour of `org.hibernate.Interceptor#onDelete(Object, Serializable, Object[], String[], Type[])`
276-
* Removed `org.hibernate.Interceptor#onCollectionRecreate(Object, Serializable)` in favour of `org.hibernate.Interceptor#onCollectionRecreate(Object, Object)`
277-
* Removed `org.hibernate.Interceptor#onCollectionRemove(Object, Serializable)` in favour of `org.hibernate.Interceptor#onCollectionRemove(Object, Object)`
278-
* Removed `org.hibernate.Interceptor#onCollectionUpdate(Object, Serializable)` in favour of `org.hibernate.Interceptor#onCollectionUpdate(Object, Object)`
279-
* Removed `org.hibernate.Interceptor#findDirty(Object, Serializable, Object[], Object[], String[], Type[])` in favour of `org.hibernate.Interceptor#findDirty(Object, Object, Object[], Object[], String[], Type[])`
280-
* Removed `org.hibernate.Interceptor#getEntity(String, Serializable)` in favour of `org.hibernate.Interceptor#getEntity(String, Serializable)`
267+
* Annotations
268+
** Removed `@Persister`
269+
** Removed `@Proxy` - see <<proxy-annotation>>
270+
** Removed `@SelectBeforeUpdate`
271+
** Removed `@DynamicInsert#value` and `@DynamicUpdate#value`
272+
** Removed `@Loader`
273+
** Removed `@Table`
274+
** Removed `@Where` and `@WhereJoinTable`
275+
** Removed `@ForeignKey`
276+
** Removed `@Index`
277+
** Removed `@IndexColumn`
278+
** Removed `@GeneratorType` (and `GenerationTime`, etc)
279+
** Removed `@LazyToOne`
280+
** Removed `@LazyCollection`
281+
** Removed `@IndexColumn`
282+
** Replaced uses of `CacheModeType` with `CacheMode`
283+
284+
* Classes/interfaces
285+
** Removed `SqmQualifiedJoin` (all joins are qualified)
286+
** Removed `AdditionalJaxbMappingProducer` -> `AdditionalMappingContributor`
287+
** Removed `MetadataContributor` -> `AdditionalMappingContributor`
288+
289+
* Behavior
290+
** Removed `org.hibernate.Session#save` in favor of `org.hibernate.Session#persist`
291+
** Removed `org.hibernate.Session#saveOrUpdate` in favor `#persist` if the entity is transient or `#merge` if the entity is detached.
292+
** Removed `org.hibernate.Session#update` in favor of `org.hibernate.Session.merge`
293+
** Removed `org.hibernate.annotations.CascadeType.SAVE_UPDATE` in favor of `org.hibernate.annotations.CascadeType.PERSIST` + `org.hibernate.annotations.CascadeType.MERGE`
294+
** Removed `org.hibernate.Session#delete` in favor of `org.hibernate.Session#remove`
295+
** Removed `org.hibernate.annotations.CascadeType.DELETE` in favor of `org.hibernate.annotations.CascadeType#REMOVE`
296+
** Removed `org.hibernate.Session#refresh(String entityName, Object object)` in favor of `org.hibernate.Session#refresh(Object object)`
297+
** Removed `org.hibernate.Session#refresh(String entityName, Object object, LockOptions lockOptions)` in favor of `org.hibernate.Session#refresh(Object object, LockOptions lockOptions)`
298+
** Removed `org.hibernate.integrator.spi.Integrator#integrate(Metadata,SessionFactoryImplementor,SessionFactoryServiceRegistry)` in favor of `org.hibernate.integrator.spi.Integrator#integrate(Metadata,BootstrapContext,SessionFactoryImplementor)`
299+
** Removed `org.hibernate.Interceptor#onLoad(Object, Serializable, Object[] , String[] , Type[] )` in favour of `org.hibernate.Interceptor#onLoad(Object, Object, Object[], String[], Type[] )`
300+
** Removed `org.hibernate.Interceptor#onFlushDirty(Object, Serializable, Object[] , Object[], String[] , Type[] )` in favour of `org.hibernate.Interceptor#onLoad(Object, Object, Object[], Object[], String[] , Type[] )`
301+
** Removed `org.hibernate.Interceptor#onSave(Object, Serializable, Object[], String[], Type[])` in favour of `org.hibernate.Interceptor#onSave(Object, Object, Object[], String[], Type[])`
302+
** Removed `org.hibernate.Interceptor#onDelete(Object, Serializable, Object[], String[], Type[])` in favour of `org.hibernate.Interceptor#onDelete(Object, Serializable, Object[], String[], Type[])`
303+
** Removed `org.hibernate.Interceptor#onCollectionRecreate(Object, Serializable)` in favour of `org.hibernate.Interceptor#onCollectionRecreate(Object, Object)`
304+
** Removed `org.hibernate.Interceptor#onCollectionRemove(Object, Serializable)` in favour of `org.hibernate.Interceptor#onCollectionRemove(Object, Object)`
305+
** Removed `org.hibernate.Interceptor#onCollectionUpdate(Object, Serializable)` in favour of `org.hibernate.Interceptor#onCollectionUpdate(Object, Object)`
306+
** Removed `org.hibernate.Interceptor#findDirty(Object, Serializable, Object[], Object[], String[], Type[])` in favour of `org.hibernate.Interceptor#findDirty(Object, Object, Object[], Object[], String[], Type[])`
307+
** Removed `org.hibernate.Interceptor#getEntity(String, Serializable)` in favour of `org.hibernate.Interceptor#getEntity(String, Serializable)`
308+
309+
* Settings
310+
** Removed `hibernate.mapping.precedence` and friends
311+
312+
281313

282314
[[todo]]
283315
== Todos (dev)

release-announcement.adoc

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@ Steve Ebersole
1414
:user-guide-url: {docs-url}/userguide/html_single/Hibernate_User_Guide.html
1515
:ql-guide-url: {docs-url}/querylanguage/html_single/Hibernate_Query_Language.html
1616

17-
With 7.0.0.Alpha2, Hibernate ORM is now passing the Jakarta Persistence 3.2 TCK!!
18-
19-
- https://ci.hibernate.org/view/ORM/job/hibernate-orm-tck-3.2/job/wip%252F7.0/24/[Results] with Java 17
20-
- https://ci.hibernate.org/view/ORM/job/hibernate-orm-tck-3.2/job/wip%252F7.0/25/[Results] with Java 21
17+
The Hibernate ORM 7.0 Beta1 release has just been published. Here are some highlights...
2118

2219

2320
[[jpa-32]]
@@ -27,17 +24,33 @@ With 7.0.0.Alpha2, Hibernate ORM is now passing the Jakarta Persistence 3.2 TCK!
2724

2825
See https://in.relation.to/2024/04/01/jakarta-persistence-3/[this blog post] for a summary of the changes in 3.2
2926

27+
- https://ci.hibernate.org/view/ORM/job/hibernate-orm-tck-3.2/job/wip%252F7.0/24/[TCK Results] with Java 17
28+
- https://ci.hibernate.org/view/ORM/job/hibernate-orm-tck-3.2/job/wip%252F7.0/25/[TCK Results] with Java 21
29+
3030
[[java-17]]
3131
== Java 17
3232

3333
Version 3.2 of Jakarta Persistence requires Java 17. Hibernate 7.0 therefore baselines on Java 17 whereas previous versions baseline on Java 11.
3434

35+
[[model-validations]]
36+
== Domain Model Validations
37+
38+
7.0 does much more validation of an application's domain model and especially its mapping details, e.g.
39+
40+
* illegal combinations such as `@Basic` and `@ManyToOne` on the same attribute
41+
* misplaced annotations such as an annotated getter method with FIELD access
42+
* stricter following of JavaBean conventions
43+
44+
See the link:{migration-guide-url}#annotation-validation[Migration Guide] for details.
3545

3646
[[mapping-xml]]
3747
== mapping.xsd
3848

3949
Hibernate 7.0 provides a new XSD that represents an "extension" of the Jakarta Persistence orm.xsd weaving in Hibernate-specific mapping features. The namespace for this extended mapping is `http://www.hibernate.org/xsd/orm/mapping`
4050

51+
For applications using Hibernate's legacy `hbm.xml` format, we provide a tool to help with the transformation.
52+
See the link:{migration-guide-url}#hbm-transform[Migration Guide] for details.
53+
4154

4255
[[hibernate-models]]
4356
== Hibernate Models
@@ -47,14 +60,7 @@ Hibernate 7.0 provides a new XSD that represents an "extension" of the Jakarta P
4760
See the link:{migration-guide-url}#hibernate-models[Migration Guide] for details.
4861

4962

50-
[[model-validations]]
51-
== Domain Model Validations
52-
53-
7.0 does much more validation of an application's domain model and especially its mapping details, e.g.
54-
55-
* illegal combinations such as `@Basic` and `@ManyToOne` on the same attribute
56-
* misplaced annotations such as an annotated getter method with FIELD access
57-
* stricter following of JavaBean conventions
58-
59-
See the link:{migration-guide-url}#annotation-validation[Migration Guide] for details.
63+
[[cleanup]]
64+
== Clean-up
6065

66+
A lot of deprecated contracts and behavior has been removed. See the link:{migration-guide-url}#cleanup[Migration Guide] for details.

0 commit comments

Comments
 (0)