Hibernate 继承映射可能会遇到的错误
问题:
我们在配置hibernate的时候,默认是会配置下面的两个属性的
<property name="hibernate.default_catalog">hibernate</property>
<property name="hibernate.default_schema">test</property>
但是问题来了,在使用hibernate处理继承关系的时候,出现
WARN: SQL Error: 1064, SQLState: 42000:
Could not instantiate persister org.hibernate.persister.entity.JoinedSubclassEntityPersister:
解决办法:
注释掉上面两个无用的配置 :
Hibernate 继承映射可能会遇到的错误的更多相关文章
- 【JavaEE】Hibernate继承映射,不用多态查询只查父表的方法
几个月前,我在博问里面发了一个问题:http://q.cnblogs.com/q/64900/,但是一直没有找到好的答案,关闭问题以后才自己解决了,在这里分享一下. 首先我重复一下场景,博问里面举的动 ...
- hibernate 继承映射关系( SINGLE_TABLE)
三种继承映射关系. 1,SINGLE_TABLE person student teacher 在一个表中,student和teacher继承自person,通过一个Discriminato ...
- Hibernate继承映射(@Inheritance)
继承映射在 Annotation 中使用 @Inheritance 注解,并且需要使用 strategy 属性指定继承策略,继承策略有 SINGLE_TABLE.TABLE_PER_CLASS 和 J ...
- SSH开发实践part3:hibernate继承映射
0 大家好.上次讲了关于hibernate中双向1-N的映射配置,可以参考:http://www.cnblogs.com/souvenir/p/3784510.html 实际项目中,对象间的关系比较复 ...
- Hibernate继承映射
在面向对象的程序领域中,类与类之间是有继承关系的,例如Java世界中只需要extends关键字就可以确定这两个类的父子关系,但是在关系数据库的世界中,表与表之间没有任何关键字可以明确指明这两张表的父子 ...
- web进修之—Hibernate 继承映射(5)
先看三个类的继承关系,Payment是父类,CashPayment和CreditCardPayment是Payment的子类: view plaincopy to clipboardprint p ...
- hibernate 继承映射关系( JOINED)
一个主表,其他的表每个都有自己的表来装填自己特有的部分,共同的部分就放在主表中. package com.bjsxt.hibernate; import javax.persistence.Ent ...
- hibernate 继承映射关系( TABLE_PER_CLASS)
Person,Student,Teacher各创建一个表,主键用一个中间表生成. package com.bjsxt.hibernate; import javax.persistence.Ent ...
- Hibernate 继承映射
@Entity@Inheritance(strategy=InheritanceType.SINGLE_TABLE)@DiscriminatorColumn()public class Animal ...
随机推荐
- (2)struts2配置祥解
struts工作流程 反射 : 1.构造对象使用构造器 //类似为Servlet public class AddAction { public AddAction(){ System.out.pri ...
- 部署asp.net网站的小问题
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG web.config 修改 trust level="Full"
- 写xml时候的一个坑
<DOCTYPE scores[]>这一行总是显示错误,折腾了一晚上,后来无意错误在于:<!ELEMENT scores(student+)>应该写成:<!ELEMENT ...
- 使用C语言解析URL
1. [代码]容易写成自己输入URL,这里测试一个例子 #include <stdio.h>#include <stdlib.h>#include <string ...
- ios图片瀑布流代码
ios瀑布流,实现简单的瀑布流视图布局,可以显示网络图片,下拉刷新,上拉加载更多. 下载:http://www.huiyi8.com/sc/9087.html
- tensorflow 实现逻辑回归——原以为TensorFlow不擅长做线性回归或者逻辑回归,原来是这么简单哇!
实现的是预测 低 出生 体重 的 概率.尼克·麦克卢尔(Nick McClure). TensorFlow机器学习实战指南 (智能系统与技术丛书) (Kindle 位置 1060-1061). Kin ...
- python做图笔记
1. 工具选择 了解了基本python,rodeo,anaconda套件这三种工具. (1)基本python,下载安装python的最新版(目前是python3.7).注意要使用安装版.安装好后,一般 ...
- MFC模态对话框程序不响应OnIdle
从代码分析原因吧: OnIdle函数在MFC的CWinThread::Run函数中被调用,如下 // main running routine until thread exits int CWinT ...
- 集训Day2
雅礼集训2017Day2 T1 给你一个水箱,水箱里有n-1个挡板,水遵循物理定律 给你m个条件,表示第i个格子上面y+1高度的地方有或没有水 现在给你无限的水从任意地方往下倒,问最多满足多少条件 n ...
- CodeForces - 697F:Legen... (AC自动机+矩阵)
Barney was hanging out with Nora for a while and now he thinks he may have feelings for her. Barney ...