-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Issue with AOT and Kotlin data class: The following must be non-sealed interfaces #4351
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
@fab918 thank you for reporting ! |
@christophstrobl thanks for your quick answer! I noticed a strange thing, if the lazy is an object of type Tags, there is no problem, however if it is a list it is a problem. @Document
data class Article(
@Id var id: String = ObjectId.get().toString(),
// @DBRef(lazy = true) var topic: Tags // This works
@DBRef(lazy = true) var tags: List<Tags> = emptyList(), // This produce the AOT error
) |
Thanks for the reproducer. I need to have a deeper look at this. |
I am surprised to be the first to encounter the issue, if you need anything don't hesitate to ask! FYI, I tried to convert both entities and the Application class to Java, and the problem still occurs. However, if the project is a full Java project (I'm attaching it), in this case there is no problem. I hope this will give you a clue about the cause. |
Thanks for the reproducer! It looks like the type resolution needs a little filtering when collecting the types for the proxy signature. |
ok, so there's even more hidden once the AOT compilation step is fixed. required
generated
|
Great! Thank you for your work! |
When I add the gradle AOT plugin
id("org.graalvm.buildtools.native")
I have an error on a simpledata class
document fromorg.springframework.data.mongodb.aot.LazyLoadingProxyAotProcessor
:The Tags class is a simple data class:
Here is the gradle.kts plugin file, note that to use dataclass with spring data mongodb, you already have to open these classes with
allOpen
, I guess it is probably related.The text was updated successfully, but these errors were encountered: