File tree Expand file tree Collapse file tree 1 file changed +28
-2
lines changed Expand file tree Collapse file tree 1 file changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,32 @@ The behaviour of `jakarta.persistence.criteria.Expression#as(Class)` has been ch
105
105
In order to perform an actual typecast, `org.hibernate.query.criteria.JpaExpression#cast(Class)` can be used.
106
106
107
107
E.g.
108
- ```
108
+
109
+ [source,java]
110
+ ----
109
111
( (JpaExpression) from.get( "theInt" ) ).cast( String.class )
110
- ```
112
+ ----
113
+
114
+
115
+ [[table-annotation-subclasses]]
116
+ == @Table and SINGLE_TABLE inheritance
117
+
118
+ In previous versions, `@Table` on a subclass in a SINGLE_TABLE hierarchy was simply ignored. E.g.
119
+
120
+ [source,java]
121
+ ----
122
+ @Entity
123
+ @Inherited
124
+ class RootClass {
125
+ // ...
126
+ }
127
+ @Entity
128
+ @Table(...)
129
+ class SubClass extends RootClass {
130
+ // ...
131
+ }
132
+ ----
133
+
134
+ As part of a larger effort toward better annotation validation, this now results in a mapping exception.
135
+ All classes in the hierarchy are stored to a single table as defined by the root. `@Table` on the subclasses is,
136
+ at best, confusing.
You can’t perform that action at this time.
0 commit comments