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
Properties with type of Kotlin inline class has mangled name. [DATAGRAPH-1330] #1891
Comments
Michael Simons commented While this request here wouldn't work with pure OGM at the moment, the issue experience here is not a Spring Data Neo4j issue. The exception happens in Spring Data Commons while parsing the property path. I would like to drag Mark into this and let him decide if that is something VMWare wants to support or not |
Michael Simons commented For reference, here's a stack trace
|
Mark Paluch commented Kotlin synthesizes property accessors such as:
Another issue is that there's no public all args constructor as Kotlin creates only a no-arg constructor, the all-arg constructor is made private:
That being said, the design of Kotlin inline classes regarding JVM library interoperability is broken by design and I don't see how we can fix it from a Spring perspective. I attached a decompiled variant of the user class |
So it seems that we cannot do much here and therefore we are gonna close this ticket. |
Corneil du Plessis opened DATAGRAPH-1330 and commented
I wanted to use an ``inline class` for the type of an Id to ensure I avoid using a non ID property in a query or when comparing etc.
Kotlin mangles the name of the property when it's type is an inline class an
@Property
doesn't seem to take effect.https://github.com/corneil/demo-inline-class-property-bug
No property userId-kArDf24 found for type User!
Do I need a converter for the inline class when the property is found?
Attachments:
Issue Links:
1 votes, 4 watchers
The text was updated successfully, but these errors were encountered: