|
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 |
@@ -124,35 +145,6 @@ For example, this property declaration is no longer allowed: |
124 | 145 | String isDefault(); |
125 | 146 | ---- |
126 | 147 |
|
127 | | -[[envers-rev-types]] |
128 | | -== Hibernate Envers and custom revision entities |
129 | | - |
130 | | -Users that wanted to customize the `@RevisionEntity` used by Envers could do so by extending one on the four default revision entity types: |
131 | | - |
132 | | -[source] |
133 | | ----- |
134 | | -org.hibernate.envers.DefaultRevisionEntity |
135 | | -org.hibernate.envers.DefaultTrackingModifiedEntitiesRevisionEntity |
136 | | -org.hibernate.envers.enhanced.SequenceIdRevisionEntity |
137 | | -org.hibernate.envers.enhanced.SequenceIdTrackingModifiedEntitiesRevisionEntity |
138 | | ----- |
139 | | - |
140 | | -These types are annotated with `@MappedSuperclass` to enable this custom extension. When no custom revision entity was specified, though, |
141 | | -the same class was mapped as an entity type by Envers internals. This caused problems when dealing with the domain metamodel and static |
142 | | -metamodel aspect of these types, so we chose to create *new separate classes* annotated `@MappedSuperclass` from which revision entities, |
143 | | -meaning the default ones as well as yours, *should extend from*. These types are (in the same order): |
144 | | - |
145 | | -[source] |
146 | | ----- |
147 | | -org.hibernate.envers.RevisionMapping |
148 | | -org.hibernate.envers.TrackingModifiedEntitiesRevisionMapping |
149 | | -org.hibernate.envers.enhanced.SequenceIdRevisionMapping |
150 | | -org.hibernate.envers.enhanced.SequenceIdTrackingModifiedEntitiesRevisionMapping |
151 | | ----- |
152 | | - |
153 | | -Also, you can now write HQL queries using the simple class name of default revision entities to retrieve all revision information. |
154 | | -Find out more in link:{user-guide-url}#envers-querying-revision-info[this user guide chapter]. |
155 | | - |
156 | 148 | [[create-query]] |
157 | 149 | == Queries with implicit `select` list and no explicit result type |
158 | 150 |
|
|
0 commit comments