torpedoquery icon indicating copy to clipboard operation
torpedoquery copied to clipboard

(Kotlin) Can classes be final?

Open egslava opened this issue 7 years ago • 1 comments

Hi! I'm trying to use your library. Syntax is very comfortable, but it's a bit hard to use with Kotlin language. My code:

data class Player(
    var id: Long? = null,
    var title: String? = null,
    var date: Date? = null
)

In Kotlin you can use data classes. But in this case classes are final. So I can't use data classes:

Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: ru.egslava.db.hbm.Player is final at org.torpedoquery.jpa.Torpedo.from(Torpedo.java:124)

Is it fixable? :-)

Thank you for the great library! :-)

egslava avatar Jul 14 '16 16:07 egslava

for now isn't supported but maybe in the future if I replace javassist by bytebuddy

xjodoin avatar Jul 18 '16 17:07 xjodoin