Summary on 20080626: hibernate configuration and hbm2ddl tool
来源:互联网 发布:unity3d 网页插件 编辑:程序博客网 时间:2024/05/22 15:06
xml file is actualy like the following format:
<!DOCTYPE hibernate-mapping
PUBLIC "-//hibernate/hibernate mapping dtd 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
in the hibernate configuration file hibernate.cfg.xml, when writing the mapping filesthe format should be: <mapping resource="home/stronger/hibernate/**.hbm.xml"/>see, the path is actually seperated by '/', it's not the format of class path
hbm2ddl tool:in org.hibernate.tool.hbm2ddl package, there is class: SchemaExport, this class get the hibernate configuration and use the method create to create sql script and create the table in database, according to the mapping resource set.Ex:
Configuration config = new Configuration().configure();SchemaExport schema = new SchemaExport(config);schema.create(true,true);//schema.create(boolean sqlScript, boolean exportScript)//sqlScript: create sql script and show it in the console//export script: export the sql script to database and execute
- Summary on 20080626: hibernate configuration and hbm2ddl tool
- Hibernate Tool: hbm2java or hbm2ddl
- Hibernate Tool: hbm2java or hbm2ddl
- Hibernate's hbm2ddl tool & hibernate.hbm2ddl.auto options
- [org.hibernate.tool.hbm2ddl.SchemaUpdate] - Unsuccessful: create table
- Summary on 20080626: some difference between JDBC transaction and JTA
- Tool Summary
- hibernate.hbm2ddl
- Hibernate hbm2ddl
- Summary on 20080703: Attention for hibernate operation
- H2和Hibernate:ERROR: org.hibernate.tool.hbm2ddl.SchemaUpdate - Unsuccessful: create table
- eCos Configuration Tool build on ubuntu 10.04 AMD64
- org.hibernate.tool.hbm2ddl.SchemaUpdate execute ERROR: HHH000319: Could not get database metadata
- 九月 07, 2015 6:25:28 下午 org.hibernate.tool.hbm2ddl.SchemaUpdate execute ERROR: HHH000388: Unsuccess
- Summary on 20080707: Hibernate operation on many-to-one relation
- Connection and Configuration Verification Tool for SSL/TLS
- linux summary tool
- i2c-test tool summary
- 《Effective C# 》Item 25:优先使用可序列化(serilizable)类型
- 成就DBA职业生涯
- SQL Server 2005的TSQL查询新功能
- 终于~
- 软件开发中项目需求管理简述
- Summary on 20080626: hibernate configuration and hbm2ddl tool
- [转] KFS,一个克隆GFS的文件系统
- MYSQL数据类型笔记2
- 随机生成动态验证码
- logiscope
- ASP.NET MVC框架中的控制器与控制器行为
- 初试BV561EVB开发板
- ADO 读取Excel的问题 找不到可安装的ISAM
- 巨震前的死寂-论中国经济和世界经济的走势!