问题描述
在公开的Kotlin中,我有一个这样的IntIdTable:
object UserTable : IntIdTable("user","id") {
override val id: Column<EntityID<Int>>
get() = super.id
val name = varchar("name",128)
val activeFlg = integer("active_flg")
...
}
因此,我调用从测试表中获取所有记录的事务,其具有这样的排除ID:
fun getAllWithExcludeIds(excludeIds: List<Int>): List<User> {
return transaction {
UserTable
.select { UserTable.id notinList excludeIds }
}
}
然后我遇到类型匹配错误:
Type mismatch.
required:
EntityID<Int>
Found:
Int
如何选择ID在指定的excludeIds列表之外的用户列表?谢谢!
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)