|
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 |
|
@@ -72,9 +96,6 @@ annotations. Check out its project page for complete details.
|
72 | 96 |
|
73 | 97 | 7.0 uses Hibernate Models in place of HCANN.
|
74 | 98 |
|
75 |
| -NOTE: Currently, the `hibernate-envers` module still uses HCANN. That will change during continued 7.x development. |
76 |
| - |
77 |
| - |
78 | 99 |
|
79 | 100 | [[model-validation]]
|
80 | 101 | == Domain Model Validations
|
@@ -192,35 +213,6 @@ class Person {
|
192 | 213 | This triggers Hibernate to use the column names `home_street`, `home_city`, `work_street`, ...
|
193 | 214 |
|
194 | 215 |
|
195 |
| -[[envers-rev-types]] |
196 |
| -== Hibernate Envers and custom revision entities |
197 |
| - |
198 |
| -Users that wanted to customize the `@RevisionEntity` used by Envers could do so by extending one on the four default revision entity types: |
199 |
| - |
200 |
| -[source] |
201 |
| ----- |
202 |
| -org.hibernate.envers.DefaultRevisionEntity |
203 |
| -org.hibernate.envers.DefaultTrackingModifiedEntitiesRevisionEntity |
204 |
| -org.hibernate.envers.enhanced.SequenceIdRevisionEntity |
205 |
| -org.hibernate.envers.enhanced.SequenceIdTrackingModifiedEntitiesRevisionEntity |
206 |
| ----- |
207 |
| - |
208 |
| -These types are annotated with `@MappedSuperclass` to enable this custom extension. When no custom revision entity was specified, though, |
209 |
| -the same class was mapped as an entity type by Envers internals. This caused problems when dealing with the domain metamodel and static |
210 |
| -metamodel aspect of these types, so we chose to create *new separate classes* annotated `@MappedSuperclass` from which revision entities, |
211 |
| -meaning the default ones as well as yours, *should extend from*. These types are (in the same order): |
212 |
| - |
213 |
| -[source] |
214 |
| ----- |
215 |
| -org.hibernate.envers.RevisionMapping |
216 |
| -org.hibernate.envers.TrackingModifiedEntitiesRevisionMapping |
217 |
| -org.hibernate.envers.enhanced.SequenceIdRevisionMapping |
218 |
| -org.hibernate.envers.enhanced.SequenceIdTrackingModifiedEntitiesRevisionMapping |
219 |
| ----- |
220 |
| - |
221 |
| -Also, you can now write HQL queries using the simple class name of default revision entities to retrieve all revision information. |
222 |
| -Find out more in link:{user-guide-url}#envers-querying-revision-info[this user guide chapter]. |
223 |
| - |
224 | 216 | [[create-query]]
|
225 | 217 | == Queries with implicit `select` list and no explicit result type
|
226 | 218 |
|
|
0 commit comments