|
Brett Meyer, I'll push this to master soon. Can you manage porting it to 4.2?
Had to manage blending this request against legacy apps continuing to work. Here's how this works for joined inheritance now: 1) If the @DiscriminatorColumn is defined, we now attempt to read and write the discriminator column. This is a bit of a regression for existing users who happen to have InheritanceType#JOINED combined with DiscriminatorColumn in that Hibernate will now expect the DiscriminatorColumn to actually be there. For these users I added a setting hibernate.discriminator.ignore_explicit_for_joined which is false by default; setting it to true will ignore the explicit DiscriminatorColumn doing the legacy behavior. 2) If no @DiscriminatorColumn is defined, by default we perform the legacy behavior (don't read/write to a discriminator column). This is configurable as well via the hibernate.discriminator.implicit_for_joined setting, which is false by default. Enabling that setting tells Hibernate to handle @DiscriminatorColumn being absent by applying the JPA defined defaults for its values.
|