Customise column aliasing scheme
--------------------------------
Key: HHH-5554
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5554
Project: Hibernate Core
Issue Type: Patch
Components: core
Affects Versions: 3.6.0.Beta4
Reporter: Chris Pheby
Attachments: alias-patch.patch
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:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira