Chris Cranford (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *commented* on HHH-13922 (
https://hibernate.atlassian.net/browse/HHH-13922?atlOrigin=eyJpIjoiMTk0Mm...
)
Re: When an audited column uses a columnDefinition, schema validation may fail. (
https://hibernate.atlassian.net/browse/HHH-13922?atlOrigin=eyJpIjoiMTk0Mm...
)
After investigation, I'm inclined to think the best course of action here might be to
revert HHH-10844 (
https://hibernate.atlassian.net/browse/HHH-10844 ) Closed.
The changes introduced by HHH-10844 (
https://hibernate.atlassian.net/browse/HHH-10844 )
Closed was an attempt to resolve a column's Type back to a SQL Type. For cases where
the mapping between Java and SQL types were 1:1, this seemed to work fine but in cases
where the types ultimately differed in the case presented above, this resolved in a
situation where the audit table's resolved type was incorrect.
One idea that might work here would be to introduce a ColumnDefinitionResolver contract
that would know how to reliably extract the appropriate bits from the columnDefinition
that is dialect-specific. This contract could also be extended by the user allowing them
full control over the resolution in situations where the default behavior was limiting or
prohibitive.
public interface ColumnDefinitionResolver {
/**
* @param columnDefinition the column definition from the base table mapping
* @param dialect the dialect
*/
String resolveAuditColumnDefinition( String columnDefinition, Dialect dialect);
}
(
https://hibernate.atlassian.net/browse/HHH-13922#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-13922#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100123- sha1:26275c0 )