-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Alias Length Problem with Column.getAlias
PostPosted: Wed Dec 20, 2006 3:37 pm 
Newbie

Joined: Wed Dec 20, 2006 3:15 pm
Posts: 1
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.