There seems to be a defect in the ejbql to sql generator as this example findAll() 
query shows:


ejbql query: SELECT OBJECT(u) FROM Usage AS u ORDER BY u.id

resultant sql query: SELECT t0_u.id, t0_u.id, t0_u.logon, t0_u.logoff, t0_u.computer, 
t0_u.user, t0_u.id FROM computer_usage t0_u ORDER BY t0_u.id ASC

table schema:  computer_usage { id BIGINT primary key, logon TIMESTAMP, logoff 
TIMESTAMP, user (foreign key for relationship), computer (foreign key for 
relationship) }


the problem is the sql query now references the same column (t0_u.id) three times 
instead of once.  if this because I have two relationships (user and computer) for 
this bean so the CMP container pulls the primary key an extra time for each 
relationship?

if anyone can explain this behaivor and/or provide a wordaround, I would really 
appreciate it as I suspect a performance improvement could be obtained...


thanks,
micah

<a 
href="http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3825598#3825598";>View 
the original post</a>

<a 
href="http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3825598>Reply 
to the post</a>


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to