设为首页 加入收藏

TOP

IT忍者神龟之Hibernat持久化对象-数据表映射配置回顾(二)
2014-11-23 20:03:47 来源: 作者: 【 】 浏览:39
Tags:神龟 Hibernat 持久化 对象 数据 映射 配置 回顾
son(); person.setFirstName("C"); person.setSecondName("Vigiles"); person.setAddress("Beijng"); session.save(person); transaction.commit(); session.close(); sessionFactory.close(); }

(5)结果:

\

INFO: HHH000262: Table not found: tb_person
2013-11-5 10:07:12 org.hibernate.tool.hbm2ddl.SchemaUpdate execute
ERROR: HHH000388: Unsuccessful: create table db_hibernate.tb_person (namef varchar(255) not null, names varchar(255) not null, age integer, city varchar(255), primary key (namef, names)) type=InnoDB
2013-11-5 10:07:12 org.hibernate.tool.hbm2ddl.SchemaUpdate execute
ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'type=InnoDB' at line 7
2013-11-5 10:07:12 org.hibernate.tool.hbm2ddl.SchemaUpdate execute
INFO: HHH000232: Schema update complete
\

1 2 3 <property name="hibernate.dialect">   org.hibernate.dialect.MySQL5InnoDBDialectproperty>

-end
首页 上一页 1 2 下一页 尾页 2/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇数据处理案例,数据质量案例 下一篇Mybatis入门案例--增删改查

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: