Join Slack
Powered by
Hi, I have a field named: isPrivatePerson: Boolean...
# server
a
Andrzej Sawoniewicz
07/01/2022, 4:13 PM
Hi, I have a field named: isPrivatePerson: Boolean? in my data class. The JDBI has a problem with it because it cannot find the getter starting with "get". Is there any solution for that besides adding the separated getter and setter manualy?
s
Shawn
07/01/2022, 4:38 PM
Annotate the field with this:
@get:JvmName("getIsPrivatePerson")
or whatever you’d like
❤️ 1
Shawn
07/01/2022, 4:39 PM
taken from here:
https://kotlinlang.org/docs/java-to-kotlin-interop.html#handling-signature-clashes-with-jvmname
a
Andrzej Sawoniewicz
07/01/2022, 5:44 PM
Awesome, thank you!
👍 1
Open in Slack
Previous
Next