Skip to content
This repository has been archived by the owner on Feb 16, 2021. It is now read-only.

Select action swallows columns with same name #18

Open
diega opened this issue Jun 8, 2014 · 2 comments
Open

Select action swallows columns with same name #18

diega opened this issue Jun 8, 2014 · 2 comments

Comments

@diega
Copy link

diega commented Jun 8, 2014

If you select two columns from different tables with the same name, the result will contain only one of them.
My first attempt after detecting this was to define an alias for each column, but unfortunately commons-dbutils:commons-dbutils:1.5 doesn't use column labels for converting resultSets to maps but the original, potentially collisionable, name, as you can see in DBUTILS-100.

Dunno which could be the path from the module to solve this, one option is to move to commons-dbutils:commons-dbutils:1.6-SNAPSHOT, or maybe just extend org.apache.commons.dbutils.RowProcessor, override the toMap method and pass it in the contructor of org.apache.commons.dbutils.handlers.LimitedMapListHandler on com.bloidonia.vertx.mods.JdbcProcessor@270

Just let me know what do you think about this, and if you don't have time to apply this changes I can make you a PR.

@timyates
Copy link
Owner

timyates commented Jun 8, 2014

Good catch, thanks!

I wish they would release 1.6 already, 2 years since 1.5!

Off the top of my head, the second option sounds better, as I'm wary of having a snapshot dependency that may break in the future...

Pull requests gratefully received, as I'm currently between computers and work is full on

Thanks again!

@smiklosovic
Copy link
Contributor

this one should be autoresolved by https://github.com/timyates/mod-jdbc-persistor/pull/29/files as it uses 1.6 of dbutils

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants