Open chriszwickerocteris opened 5 years ago
that's at the mapper factory level, but prob want to be able to get visibility in an actual mapper underlying structure.
Maybe both are valid use cases?
For me, since configuration of a mapper happens across multiple (generated) classes, I'm looking for two things:
So far, I've used reflection to "dump" a factory configuration from a configured mapper for this, and it's worked quite well (easy to understand and copy/paste for a test).
Yes definitely might just create another ticket for the other one and it’s also slightly trickier
When debugging a mapper configuration and creating tests, it would be great to have the possibility to get a "dump" of the mapper configuration (the column properties). Best would be to directly get the code to configure a new mapper factory.
What I imagine is a method like
JdbcMapperFactory#dumpConfiguration
, which would return a String that reproduces the configuration, e.gThis is particularly important in a setup where different classes contribute to the mapper configuration and even more so if these classes are generated.
P.S. building on this, one could imagine directly creating the code for a reproducing test from a
ResultSet
and aJdbcMapper
and the root class being mapped!