Hibernate学习笔记
1、The Session internals consist of a queue of SQL statements that need to be synchronized with the database at some point and a map of managed persistenceinstances that are monitored by the Session.)
2、JPA, JTA
3、开源工具:OpenJPA, HSQLDB, Zmanda
4、Hibernate配置文件
命名规则:Classname.hbm.xml,一般放在和Class一个文件夹下
文件格式:
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE hibernate-mapping PUBLIC"-//Hibernate/Hibernate Mapping DTD//EN""http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
......
</hibernate-mapping>
5、Hibernate的主键生成策略
- incresement
举例:
<class name="hello.Message" table="MESSAGES">
<id name="id" column="MESSAGE_ID">
<generator class="increment" />
</id>
</class>
To be continued...
posted on 2011-03-07 11:58 Eason Jiang 阅读(223) 评论(0) 编辑 收藏 举报