Bugs item #873720, was opened at 2004-01-09 14:59 Message generated for change (Comment added) made by loubyansky You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=873720&group_id=22866
Category: JBossCMP Group: None Status: Open Resolution: None Priority: 5 Submitted By: Heiko W.Rupp (pilhuhn) Assigned to: Nobody/Anonymous (nobody) Summary: SQLUtil.fixConstraintName broken Initial Comment: SQLUtil.fixConstraintName() uses the max table name length to get the maximum length of a PK_constraint. Unfortunately, there are databases, that have different lenght for different things. E.g. The limit for table names in DB2 for Windows, OS/2 and Unix was lifted to 128 in v6. Column names can be 30 bytes long. Primary keys are still limited to 18 So fcName() would check for 128 bytes, even if a column can only be 30 chars in length. Even worse: pks can only be 18 chars in length... Possible solution: Add even more entries to standardjbosscmp-jdbc.xml that override the settings obtained from DatabaseMetaData.getColumnNameLength(). This would be three optional elements -table-name-length -column-name-length -primarykey-name-length Are there other databases out, that are so broken? ---------------------------------------------------------------------- >Comment By: Alexey Loubyansky (loubyansky) Date: 2004-01-09 19:18 Message: Logged In: YES user_id=543482 Ok, please, fix it the way you think is the best. Thanks. ---------------------------------------------------------------------- Comment By: Heiko W.Rupp (pilhuhn) Date: 2004-01-09 19:05 Message: Logged In: YES user_id=217112 In my case (why I found it) the problem is with constraint generation. I can follow your arguing. As the constraint is sort of a column name, one still should use the column length and not the table length. Heiko ---------------------------------------------------------------------- Comment By: Alexey Loubyansky (loubyansky) Date: 2004-01-09 18:59 Message: Logged In: YES user_id=543482 Hello Heiko, I, personally, don't like it. This is the purpose of DatabaseMetaData class that already has getMaxColumnNameLength() and getMaxTableNameLength() methods. If a vendor chose to return values it doesn't actually support it is not our responsibility. So, where does the problem occur? in constraints generation or column names? Thanks. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=873720&group_id=22866 ------------------------------------------------------- This SF.net email is sponsored by: Perforce Software. Perforce is the Fast Software Configuration Management System offering advanced branching capabilities and atomic changes on 50+ platforms. Free Eval! http://www.perforce.com/perforce/loadprog.html _______________________________________________ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
