![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
hibernate
nieshuangyan
前端开发 Java开发
展开
-
hibernate5 报错org.hibernate.boot.MappingException: Association [XX] references an unmapped entity
1 具体报错:Caused by: org.hibernate.boot.MappingException: Association [cn.com.pojo.bbs.TBasHousePrivate.topics] references an unmapped entity [cn.com.pojo.bbs.TBasHousePrivate.topics] : origin(cn/com/pojo原创 2017-11-07 17:32:30 · 1917 阅读 · 0 评论 -
com.microsoft.sqlserver.jdbc.SQLServerException: 对象名 'bbs_category' 无效
1 错误描述:今天把本地写好的功能发布到服务器tomcat中,本地运行正常,但运行报错 com.microsoft.sqlserver.jdbc.SQLServerException: 对象名 ‘bbs_topic’ 无效。SEVERE: Servlet.service() for servlet [springmvc] in context with path [] threw exceptio原创 2017-11-14 13:36:42 · 7035 阅读 · 0 评论 -
hibernate执行插入时候报错SQLServerException: 当 IDENTITY_INSERT 设置为 OFF 时,不能为表 'T_WY_KFUSER' 中的标识列插入显式值
1 报错描述:spring 、springmvc、hibernate整合框架中执行this.getHibernateTemplate().save(entity);时候报错Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: 当 IDENTITY_INSERT 设置为 OFF 时,不能为表 'T_WY_KFUSER' 中的标识列插入显原创 2017-11-18 15:35:18 · 4189 阅读 · 0 评论 -
eclipse使用hibernate tools插件错误org.hibernate.console.HibernateConsoleRuntimeException:
1 错误描述:org.hibernate.console.HibernateConsoleRuntimeException: Received a NoClassDefFoundError, probably the console configuration classpath is incomplete or contains conflicting versions of the same c原创 2017-11-17 15:34:46 · 2228 阅读 · 0 评论 -
eclipse使用hibernate tools插件生成mysql数据表的pojo
参考文章:http://www.cnblogs.com/mrsui/archive/2013/06/20/3146335.html本文环境:eclipse4.4.0+hibernate4.1+hibernate tools4.0.1+mysql5.71 安装hibernate tools插件:help -> Eclipse Marketplace 注:eclipse会搜索出适合该版本eclipse原创 2017-11-01 16:46:47 · 581 阅读 · 0 评论 -
hibernate4.x自动建表时候创建外键失败ERROR: HHH000389: Unsuccessful: alter table ORDERS_NOPK1 add index
1 错误描述:场景:hibernate 自动建立非主键多对一关联时候ERROR: HHH000389: Unsuccessful: alter table ORDERS_NOPK1 add index FK_590egrftni5wpw63w6fcc1atx (CUSTOMER_ID), add constraint FK_590egrftni5wpw63w6fcc1atx foreign key原创 2017-11-09 11:11:42 · 2614 阅读 · 0 评论 -
hibernate4.x 报错org.hibernate.TransientPropertyValueException: Not-null property references a
1 错误描述:hibernate4.x创建多对一关系报错 org.hibernate.TransientPropertyValueException: Not-null property references a transient value - transient instance must be saved before current operation: cn.com.pojo.n21.原创 2017-11-09 11:26:19 · 2015 阅读 · 0 评论 -
hibernate5 报错com.microsoft.sqlserver.jdbc.SQLServerException: 列名 XX 无效。
今天使用hibernateTemplate.executeWithNativeSession执行sql查询语句把结果转换成实体时候,发现除了第一页请求查询正常,请求其他页面时候报错com.microsoft.sqlserver.jdbc.SQLServerException: 列名 id 无效1 错误描述:2 报错出现场景:使用hibernateTemplate.executeWithNativeS原创 2017-11-07 18:18:25 · 8318 阅读 · 0 评论 -
hibernate5 报错org.hibernate.boot.MappingNotFoundException: Mapping (RESOURCE) not found
1 具体报错:Caused by: org.hibernate.boot.MappingNotFoundException: Mapping (RESOURCE) not found : cn/com/pojo/bbs/TBasHousePrivate.hbm.xml : origin(cn/com/pojo/bbs/TBasHousePrivate.hbm.xml)XX.cfg.xml映射文件不存原创 2017-11-07 17:36:11 · 7840 阅读 · 0 评论 -
hibernate实现非主键映射外键双向多对一关系
1 many-to-one多对一端加property-ref关联主表的java对应类外键属性:注:property-ref对应的是java类属性,不是表的字段Order.hbm.xml<?xml version="1.0"?><!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN""http:原创 2017-11-14 15:34:18 · 1037 阅读 · 0 评论