I have a length problem with the aliases generated by org.hibernate.mapping.Column. The are sometimes too long.
First, Column.getAlias(Dialect dialect, Table table) doesn't consider Dialect.getMaxAliasLenght() at all. These aliases are easily longer than Dialect.getMaxAliasLenght().
Second, even Column.getAlias(Dialect dialect) has the following Problem:
Given the column named "ABCDEFGHIK_X", Dialect.getMaxAliasLenght()=10 and uniqueInteger=12, you'll get the alias "ABCDEFGHIK12_" which is way over 10 characters (13 actually).
The problem can heppen, whenever an alias gets shortened due to an non-Letter character and the shortened alias is less than or equal to Dialect.getMaxAliasLenght().
Am I missing something?
Thanks,
Matt
|