-
Notifications
You must be signed in to change notification settings - Fork 683
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
UnsupportedOperationException: No accessor to set property for Kotlin data classes using parametrized types #2336
Comments
That's present since spring-data-commons-2.4.6. In my case this was about collection of enums in the data class entity. |
The issue is caused by our copy method resolution which considers the component type in assignability checks while the synthetic copy method resolves to a different type than the Kotlin |
Caused by #2324. |
Sorry for the inconvenience. We fixed the issue and our CI deployed |
My test case is passing when i use spring-data-commons-2.4.7-SNAPSHOT. Thanks for fixing. |
Using Spring Data Commons 2.5.0-SNAPSHOT my app also works again. |
In my case, it only passed when I added Jackson in my build.gradle: com.fasterxml.jackson.module:jackson-module-kotlin |
To reproduce:
Create an entity using a Kotlin data class:
Trying to save an instance with null id will crash:
Changing field to
Map<String, String>
makes the bug disappear. Downgrading to Spring Boot 2.4.3 also removes the exception.A minimal project reproducing the bug can be found here: https://github.com/pkubowicz/spring-data-id-accessor
The text was updated successfully, but these errors were encountered: