hibernate学习笔记
来源:互联网 发布:软件使用报告 编辑:程序博客网 时间:2024/06/03 09:53
1:org.hibernate.HibernateException: The database returned no natively generated identity value
要将id设为自增
2:mapping开头
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
configuration开头
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
3:org.hibernate.hql.ast.QuerySyntaxException is not mapped
因为 Hibernate是对类查询的
在hql="from contents;中,
contents是数据库中的表,而contents对应的类是Contents.java,现在只需要将contents改为Contents就可以了
4:org.hibernate.DuplicateMappingException: Duplicate class/entity mapping
重复配置
5:hibernate-mapping中的catalog是什么意思
1.编目.
编目就是在本地或远程建立客户端到服务器的数据库连接的目的。
2. catalog 属性.
假若指定了这个属性,表名会加上所指定的catalog的名字扩展为全限定名。假若没有指定,表名就不会使用全限定名。
- 【Hibernate学习笔记】hibernate入门
- Hibernate学习笔记:初识Hibernate
- Hibernate Synchronizer 学习笔记
- hibernate学习笔记1
- Hibernate 学习笔记
- Hibernate学习笔记
- Hibernate 学习笔记
- Hibernate 实例学习笔记
- Hibernate学习笔记(1)
- hibernate学习笔记
- Hibernate学习笔记(一)
- Hibernate学习笔记
- Hibernate学习笔记!- -
- Hibernate学习笔记(一)
- Hibernate学习笔记
- Hibernate 学习笔记
- Hibernate Synchronizer 学习笔记
- Hibernate 学习笔记
- js动态生成table 经典
- android sms 发送、接收及格式
- 会议讨论结果
- MySQL变量赋值需要注意其与Oracle的区别
- Clearcase find 命令使用手册
- hibernate学习笔记
- Linux下c++编程与kdevelop的环境配置
- ESX Server 常用命令介绍
- 一个是视频的,一个关于语音的,都是网上收集到的.源代码
- 深入剖析Linux中断机制之四---中断API
- 悬而未决:为什么Ubuntu中的PHP有GD模块,但却不支持imagecopyresized和imagecopyresampled?
- UNIX 高手的 20 个习惯
- 下载SAP-Approval list中的补丁
- 电脑i3 i5 i7 的超频