On 10/3/2014 8:24 AM, Tom Evans wrote: > On Fri, Oct 3, 2014 at 3:13 PM, Tom Evans <tevans...@googlemail.com> wrote: >> I tried converting the selected data to SIGNED INTEGER, eg >> "CONVERT(country_id, SIGNED INTEGER) AS country_id", but this did not >> have the desired effect. > > However, changing them to be cast to CHAR changed the error message - > "java.lang.Integer cannot be cast to java.lang.String". > > I guess this is saying that the type of the map key must match the > type of the key coming from the parent entity (which is logical), so I > guess my question is - what do SQL type do I need to select out to get > a java.lang.Integer, to match what the map is expecting?
I still need to digest the stacktrace. What database software are you connecting to, what version of their JDBC driver do you use, and what are your typical column types in the DB? I'm not very familiar with DIH code, and when I've looked in the past, I've found it very hard to follow ... but later tonight I will check the code locations mentioned in your stacktrace to see whether it's possible to log which field is producing the message. Hopefully we can get you something. Ideally it will log all available information, which means hopefully it can see definitions in the DIH config file like entity, dataSource, table, etc. Thanks, Shawn