今天我用hibernate连数据库的时候。抛出异常:
[color=red]08:59:40,796 [main] ERROR JDBCExceptionReporter : Unknown type '246 in column 4 of 5 in binary-encoded result set.
08:59:40,796 [main] INFO DefaultLoadEventListener : Error performing load command[/color]
开始以为是我的Hibernate的配置文件有问题。结构找了半天是数据库中表字段decimal 的问题。
也不知道是mysql的decimal字段有BUG,
还是mysql的驱动问题。
我把decimal 类型改成 double 类型就好了。
如果高手路过,还望指教。
[color=red]08:59:40,796 [main] ERROR JDBCExceptionReporter : Unknown type '246 in column 4 of 5 in binary-encoded result set.
08:59:40,796 [main] INFO DefaultLoadEventListener : Error performing load command[/color]
开始以为是我的Hibernate的配置文件有问题。结构找了半天是数据库中表字段decimal 的问题。
也不知道是mysql的decimal字段有BUG,
还是mysql的驱动问题。
我把decimal 类型改成 double 类型就好了。
如果高手路过,还望指教。