Steve Ebersole commented on Bug HHH-7780

For 5.0 the plan is actually exactly that; to change how Types are "built".

I think this is again a situation where you need to step back and look at the whole. OK, the changes to HHH-7645 leads to these errors for the hibernate-envers test suite, but the larger story there is that prior to the changes in HHH-7645 the generated audit entities used the incorrect enum type as well. Given the current code the solution has to be that hibernate-envers handle this somehow. This has always been the problem with relying on the DOM representation of the mappings as the "integration" in my humble opinion. As far as I can see the only option is to change that BasicMetadataGenerator#addBasic code to set specific type parameters based on the originating Type and its configuration. Here, for example, if EnumType#isOrdinal() returns false BasicMetadataGenerator#addBasic would set the useNamed config param. Ideally envers would just reuse the EnumType instance from the main domain model; however, thats not possible given its current DOM-generation approach.

I could add null handling for that xProperty reference in the code you mentioned, but the end result currently would be envers using incorrect types in that HHH-7645 situation (and other situations with orm.xml overrides or definitions).

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira