Customise column aliasing scheme
Project: Hibernate Core
Issue Type: Patch
Affects Versions: 3.6.0.Beta4
Reporter: Chris Pheby
Currently, the column aliasing scheme is hardcoded in the method public String
getAlias(Dialect dialect) of the Column class. Essentially, this constructs an alias by
creating a prefix using any characters up to the first non-letter character in the column
name. This is usually followed by '_' and a number for disambiguation.
I am working with a legacy database where many columns share common prefixes such as
'CUS_', 'COL_'. These mean all the aliases end up being the same for many
columns, making queries difficult to debug.
This patch configures aliasing via Dialect, which was already being done for
getMaxAliasLength(). This makes it possible to customise the behaviour by extending the
Dialect being used. It does not otherwise change the standard behaviour.
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see: http://www.atlassian.com/software/jira