Annotation版本的hibernate
2010-10-17 15:15
274 查看
使用Annotation版本的hibernate
加载:
hibernate-annotations-3.4.0.GA/hibernate-annotations-3.4.0.GA/lib
|-ejb3-persistence.jar
|-hibernate-commons-annotations.jar
hibernate-annotations-3.4.0.GA/hibernate-annotations-3.4.0.GA
|-hibernate-annotations.jar
实体类
Hibernate.cfg.xml
<mapping class="com.kevin.hibernate.model.Teacher"/>
加载:
hibernate-annotations-3.4.0.GA/hibernate-annotations-3.4.0.GA/lib
|-ejb3-persistence.jar
|-hibernate-commons-annotations.jar
hibernate-annotations-3.4.0.GA/hibernate-annotations-3.4.0.GA
|-hibernate-annotations.jar
实体类
package com.kevin.hibernate.model; import javax.persistence.Entity; import javax.persistence.Id; @Entity public class Teacher { private int id; private String name; private String title; @Id public int getId() { return id; } public void setId(int id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } } |
<mapping class="com.kevin.hibernate.model.Teacher"/>
相关文章推荐
- Hibernate(annotation版本helloworld)-2
- 笔记——Annotation 注解(hibernate3版本)
- 关于hibernate4.3.8final版本(annotation)注解问题 相当的bug啊 求大神指点迷津
- Hibernate---第一个helloworld程序 (XML版本, annotation版本)
- hibernate3.3.2学习笔记---Annotation版本的HelloWorld及org.hibernate.HibernateException错误改正
- hibernate源码下载地址及对应hibernate-annotation、slf4j版本
- hibernate与annotation版本配合问题
- 完整的简单的Annotation版本的hibernate
- Hibernate的关系映射总结annotation版本
- 老版本hibernate-core和hibernate-annotation版本的对应关系,Hibernate Compatibility Matrix
- Hibernate 中创建Annotation版本的HelloWorld
- Hibernate的Annotation版本的HelloWorld
- 建立 Annotation版本的hibernate小例子
- hibernate 建立annotation版本的helloworld
- 003:hibernate:Annotation版本的Helloworld
- 映射实体类联系---一对一单向外键映射(Annotation版本)
- 基于按annotation的hibernate主键生成策略
- Annotation(二)——Hibernate中注解的开发
- hibernate-annotation CascadeType.PERSIST不起作用的解决方法
- 特别注意hibernate4缓存的配置版本问题