Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Constructor Args do not support columnPrefix #968
I use primarily immutable model objects for all of my stored data. As a result all of my member variables are final which means I have to use the constructor args to set them. Currently constructor args do not support the columnPrefix option from associations. As a result I have to build many result maps that are essentially duplicates with different column values since other workarounds are too slow. It would be really nice if the columnPrefix could be added to the constructor arg implementation.
referenced this issue
Jul 13, 2017
Currently, columnPrefix is only specified for associations. I couldn't find a usage within constructor in the examples.
What I'd like to do is something like the following:
Where complexProperty itself has sub-properties, such as 'key' and 'value' where the columns would be named 'prop_key' and 'prop_value' respectively.
As long as resultMaps are supported in that approach it would work for me. My example is like this:
The columns in this case would be MinimumDistance, MinimumDistanceUnits, MaximumDistance, and MaximumDistanceUnits.
Currently i have to write two different Result maps for the minimum and maximum value.