Closed hajdamak closed 3 months ago
If you would like us to spend some time helping you to diagnose the problem, please spend some time describing it and, ideally, providing a minimal yet complete sample that reproduces the problem. You can share it with us by pushing it to a separate repository on GitHub or by zipping it up and attaching it to this issue.
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
@mp911de Hi, here is minimal reproducible example: sdj-kotlin-value
Just run it with mvn spring-boot:run
and it will log exception.
If you remove value class (val emailAddress: EmailAddress
) from Contact
DTO it will start just fine.
@schauder For a reason, JdbcMappingContext.createPersistentEntity(…)
checks constructor parameter names. This is at odds with the rest of Spring Data. Can we remove this check?
On one hand: git blame says it was introduced by @odrotbohm for performance reasons, so the harm in removing it would be limited. I don't even understand how this improves performance, except when on considers time until eventual failure.
On the other hand: Wouldn't it fail later on anyway, since we do need the names?
Not necessarily as we have multiple instantiators that understand the Kotlin-specifics. For the parameter in question, DefaultConstructorMarker
, the parameter is in the bytecode so it needs to be considered. However, the Kotlin-specific instantiator statically provides a null
value to provide a value into the creation process.
Ok, I'll take the check out.
@schauder @mp911de Thanks.
Although #1093 suggest otherwise following code fails on 3.2.4:
with: