|
10 | 10 | This guide discusses migration to Hibernate ORM version 7.0. For migration from |
11 | 11 | earlier versions, see any other pertinent migration guides as well. |
12 | 12 |
|
| 13 | +[[relicense]] |
| 14 | +== Apache License |
| 15 | + |
| 16 | +Starting with 7.0, Hibernate ORM will be licensed under the Apache License 2.0. |
| 17 | + |
| 18 | +NOTE: While the Hibernate team still believes that our long published interpretation of LGPL |
| 19 | +to be compatible with ASL and similar licenses, enough FUD has been spread about it to |
| 20 | +be considered a lost cause in terms of inclusion in various projects. At this point, |
| 21 | +it just makes sense to change - it opens up wider acceptance amongst Apache/Jakarta |
| 22 | +projects and others. |
| 23 | + |
| 24 | +Details can be seen at https://hibernate.atlassian.net/browse/HHH-19145. |
| 25 | + |
| 26 | +As part of this effort, the Hibernate team reached out to the authors of |
| 27 | +"non-trivial" contributions to request permission to relicense their |
| 28 | +work under the Apache License. The response was overwhelming positive, although |
| 29 | +we never heard back from some contributors and another explicitly disagreed. |
| 30 | +This required a few actions on our part: |
| 31 | + |
| 32 | +* Dropping `hibernate-envers` - see https://hibernate.atlassian.net/browse/HHH-19150 |
| 33 | +* Dropping `hibernate-ucp` - see https://hibernate.atlassian.net/browse/HHH-19162 |
| 34 | +* Dropping `TeradataDialect` - see https://hibernate.atlassian.net/browse/HHH-19057 |
| 35 | + |
| 36 | + |
13 | 37 | [[jpa-32]] |
14 | 38 | == Jakarta Persistence 3.2 |
15 | 39 |
|
@@ -50,9 +74,6 @@ annotations. Check out its project page for complete details. |
50 | 74 |
|
51 | 75 | 7.0 uses Hibernate Models in place of HCANN. |
52 | 76 |
|
53 | | -NOTE: Currently, the `hibernate-envers` module still uses HCANN. That will change during continued 7.x development. |
54 | | - |
55 | | - |
56 | 77 |
|
57 | 78 | [[model-validation]] |
58 | 79 | == Domain Model Validations |
@@ -131,36 +152,6 @@ Soft-delete now supports the strategy of tracking the timestamp at which the sof |
131 | 152 | in addition to the previous truth-based strategies. |
132 | 153 | See the link:{user-guide-url}#soft-delete[User Guide] for details. |
133 | 154 |
|
134 | | - |
135 | | -[[envers-rev-types]] |
136 | | -== Hibernate Envers and custom revision entities |
137 | | - |
138 | | -Users that wanted to customize the `@RevisionEntity` used by Envers could do so by extending one on the four default revision entity types: |
139 | | - |
140 | | -[source] |
141 | | ----- |
142 | | -org.hibernate.envers.DefaultRevisionEntity |
143 | | -org.hibernate.envers.DefaultTrackingModifiedEntitiesRevisionEntity |
144 | | -org.hibernate.envers.enhanced.SequenceIdRevisionEntity |
145 | | -org.hibernate.envers.enhanced.SequenceIdTrackingModifiedEntitiesRevisionEntity |
146 | | ----- |
147 | | - |
148 | | -These types are annotated with `@MappedSuperclass` to enable this custom extension. When no custom revision entity was specified, though, |
149 | | -the same class was mapped as an entity type by Envers internals. This caused problems when dealing with the domain metamodel and static |
150 | | -metamodel aspect of these types, so we chose to create *new separate classes* annotated `@MappedSuperclass` from which revision entities, |
151 | | -meaning the default ones as well as yours, *should extend from*. These types are (in the same order): |
152 | | - |
153 | | -[source] |
154 | | ----- |
155 | | -org.hibernate.envers.RevisionMapping |
156 | | -org.hibernate.envers.TrackingModifiedEntitiesRevisionMapping |
157 | | -org.hibernate.envers.enhanced.SequenceIdRevisionMapping |
158 | | -org.hibernate.envers.enhanced.SequenceIdTrackingModifiedEntitiesRevisionMapping |
159 | | ----- |
160 | | - |
161 | | -Also, you can now write HQL queries using the simple class name of default revision entities to retrieve all revision information. |
162 | | -Find out more in link:{user-guide-url}#envers-querying-revision-info[this user guide chapter]. |
163 | | - |
164 | 155 | [[create-query]] |
165 | 156 | == Queries with implicit `select` list and no explicit result type |
166 | 157 |
|
|
0 commit comments