|
This was caused by
HHH-6911
, but it is not a bug. Before this
HHH-6911
was fixed, the discriminator column was not needed for InheritanceType.JOINED and was not used.
HHH-6911
changed hibernate to actually use insert/select the discriminator column.
The fix for
HHH-6911
affects this mapping because the discriminator column is also used by an entity property. Before
HHH-6911
was fixed, there was no failure because Hibernate only used the specified column to insert/update the property value (because Hibernate ignored the column mapping for the discriminator).
Hibernate cannot handle having the same column mapped as insertable for both the discriminator and the property.
The way to deal with this in a portable way is to map column for the property as: @Column(name="...", insertable=false, updatable = false)
A non-portable way to deal with this is to set hibernate.discriminator.ignore_explicit_for_joined=true. This will result in the legacy (pre-
HHH-6911
) behavior.
|