当我把id字段升级为 uuid时 查询 报错
未升级之前是正常的
报错信息如下
Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed;
nested exception is org.springframework.dao.DataIntegrityViolationException: Error attempting to get column 'id' from result set.
Cause: java.sql.SQLDataException: Cannot determine value type from string '4872a00615cd9a78ff39f87cd9141f17';
Cannot determine value type from string '4872a00615cd9a78ff39f87cd9141f17';
nested exception is java.sql.SQLDataException: Cannot determine value type from string '4872a00615cd9a78ff39f87cd9141f17'] with root cause
com.mysql.cj.exceptions.DataConversionException: Cannot determine value type from string '4872a00615cd9a78ff39f87cd9141f17'
xml结果映射
评论说实体类id类型没改 补图:
这里统一回复一下,实体类都是没问题的,有构造,使用了lombok插件
我所知道的可能的情况:
1、实体类字段类型是否正确?id 字段是否为 String 字符串类型
2、实体类是否有有参构造,没有无参构造器
如果我的回答对您有用,还望采纳。
您的采纳就是对我最大的鼓励与感谢。
你确定实体类改了?
看下你实体类id的字段类型
以下答案引用自GPT-3大模型,请合理使用:
```
```