日志文章列表

2007年10月09日 23:51:09

hibernate 标识符生成策略

表示符生成策略描述increment适用于逻辑主键.由hibernate自动以递增方式生成.identity适用于逻辑主键.由底层数据库生成标识符.sequence适用于逻辑主键.hibernate根据底层数据库的序列生成标识符,这要求底层数据库支..

阅读全文>>

类别: hibernate |  评论(0) |  浏览(946) |  收藏
2007年10月09日 23:15:55

hibernate 映射文件结构

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/h..

阅读全文>>

Tags: hibernate   映射文件  

类别: hibernate |  评论(0) |  浏览(918) |  收藏
2007年10月09日 21:55:13

hibernate 的组成部分

1>创建持久化类.
2>创建对象关系映射文件.
3>创建hibernate配置文件.
4>创建持久化数据方法.

阅读全文>>

Tags: hibernate   组成部分  

类别: hibernate |  评论(0) |  浏览(965) |  收藏
2007年10月09日 19:33:53

hibernate 配置多个数据库的解决方案

第一步:建立两个hibernate.cfg.xml配置文件,取名test1.cfg.xml,test2.cfg.xml
第二步:修改原来的Configuration cfg = new Configuration().configure();
      为:Configuration cfg1 = new Co..

阅读全文>>

类别: hibernate |  评论(0) |  浏览(1122) |  收藏
2007年10月09日 10:29:28

hibernate 基本映射类型

Hibernate类型Java类型标准SQL类型大小integer/intInteger/intinteger4bytelongLong/longbigint8shortShort/shortsmallint2byteByte/bytetinyint1floatFloat/floatfloat4doubleDouble/doubledouble8big_decimalBig..

阅读全文>>

Tags: hibernate  

类别: hibernate |  评论(0) |  浏览(920) |  收藏
2007年10月09日 09:56:20

hibernate 持久化类的创建

package com.stu.bean;
import java.util.Set;
public class GradeBean {
private Long id;

private String name;

private Set students;
public Long getId() {
return id;
}
public void setId(Long..

阅读全文>>

Tags: hibernate   持久化类  

类别: hibernate |  评论(0) |  浏览(874) |  收藏
2007年10月09日 09:21:50

log4j 属性文件

#-----------------console log ------------------------
log4j.rootLogger=INFO,stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout..

阅读全文>>

Tags: hibernate   log4j   属性文件  

类别: hibernate |  评论(0) |  浏览(896) |  收藏
2007年10月09日 09:17:32

hibernate.cfg.xml 配置文件

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourc..

阅读全文>>

Tags: hibernate   配置文件  

类别: hibernate |  评论(0) |  浏览(1444) |  收藏
2007年03月21日 17:35:52

从头到脚跟你解释什么是Hibernate - -

Hibernate是一个免费的开源Java包,它使得与关系数据库打交道变得十分轻松,就像您的数据库中包含每天使用的普通Java对象一样,同时不必考虑如何把它们从神秘的数据库表中取出(或放回到数据库表中)。它解放了您,..

阅读全文>>

类别: hibernate |  评论(0) |  浏览(1849) |  收藏