hibernate
iteye_19362
这个作者很懒,什么都没留下…
展开
-
<hibernate>database returned no natively generated 错误
hibernate database returned no natively generated 错误 在配置hibernate时,做insert测试遇到了这个错误。原因是数据库的表结构中关于id,没有设置auto increment。 例如表结构 user(userId integer(20)auto_increment primary key,userName varchar(20),u...原创 2012-04-12 21:39:16 · 81 阅读 · 0 评论 -
hibernate mysql UTF-8乱码
[size=medium]在用hibernate插入mysql中文数据库发生了乱码问题,网上查了下,大致是由于mysql默认数据库的collation不是utf-8的,或者帮你页面设置不统一导致。 解决方法:首先把表的collation设置为utf8-default-collation 在jsp页面上加上 在hibernate.cfg.xml中加入 true UTF-8 ...2012-04-17 23:28:40 · 105 阅读 · 0 评论