Bugs item #544342, was opened at 2002-04-15 14:48
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=544342&group_id=22866

Category: JBossCMP
Group: v3.0 Rabbit Hole
Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: frederik sauer (fredsa)
Assigned to: Nobody/Anonymous (nobody)
>Summary: Oracle max-alias-length should be 30

Initial Comment:
Using custom Finder method (CMP2.0) JBoss can 
generate long table aliases which exceed datbase 
limitations.

Also refer to these related bugs:
 516835 pk constraint name too long
 532262 relationship table names too long


In the following JBoss generated example query the 
table alias "t2_si_oDTSecurityGroups_RELATION" 
exceeds Oracle's limitations causing an "ORA-00972: 
identifier is too long":

SELECT t0_secgrp.ODT_SECURITY_GROUP_ID
FROM SYSTEM_IDENTITY t1_si,
ODT_SECURITY_GROUP t0_secgrp,
SYSTEM_ID_TO_SECURITY_GROUP 
t2_si_oDTSecurityGroups_RELATION
WHERE t1_si.SYSTEM_ID = :1
AND 
(t1_si.SYSTEM_ID=t2_si_oDTSecurityGroups_RELATION.SYST
EM_ID
AND 
t0_secgrp.ODT_SECURITY_GROUP_ID=t2_si_oDTSecurityGroup
s_RELATION.ODT_SECURITY_GROUP_ID)

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

>Comment By: Dain Sundstrom (dsundstrom)
Date: 2002-04-19 10:33

Message:
Logged In: YES 
user_id=251431

Thanks for the links.  I checked the change into Branch_3_0 
and HEAD.

As for the max bytes vs characters, that is a major pain.  
It really depends on how the database is storing 
characters. It could choose to always store 2 byte 
characters.  I'm just going to leave this one until someone 
comes up with a cross platform patch.

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

Comment By: frederik sauer (fredsa)
Date: 2002-04-19 10:13

Message:
Logged In: YES 
user_id=111914

Sorry I missed the setting in standardjbosscmp-jdbc.xml. All
indeed works as a charm when max-alias-length is set to 30.

I though I'd list a reference or two in Oracle's
documentation so that the 30 bytes max length is confirmed,
including for those without access to an Oracle database.

By the way I say 30 bytes, not 30 characters, because the
limitation appears to be in bytes in my tests (I can create
a table with 15 Kanji [double-byte Japanese] characters
[internally stored as 30 bytes], but not 16, and certainly
not 30 Kanji characters.)

Here goes for 8i and 9i:
http://otn.oracle.com/docs/products/oracle8i/doc_library/817_doc/server.817/a85397/ap_syntx.htm#619294
http://otn.oracle.com/docs/products/oracle9i/doc_library/901_doc/server.901/a90125/ap_syntx2.htm#619294
And I'm pretty sure Oracle7 also had a 30 byte maximum; it
certainly didn't have more, like say 32.

So yeah, please change the max-alias-length for Oracle7/8/9
to 30. Of course, thanks for the excellent work on a really
good quality product!

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

Comment By: Dain Sundstrom (dsundstrom)
Date: 2002-04-19 10:00

Message:
Logged In: YES 
user_id=251431

I'll change the oracle setting to 30.

The reason I set this report to invalid instead of fixed or 
duplicate is because I did not fix anything and this is not 
a duplicate of any bug that I can remember.  This is simply 
not a bug, which is not one of the choices.

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

Comment By: Georg Schmid (giorgio42)
Date: 2002-04-19 09:30

Message:
Logged In: YES 
user_id=437570


Hi,

please, please set the alias-max-length element to 30
in standardjbosscmp-jdbc.xml for Oracle8, so I don't have to
do it each time I build a new JBoss version from 
CVS.

In any case, 32 is definitely wrong.

(Dain, setting it to the correct value would have
spared you this. OBTW: Is there a special reason that you
set your bugs to "invalid" instead of "fixed" 
or "duplicate"?).

Thanks a lot in advance.
Georg

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

Comment By: Dain Sundstrom (dsundstrom)
Date: 2002-04-18 15:35

Message:
Logged In: YES 
user_id=251431

See alias-max-length element of type-mapping in 
standardjbosscmp-jdbc.xml for your database vendor.

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

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=544342&group_id=22866

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to