Closed
Description
Presently DataClassRowMapper appears to assume that all database columns use snake_case
Say I have a kotlin class like:
data class MyClass(val myFoo: String, val myBar: String)
and a database table with columns myFoo, myBar
a naive selection like
select myFoo, myBar
FROM ...
will fail, because the mapper will expect the columns to be named with underscores.
This can be worked around by adding aliases with underscores:
select myFoo as my_foo, myBar as my_bar
FROM ...
But this is less than ideal. Ideally this would be configurable and support a few standard formats out of the box, e.g. snake_case
, camelCase
, PascalCase
.