DO NOT REPLY [Bug 43831] - Unexpected Result with mysql jdbc 5.1.5, column aliases not reported

[email protected]
Newsgroups gmane.comp.jakarta.taglibs.devel
Message-ID <[email protected]>
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43831>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43831





------- Additional Comments From [email protected]  2007-12-07 05:37 -------
Looking at the spec, I see two uses for the name.

The first is to do ${row.lastName} and the second is to list the column names.

The latter is very obviously going to be improved by the change below. The
former is going to be improved in so much as presumably there's a bug when a
select statement has two entries with the same column names.

The people hurt by this change are ones with code like:

"SELECT id as identifier ..." and then using ${row.id}.

We could either:

a) Warn such people in the release notes.
b) Try to implement something whereby we get label + name and support both. As
it's not a part of the API, This would mean a custom SortedMap that allowed a
backup key.

If desirable, b) doesn't seem that hard to implement to support the ${row.id}
use case, though anyone relying on getRows() as a Map is going to see a change
in keys unless they use the same API as row.id (presumably get(Object)).

Thoughts?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.