I know, would just be easier if he got a clean example :)Max, it would happen whenever you have a column name that approaches the limit for the database. Hibernate needs to add an _0, etc at the end when rendering aiases.
But Ok - I've fought with these kind of troubles before and at that time we just limited our selfes to use shorter column names :)
(the easy solution - and is "ok" as long as we are using the column names and not the propertynames in the SQL generated by HQL)
Another one is to rewrite the code that produces those aliases (and as I remember - the logic are well-defined but unfortunatly not in a single method).
That alias generation should of course use the Dialect class which would have an getMaxColumnNameLength and getMaxTableNameLength.
If the aliases generated exceeds that amount "do something" :)
Maybe we should just postfix the names with 0_ instead of prefixing them with _0 (and then chop them of with the dialects max lengths..) - that would
make them unique ....and avoid name colisions (as long as the max lenght is not near 3-4 chars ....)
Just some thoughts....
/max
------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel