-
-
Notifications
You must be signed in to change notification settings - Fork 177
CSV deserialization fails for targets with value class field when column reordering is enabled #800
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
Comments
If possible, it'd be great to have Java-only reproduction -- if so, could transfer to |
@cowtowncoder Well, I can only reproduce it with Kotlin Value Classes, so I'm not sure how I would reproduce it in Java 😅 As far as I know, Java doesn't have a similar concept (yet?). |
I was just hoping to confirm whether this is due to Kotlin Value Class specific details (in which case it might not be CSV-specific, fwtw), or not (in which case it is CSV specific). |
I have checked and this issue is duplication of #651. |
Search before asking
Describe the bug
When trying to deserialize a CSV into a target class that contains a field that is a
value class
andthe
ObjectMapper
has aCsvSchema
that has column reordering enabled, Jackson will produce the following exception, seemingly ignoring the@JsonProperty
annotations:This issue does not exist for data classes or if column reordering is disabled.
data class
value class
false
true
Related to #768.
To Reproduce
Please see the cloneable, runnable MCVE here.
The MCVE tests demonstrate that data classes work whether column reordering is enabled or not, and value classes work with column reordering disabled.
Main.kt
Test.kt
Expected behavior
Jackson deserializes the CSV without issues just like with data class fields or with column reordering disabled.
Versions
Kotlin: 1.9.23
Jackson-module-kotlin: 2.17.1
Jackson-databind: 2.17.1
Additional context
No response
The text was updated successfully, but these errors were encountered: