Bug: Using mysql keyword as
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.