postgresql - Jooq kotlin 枚举类型
问题描述
kotlin 中有没有办法让枚举类扩展 Jooq 的EnumType
?
我得到一个编译错误,因为 EnumType 有一个抽象的 getName 方法,Kotlin 枚举类也是如此。
Error:(96, 5) Kotlin: Inherited platform declarations clash: The following declarations have the same JVM signature (getName()Ljava/lang/String;):
fun <get-name>(): String defined in com.xyz.MyEnum.Val1
fun getName(): String defined in com.xyz.MyEnum.Val1
如果我使用常规的 Kotlin 类而不是 enum 类,那么 Jooq 会失败并出现错误:
Error while looking up Scala enum
ClassNotFoundException ...
Jooq + Kotlin + Postgresql Enums 能很好地发挥作用吗?
解决方案
推荐阅读
- webpack - 如何使用文件加载器在 next.js 中加载 SVG 图像?
- python - 如何在保存到磁盘之前更改 Scrapy 抓取的网页的一部分?
- flutter - 无法在颤动中添加垂直线
- celery - 等待 celery 组中的所有任务完成或出错
- javascript - FCM 发送一批消息(设备组)
- javascript - 尝试使用 forEach 方法转换数组中的单词并将它们输出到页面上,但每个条目都会覆盖前一个条目?
- java - Swing GridBagLayout:将第二行的按钮居中
- javascript - 在 javascript 的文本中显示用户名和密码值
- c - 如何在不丢弃旧记忆的情况下使用 realloc 功能
- node.js - 社交媒体处理程序的猫鼬模式模型(如何)