Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Failed to map lowercase column names with case-sensitive drivers. #557

Closed
GoogleCodeExporter opened this issue Apr 21, 2015 · 4 comments
Closed

Comments

@GoogleCodeExporter
Copy link

What version of the MyBatis are you using?
3.1.0

Please describe the problem.  Unit tests are best!
This problem was reported on the user-list.
https://groups.google.com/d/topic/mybatis-user/QfEVEtt5nlU/discussion (problem 
with lowercase column)
Here's the reported example:

<resultMap id="testMap" type="uppercase.TestBean">
  <id property="col1" column="col1" />
</resultMap>

<select id="select" resultMap="testMap">
  select COL1 as col1
  from T_TABLE
</select>


What is the expected output? What do you see instead?
See below.

Can you provide stack trace, logs, error messages that are displayed?
No stack trace or vender/driver information has been provided.
Here's the reported error message:

### Error querying database.  Cause: java.sql.SQLSyntaxErrorException:
An undefined column name was detected.


Please provide any additional information below.
Contrary to the spec, some drivers require case-sensitive column names when 
getting result.
Here's the discussion on the dev list (thank you Eduardo for the pointer).
http://groups.google.com/group/mybatis-dev/browse_thread/thread/2bee7ed6cfbe150d
/fba1afb39fa7f599?lnk=gst&q=mappedColumnNames#fba1afb39fa7f599

Original issue reported on code.google.com by haraw...@gmail.com on 22 Mar 2012 at 5:33

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

No branches or pull requests

1 participant