Bugs item #969699, was opened at 2004-06-09 11:36
Message generated for change (Comment added) made by robmv
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=969699&group_id=22866

Category: JBossCMP
Group: v3.2
Status: Open
Resolution: Accepted
Priority: 5
Submitted By: Robert Marcano (robmv)
Assigned to: Alexey Loubyansky (loubyansky)
Summary: Invalid SQL to load relationships when tables uses db schema

Initial Comment:
Using: 
     JBoss 3.2.4
     IBM DB2 8.1

When the CMP Entity beans are mapped to tables with a
prefixed DB schema, for example SIST.USERS the SQL
generated to load a relationship have problems with the
table aliases for the joined tables. The current
generated SQL look like this

SELECT ...... FROM SIST.USERS SIST.USERS, SIST.GROUPS
SIST.GROUPS WHERE .......

The problem is caused by the usage of the same table
name as the alias (at least DB2 does not supports
aliases that includes a dot)

Another problem that I think could arise from this SQL
is when the relationship is to the same table, for
example Employee ----supervisor----> Employee but I
have not tried it yet

I am attaching a patch that uses the AliasManager class
is order to generate the needed aliases


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

>Comment By: Robert Marcano (robmv)
Date: 2004-07-22 08:12

Message:
Logged In: YES 
user_id=575475

what is the status?, the 3.2.5 contains the same problematic
code and 4.0 HEAD too, the fix works, trust me ;-)

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

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


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to