Repeated column in mapping for entity
分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.csdn.net/jiangjunshow
也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!
1、
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Initialization of bean failed; nested exception is org.hibernate.MappingException: Repeated column in mapping for entity: com.xindeco.myregister.pojo.MyRegisterInfo column: password (should be mapped with insert="false" update="false")
百分百配置文件 属性 错误
<property name="pensionNumber" type="string" column="50"></property>
本人 不小心 写成 column 了 应该是 length
出错原因:1、数据库的字段值和javaBean中的属性类型不统一。对于基本类型,要用wrapper类型而不是primitive类型。2、hibernate的配置文件xxx.hbm.xml中的属性配置不为空,而数据库中的字段却为空。3.两个字段对应同一列,如:password 和repassword同时对应数据库表中的password一列,同时update和insert都设为true。
xml文件如下:
<property name="password"
type="java.lang.String"
update="true"
insert="true"
access="property"
column="password"
length = "32"
/>
<property name="repassword"
type="java.lang.String"
update="false"
insert="false"
access="property"
column="password"
length = "32"
/>
解决的方法:
将repassword的insert和update设为false。
4:.hbm.xml的映射文件出错,具体字段出错,比如长度,或者少写,或者多写
给我老师的人工智能教程打call!http://blog.csdn.net/jiangjunshow
Repeated column in mapping for entity相关推荐
- MyEclipse如何复制项目、无法修改web-context-root问题解决办法/ Repeated column in mapping for entity
复制项目完了之后很怪 其中一大部分还是用的之前那个 我们复制完了之后要按照下面改: 1.MyEclipse无法修改web-context-root问题解决办法 定位到当前项目下的.settings文件 ...
- Repeated column in mapping for entity: cn.cnic.qlms.entity.User column: id (should be mapped with in
错误信息: 信息: Initializing Spring root WebApplicationContext [QLMS] ERROR [localhost-startStop-1] org.sp ...
- JPA:Repeated column in mapping for entity
坑:这个来自新建实体类(New-..JPA entities from tables) 大概会造成三种错误:一种是①标题这种,一种大意是②至少要有一个非只读的列(大意关键词non-read only, ...
- Hibernate的数据查找,添加!
1.首先看一下测试数据库的物理模型 2.测试所需要的Hibernate的jar包 3.数据库的sql /*=============================================== ...
- hibernate关联关系(一对多)
什么是关联(association) 关联指的是类之间的引用关系.如果类A与类B关联,那么被引用的类B将被定义为类A的属性.例如: class B{private String name;}publi ...
- Hibernate开发中常见错误总结
org.hibernate.MappingException: Unknown entity: cn.itcast.hibernate717.helloworld.Person hibernate框架 ...
- Hibernate面试题
2019独角兽企业重金招聘Python工程师标准>>> 什么是Hibernate的并发机制?怎么去处理并发问题? Hibernate并发机制: a.Hibernate的Session ...
- hibernater面试一
什么是Hibernate的并发机制?怎么去处理并发问题? Hibernate并发机制: a.Hibernate的Session对象是非线程安全的,对于单个请求,单个会话,单个的工作单元(即单个事务,单 ...
- zTree实现地市县三级级联报错(一)
zTree实现地市县三级级联 1.详细报错例如以下: java.lang.IllegalStateException: Failed to load ApplicationContextat org. ...
- 表删除时 Cannot delete or update a parent row: a foreign key constraint fails 异常处理
有两张表,结构如下: t_item: t_bid: id int id int name varchar name varchar item_id int 其中表t_item的主键id是表t_bid的 ...
最新文章
- Delphi XE5 常用功具与下载
- 使用OpenVINO加速Pytorch表情识别模型
- r语言 bsda包_使用R语言creditmodel包进行Vintage分析或留存率分析
- 【CentOS】磁盘管理与vim编译器
- Linux学习资料-万用字符与特殊符号
- 《应用软件安全编程指南》国标发布 奇安信代码卫士已全面支持
- Robo 可视化mongoDb的操作
- 山东理工大学计算机基础考试试题,山东理工大学计算机基础试题08
- spring boot集成redis
- [DAX] MIN函数 | MINX函数
- linux uvc协议_UVCCamera-master
- C++代码静态分析与优化(7)_vera++
- 腾讯企业 html邮件模板,python连接腾讯企业邮箱发送html邮件
- VTD解析XML( VTDGen、AutoPilot )
- MySQL 表分区 A PRIMARY KEY must include all columns in the table's partitioning function
- Hexo-零基础搭建个人博客(详解)
- selenium详细介绍
- 网络协议02 - Mac地址和IP地址
- asp.net+sqlserver固定资产管理系统系统c#项目
- 分析解决11gR2 双节点RAC环境下的gc cr block busy/gc buffer busy acquire等待
热门文章
- matlab函数grid,Matlab基本函数-grid、box函数
- 聚合支付、第四方支付有哪些平台?
- 【阿里云镜像】更新阿里巴巴开源镜像站镜像——Ubuntu镜像
- windows主机开启winrm端口powershell脚本
- 转帖:在北京5年艰辛快乐的创业经历
- java app远程调取摄像头_Java调用计算机摄像头照相(Rest API控制,方便远程拍照)...
- GitLab 注册 Runner Registering Runners
- word流程图两条线的端点连接_word流程图连接线怎么用
- WPS标题编号级别,根据上一级自动编号
- word中二级标题随一级标题自动编号