You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 15, 2024. It is now read-only.
@org.ktorm.ksp.api.Table("test")
interface TestOperator: org.ktorm.entity.Entity<TestOperator> {
@org.ktorm.ksp.api.PrimaryKey
var id: Long
var operator: String
}
自动生成的代码
@Suppress("FunctionName")
public fun TestOperator(id: Long? = undefined(), operator_: String = undefined()): TestOperator {
val entity = Entity.create<TestOperator>()
if (id !== undefined<Long?>()) {
entity.id = id ?: error("`entity` should not be null.")
}
if (operator !== undefined<String>()) {
entity.operator = operator
}
return entity
}
public fun TestOperator.copy(id: Long? = undefined(), operator_: String = undefined()):
TestOperator {
val entity = this.copy()
if (id !== undefined<Long?>()) {
entity.id = id ?: error("`entity` should not be null.")
}
if (operator !== undefined<String>()) {
entity.operator = operator
}
return entity
}
operator 在参数上自动加了个下划线,但是下面使用的时候没加 导致编译失败
使用实体类形式可以编译成功
The text was updated successfully, but these errors were encountered:
ktorm-ksp version: 1.0.0-RC3
ktorm version: 3.5.0
code
自动生成的代码
operator
在参数上自动加了个下划线,但是下面使用的时候没加 导致编译失败使用实体类形式可以编译成功
The text was updated successfully, but these errors were encountered: