-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Constructor Args do not support columnPrefix #968
Comments
Could you provide a test case or example app ? Thank you, |
Sure, I will translate the case I am using into a test case and post it when I am complete. |
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. |
Thank you for the examples, @Davio @christopherpicard ! |
Hi @christopherpicard , @Davio Sorry for a late response, but it will be available in version 3.5.0. |
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.
The text was updated successfully, but these errors were encountered: