quux00 / mybatis-koans

A koan-style tutorial in Java for the MyBatis data mapper framework
72 stars 21 forks source link

getFromMap is required for H2 database #14

Open pmularien opened 10 years ago

pmularien commented 10 years ago

Thank you for the great work here, you've provided a very comprehensive set of exercises for folks to learn!

I ran into an issue with the H2 database. H2 always reports map keys (and columns) in uppercase, and as such, many of the map.get calls that are in the koans do not work as-is. Instead, getFromMap is required to normalize the case in the map key names. Any chance you've thought about this, or we could discuss a potential fix?

quux00 commented 10 years ago

Hi - thanks for the compliment :-)

In terms of the H2 issue, I'm not clear what you are asking. When I run the completed koans they all pass. I had to use getFromMap, as you say, in two koans (02 and 26) to overcome this issue. Are you seeing that some of the completed koans are not passing?

When you say discuss a potential fix, do you mean a fix to the koans or to MyBatis (or H2) itself? If the latter, I'm not on the MyBatis committer team. If the former, I did discuss a few alternatives in this StackOverflow posting a while back: http://stackoverflow.com/a/11732674/871012.