-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[3.2.0-M5] UnsupportedOperationException in Kotlin for @Version, @CreatedDate, @LastModifiedDate, #3599
Comments
@mp911de I saw spring-projects/spring-data-commons#2324. Maybe my issue is caused because I actually have:
|
We had recently a change in |
I wasn't able to reproduce the issue given both variants. I used the following data classes:
|
@mp911de You have |
Annotations don't impact the generation of the property accessor. Can you provide a minimal sample? It should only require something like this:
to verify whether the |
@mp911de I tried to strip down a simple testcase. Now it's too simple and the issue is gone. I'll come back on Sunday or Monday. |
@mp911de I have a testcase attached. When you run I had no idea how to elaborate your sketch above because I don't know the semantics of e.g. MappingContext and the various Accessor classes. |
That's a duplicate of spring-projects/spring-data-commons#2336. Let's move the discussion to the Commons ticket. The issue is caused by a non-symmetric generics erasure where the Kotlin type (from its primary constructor) resolves to |
@mp911de Confirmed. When I use Spring Data Commons |
After upgrading from 3.2.0-M4 to 3.2.0-M5 I get the stacktrace below. I'm using Kotlin 1.4.31 and basically have an entity resp. Kotlin data class like this:
Using 3.2.0-M5 I have to change all annotated props from
val
tovar
. Otherwise I get this stacktrace during insertion for @Version, @CreatedDate and @LastModifiedDate:The text was updated successfully, but these errors were encountered: