Please use the google group to ask questions - thanks.

by Eabin 22 Jul 15:51
Bug: Using mysql keyword as table alias

I just had an issue with the following generated sql:
select e.id, e.startdate, e.comment, e.minpeople, e.canceled, e.reason, e.enddate, e.deleted, e.cdate, e.archived
, ce.id, ce.name
, as.id, as.login
, le.id, le.name, le.address, le.use_coordinates, le.route, le.description, le.longitude, le.latitude
, pp.id, pp.doesparticipate, pp.externalname
, pus.id, pus.login
from event e
join eventcategory ce ON e.category_id = ce.id
join systemuser as ON e.creator_id = as.id
left outer join eventlocation le ON e.location_id = le.id
left outer join participation pp ON e.id = pp.event_id
left outer join systemuser pus ON pp.user_id = pus.id
where e.deleted=0
order by e.startdate ASC;

i think the problem is the alias from systemuser named 'as', which is a mysql keyword.

09 Aug 11:33
by Rob

Good bug!!

I'll have to fix this by making sure 'AS' is never used as an alias. I'll do this for all RDBMS. I'll log it and fix it in a few weeks when I get back to NZ.

Thanks, Rob.

02 Sep 10:58
by Rob

OK, I'm back and looking into this bug now.

20 Oct 11:42
by Rob

Okay, fixed this for 0.9.8. Apologies in that I didn't realise that you may not have had a workaround :(

http://www.avaje.org/bugdetail-46.html

Just doing documentation and sanity testing on 0.9.8 now.

Create a New Topic

Title:
Body:
 
Introduction User Guide (pdf) Install/Configure Public JavaDoc Whitepapers
General Database Specific Byte Code Deployment Annotations Features
Top Bugs Top Enhancements
woResponse