文件名称:15hibernate_day04_pm_v1
- 所属分类:
- JSP源码/Java
- 资源属性:
- [Java] [源码]
- 上传时间:
- 2013-08-13
- 文件大小:
- 401kb
- 下载次数:
- 0次
- 提 供 者:
- 说*
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
如何使用Myeclipse生成映射文件和实体类?
映射文件和实体类《=== ===》DB
1)如何根据DB生成实体类和映射文件
=========利用Myeclipse追加Hibernate框架========
a.先在DB Browser窗口建立一个与数据库的连接
b.新建一个工程,点工程名右键-->Myeclipse-->Add Hibernate....
c.选择Hibernate框架版本
d.生成Hibernate.cfg.xml文件
e.设置Hibernate.cfg.xml连接参数
f.生成HibernateSessionFactory工具类(HibernateUtil)
===利用Myeclipse根据表生成实体类和映射文件===
g.进入DB Browser窗口,找到数据表
h.数据表右键,选择Hibernate reverse Engin...
i.选择要生成的文件hbm.xml,POJO,DAO(一般不选)
j.选择映射类型,一般选择Hibernate Types
k.点表名可以设置实体类名和主键生成方法
l.完成-How to use Myeclipse generate a map file and the entity class?
Mapping file and entity class "=========" DB
1) How to generate entity classes based on DB and mapping files
Myeclipse additional use Hibernate fr a mework ========= ========
a. first in the DB Browser window to establish a connection to the database
b. a new project, the project name right point-> Myeclipse-> Add Hibernate ....
c. Select the Hibernate fr a mework version
d. generating Hibernate.cfg.xml file
e. Setting Hibernate.cfg.xml connection parameters
f. generate HibernateSessionFactory tools (HibernateUtil)
映射文件和实体类《=== ===》DB
1)如何根据DB生成实体类和映射文件
=========利用Myeclipse追加Hibernate框架========
a.先在DB Browser窗口建立一个与数据库的连接
b.新建一个工程,点工程名右键-->Myeclipse-->Add Hibernate....
c.选择Hibernate框架版本
d.生成Hibernate.cfg.xml文件
e.设置Hibernate.cfg.xml连接参数
f.生成HibernateSessionFactory工具类(HibernateUtil)
===利用Myeclipse根据表生成实体类和映射文件===
g.进入DB Browser窗口,找到数据表
h.数据表右键,选择Hibernate reverse Engin...
i.选择要生成的文件hbm.xml,POJO,DAO(一般不选)
j.选择映射类型,一般选择Hibernate Types
k.点表名可以设置实体类名和主键生成方法
l.完成-How to use Myeclipse generate a map file and the entity class?
Mapping file and entity class "=========" DB
1) How to generate entity classes based on DB and mapping files
Myeclipse additional use Hibernate fr a mework ========= ========
a. first in the DB Browser window to establish a connection to the database
b. a new project, the project name right point-> Myeclipse-> Add Hibernate ....
c. Select the Hibernate fr a mework version
d. generating Hibernate.cfg.xml file
e. Setting Hibernate.cfg.xml connection parameters
f. generate HibernateSessionFactory tools (HibernateUtil)
(系统自动生成,下载前可以参看下载内容)
下载文件列表
hibernate04
...........\.classpath
...........\.myeclipse
...........\.myhibernatedata
...........\.mymetadata
...........\.project
...........\hibernate.reveng.xml
...........\hibernate_04.txt
...........\src
...........\...\hibernate.cfg.xml
...........\...\tarena
...........\...\......\dao
...........\...\......\entity
...........\...\......\......\Category.hbm.xml
...........\...\......\......\Category.java
...........\...\......\......\Product.hbm.xml
...........\...\......\......\Product.java
...........\...\......\......\Project.hbm.xml
...........\...\......\......\Project.java
...........\...\......\test
...........\...\......\....\TestJunit.java
...........\...\......\....\TestManyToMany.java
...........\...\......\....\TestProject.java
...........\...\......\util
...........\...\......\....\HibernateSessionFactory.java
...........\WebRoot
...........\.......\index.jsp
...........\.......\META-INF
...........\.......\........\MANIFEST.MF
...........\.......\WEB-INF
...........\.......\.......\classes
...........\.......\.......\.......\hibernate.cfg.xml
...........\.......\.......\.......\tarena
...........\.......\.......\.......\......\dao
...........\.......\.......\.......\......\entity
...........\.......\.......\.......\......\......\Category.class
...........\.......\.......\.......\......\......\Category.hbm.xml
...........\.......\.......\.......\......\......\Product.class
...........\.......\.......\.......\......\......\Product.hbm.xml
...........\.......\.......\.......\......\......\Project.class
...........\.......\.......\.......\......\......\Project.hbm.xml
...........\.......\.......\.......\......\test
...........\.......\.......\.......\......\....\TestJunit.class
...........\.......\.......\.......\......\....\TestManyToMany.class
...........\.......\.......\.......\......\....\TestProject.class
...........\.......\.......\.......\......\util
...........\.......\.......\.......\......\....\HibernateSessionFactory.class
...........\.......\.......\lib
...........\.......\.......\...\mysqldriver.jar
...........\.......\.......\web.xml