|
While upgrading from hibernate 3.6.5 to 4.3.1 I ran into this issue. Setting the property "hibernate.discriminator.ignore_explicit_for_joined" to "true" seems to make things work again. I am curious what code changes I need to make to get this to work without the property set to "legacy" behavior. The error I get without the property set is SQL Error 17003, SQLState 99999; Invalid column Index. The error occurs when saving a new hierarchical entity and Hibernate tries to insert a new record into the parent table. I'm on Oracle 10g Dialect. I've got the discriminator columns annotated in my entity as @Enumerated,(EnumType.STRING) and I have the entity constructors coded to set the discriminator column with the appropriate values. If I remove the set discriminator column code from the constructors then I get a constraint violation exception because the discriminator column isn't set (Beans Validation). If I remove the @NotNull then I'll end up with a "ORA-01400 cannot insert null into column" error. How is this supposed to work now?
|