I had a problem when joining two tables that shared a field name, ie:
SELECT a.id, a.description, b.description FROM a JOIN b ON( a.b_fk = b.id )
As both fields get put into the save field in the resultant row map.
Trying to alias the rows doesn't help, ie;
SELECT a.id, a.description AS a_desc, b.description AS b_desc FROM a JOIN b ON( a.b_fk = b.id )
Gives the same.
I found the reason for this ( http://jira.codehaus.org/browse/GROOVY-2782) which recommends adding the "useOldAliasMetadataBehavior=true" parameter to the JDBC url, and this does fix it, however in that issue, Ken Weiner asks:
>> Should the rows method be calling ResultSetMetaData.getColumnLabel() instead?
Which I thought was a good point, deserving of another issue.
It's strange, and kinda unpredictable as it stands, as the following:
SELECT 10, 10 AS ten
Does give you two columns back (so the alias works) – but I guess this is a missed case on the original MySQL "fix"
Hope this make sense... It's my first issue, and I've tried not to babble