Q: Why can't kapt kotlin generate var Set to query bean
See original GitHub issue@Entity
@Table(name = "sys_user")
open class SysUser {
var name: String? = null
@ManyToMany
var roles: Set<SysRole>? = null
@OneToOne
@JoinColumn(name = "job_id")
var job: SysJob? = null
}
@Generated("io.ebean.querybean.kotlin-generator")
@TypeQueryBean
class QSysUser : TQRootBean<SysUser, QSysUser> {
companion object {
/**
* shared 'Alias' instance used to provide
* properties to select and fetch clauses
*/
val _alias = QSysUser(true)
}
lateinit var name: PString<QSysUser>
lateinit var job: QAssocSysJob<QSysUser>
/**
* Construct with a given EbeanServer.
*/
constructor(server: EbeanServer) : super(SysUser::class.java, server)
/**
* Construct using the default EbeanServer.
*/
constructor() : super(SysUser::class.java)
/**
* Construct for Alias.
*/
private constructor(dummy: Boolean) : super(dummy)
}
lost roles in query bean
If I replace
var roles: Set < SysRole >? = null
for
val roles: Set < SysRole >? = null
It generates
lateinit var roles: QAssocSysRole<QSysUser>
Issue Analytics
- State:
- Created 4 years ago
- Comments:20 (13 by maintainers)
Top Results From Across the Web
Using kapt | Kotlin
The kotlin-kapt Gradle plugin can report statistics on the number of generated files for each annotation processor. This is useful to track if ......
Read more >Is there a convenient way to create Parcelable data classes in ...
Just click on the data keyword of your kotlin data class, then press alt+Enter, select the first option ...
Read more >Management & Monitoring - Micronaut Documentation
Using the Micronaut CLI you can create a new Micronaut application in either Groovy, Java, or Kotlin (the default is Java). The following...
Read more >Micronaut Data - GitHub Pages
Since Micronaut Data is a build time tool, it will not work correctly unless your ... that don't form part of the query...
Read more >Realm: Create reactive mobile apps in a fraction of the time
apply plugin: 'com.android.application' apply plugin: 'kotlin-kapt' apply plugin: ... getString("I don't exist") // Queries still work normally val persons ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes I see that just arrive, great thanks!!
If more people / organisations did that we could dedicate more time, get better documentation etc. Thanks for the donation!!
Cheers, Rob.
I donated $10 as a thank you. I really like your project and admire your work.