Data truncation: Truncated incorrect DOUBLE value错误的解决方案
Data truncation: Truncated incorrect DOUBLE value错误的解决方案:
当在修改某条单位记录时,发生了Data truncation: Truncated incorrect DOUBLE value错误,该如何解决:
步骤1:找到单位对应的实体对象的hbm配置文件,如unit.hbm.xml,person.hbm.xml
步骤2:把配置文件里的一对多的属性全部去掉,或者多对一的属性去掉,如
unit.hbm.xml去掉的内容如下:
<set name="persons">
<key>
<column name="unit"/>
</key>
<one-to-many class="com.cosl.po.Person"/>
</set>
<set name="userrelations">
<key>
<column name="cunit"/>
</key>
<one-to-many class="com.cosl.po.Userrelation"/>
</set>
person,hbm.xml去掉的内容如下:
<many-to-one
name="postgroup"
class="Postgroup" >
<column name="postgroup" />
</many-to-one>
<many-to-one
name="depart"
class="Depart" >
<column name="depart" />
</many-to-one>
以后台person对象为例,person的depart属性不为空,但id为null,故更新person时会出错。

给后台传值的person编辑界面

这样便可。
Data truncation: Truncated incorrect DOUBLE value错误的解决方案的更多相关文章
- Data truncation: Truncated incorrect DOUBLE value 解决方案
1.情况限制 此处的错误解决方案只讨论: 在使用Mybatis时,传入数组且使用<foreach>标签时出现此种报错: 2.报错案例 mapper.java /** * @Descript ...
- Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Truncated incorrect DOUBLE value: 'L
1.错误叙述性说明 [ERROR:]2015-06-08 09:49:42,523 [异常拦截] org.hibernate.exception.DataException: error execut ...
- Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Truncated incorrect DOUBLE value: 'L
1.错误描述 [ERROR:]2015-06-08 09:49:42,523 [异常拦截] org.hibernate.exception.DataException: error executing ...
- Error updating database. Cause: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Truncated incorrect DOUBLE value: 'as3'
执行更新时的出错信息 Whitelabel Error Page This application has no explicit mapping for /error, so you are see ...
- 异常-Data truncation: Truncated incorrect DOUBLE value: '-9370.3530-'
1详细异常日志 9/11/04 17:36:09 ERROR base.SQLHelper: Data truncation: Truncated incorrect DOUBLE value: '- ...
- com.mysql.jdbc.MysqlDataTruncation: Data truncation: Truncated incorrect DOUBLE value:...
在使用mybatis的@Update注解的时候,报了一个这样的错 ### Error updating database. Cause: com.mysql.jdbc.MysqlDataTruncat ...
- Data truncation: Truncated incorrect DOUBLE value:
在写sql查询语句queryRunner.update(connection,"update account set balance=? where name=?",account ...
- java.sql.SQLException: Data truncation: Truncated incorrect DOUBLE value
mysql 报这个异常:java.sql.SQLException: Data truncation: Truncated incorrect DOUBLE value update 表名 set c ...
- Truncated incorrect DOUBLE value错误
mysql报错:Truncated incorrect DOUBLE value sql的update语法错误eg: update Person set name = 'auhnayuiL' and ...
随机推荐
- AtCoder Beginner Contest 188题解
A 题意 问\(x,y\)相差是否小于\(3\) #include<iostream> #include<cstdio> #include<cmath> #defi ...
- 洛谷 P7516 - [省选联考 2021 A/B 卷] 图函数(Floyd)
洛谷题面传送门 一道需要发现一些简单的性质的中档题(不过可能这道题放在省选 D1T3 中偏简单了?) u1s1 现在已经是 \(1\text{s}\) \(10^9\) 的时代了吗?落伍了落伍了/ ...
- 关于 n 个 [0,1] 的随机变量第 k 小的期望值
今天做到一道题,感觉里面一个结论有点意思,就到网上扒了篇证明(bushi)下来了. 知乎回答习惯,先抛结论,再给证明(大雾 结论:对于 \(n\) 个取值范围为 \([0,1]\) 的随机变量 \(x ...
- 39-Remove Duplicates from Sorted Array
Remove Duplicates from Sorted Array My Submissions QuestionEditorial Solution Total Accepted: 127836 ...
- Git五个常见问题及解决方法
一.删除远程仓库上被忽略的文件 由于种种原因,一些本应该被忽略的文件被我们误操作提交到了远程仓库了.那么我们该怎么删除这些文件呢? 以误提交了.idea目录为例,我们可以通过下面的步骤处理: 1)我们 ...
- navicate连接Mysql5.7时,显示Access denied for user 'root'@'localhost' (using password: YES) 错误
最近新装了Mysql5.7,按如下设置好了允许远程连接 (1)找到mysql配置文件并修改 sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf 将bind-ad ...
- 转 关于HttpClient,HttpURLConnection,OkHttp的用法
转自:https://www.cnblogs.com/zp-uestc/p/10371012.html 1 HttpClient入门实例 1.1发送get请求 1 2 3 4 5 6 7 8 9 10 ...
- Advanced C++ | Conversion Operators
In C++, the programmer abstracts real world objects using classes as concrete types. Sometimes it is ...
- 大数据处理系列之(一)Java线程池使用
前言:最近在做分布式海量数据处理项目,使用到了java的线程池,所以搜集了一些资料对它的使用做了一下总结和探究, 前面介绍的东西大多都是从网上搜集整理而来.文中最核心的东西在于后面两节无界队列线程池和 ...
- RAC常见的宏
1. RAC 作用:用来给某个对象的某个属性绑定信号,只要产生信号内容就会把内容给属性赋值 RAC(_label, text) = _textField.ra ...