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

Category: JBossCMP
Group: v3.2
Status: Closed
Resolution: Fixed
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: Francisco Piragibe (fpiragibe)
Date: 2004-11-04 00:25

Message:
Logged In: YES 
user_id=1152172

The 3.2.5 and 3.2.6 releases I've downloaded contain the
same broken code. BTW, the aliases in this context could be
fixed strings, such as "rA" and "rB", for instance. I've
patched JDBCLoadRelation this way, and everything works
fine, even for self-related tables. This issue shouldn't've
been closed.

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

Comment By: Alexey Loubyansky (loubyansky)
Date: 2004-08-11 11:12

Message:
Logged In: YES 
user_id=543482

Fixed in 3.2.6rc2. Thanks.

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

Comment By: Robert Marcano (robmv)
Date: 2004-07-22 09: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:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to