ebean-orm-tools / ebean-gradle-plugin

Plugin that performs Enhancement (entity, transactional, query bean) and can generate query beans from entity beans written in Kotlin via kapt
Apache License 2.0
10 stars 12 forks source link

kotlin.UninitializedPropertyAccessException: lateinit property name has not been initialized #5

Closed rbygrave closed 7 years ago

rbygrave commented 7 years ago

Gradle suite > Gradle test > org.example.domain.CustomerTest.save FAILED kotlin.UninitializedPropertyAccessException: lateinit property name has not been initialized at org.example.domain.query.QCustomer.getName(QCustomer.kt:27) at org.example.domain.CustomerTest.save(CustomerTest.kt:20)

rbygrave commented 7 years ago

So this is when we use Kotlin query beans with this gradle plugin.

The underlying issue here is with the query bean enhancement and dealing with kotlin query beans (using kotlin lateinit properties). There is a fix to the ebean-agent to fix this issue ... and using the updated agent will fix this plugin.

igorcavalcante commented 6 years ago

Hello, i have this problem, how can i use the updated agent?. Thank you

rbygrave commented 6 years ago

@igorcavalcante ... just use an updated version of the plugin - e.g. 10.2.3

Note that questions are better directed to the forum - https://groups.google.com/forum/#!forum/ebean ... more people watching that etc.

cheese-stands-alone commented 6 years ago

I am still having this issue with version 10.2.3. I created a sample project to recreate the issue. https://github.com/rwhite226/ebean-test