Bugs item #873720, was opened at 2004-01-09 13:59
Message generated for change (Comment added) made by pilhuhn
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: Christian Riege (lqd)
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: Heiko W.Rupp (pilhuhn)
Date: 2004-01-23 09:18

Message:
Logged In: YES 
user_id=217112

Christian is working on this now.

----------------------------------------------------------------------

Comment By: Alexey Loubyansky (loubyansky)
Date: 2004-01-09 18: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 18: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 17: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


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to