mysql 中的 INT(10) unsigned 最大限制为 4b+,当与行的 getLong 一起使用时,它会引发以下错误:
java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long
at com.github.jasync.sql.db.RowData$DefaultImpls.getLong(RowData.kt:48) ~[jasync-common-0.9.23.jar:?]
at com.github.jasync.sql.db.general.ArrayRowData.getLong(ArrayRowData.kt:5) ~[jasync-common-0.9.23.jar:?]
at com.richdevt.hthookserver.repository.ProjectRepository.findProjectEnvironment(ProjectRepository.kt:29) ~[classes/:?]
at com.richdevt.hthookserver.repository.ProjectRepository$findProjectEnvironment$3.invokeSuspend(ProjectRepository.kt) ~[classes/:?]
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:32) [kotlin-stdlib-1.3.21.jar:1.3.21-release-158 (1.3.21)]
at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:233) [kotlinx-coroutines-core-1.1.1.jar:?]
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute$$$capture(AbstractEventExecutor.java:163) [netty-common-4.1.33.Final.jar:4.1.33.Final]
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java) [netty-common-4.1.33.Final.jar:4.1.33.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404) [netty-common-4.1.33.Final.jar:4.1.33.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:495) [netty-transport-4.1.33.Final.jar:4.1.33.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:905) [netty-common-4.1.33.Final.jar:4.1.33.Final]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [netty-common-4.1.33.Final.jar:4.1.33.Final]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_152
为什么不能转换?