arnaudroger / SimpleFlatMapper

Fast and Easy mapping from database and csv to POJO. A java micro ORM, lightweight alternative to iBatis and Hibernate. Fast Csv Parser and Csv Mapper
http://simpleflatmapper.org
MIT License
438 stars 76 forks source link

UUID to binary(16) in MySQL #730

Closed normano closed 4 years ago

normano commented 4 years ago

Not sure how one accomplishes this with jdbcTemplateMapperFactory/rowmapper in sfm spring jdbc. Current behavior is that it reads from a string. I do not see much mentioned here about it. I know the column key, but trying to figure out how to configure the rowmapper 'with this key, find byte array then convert byte array to uuid and return it'

normano commented 4 years ago

I see what the problem was. The library is not good at detecting the right ctor to use and works (Does not throw exception during getting the initializer) when i only have one. Weird that it tries to use the copy ctor or null arg ctor. I'd be willing to designate a static factory method instead of ctor.