使用Hibernate插入数据后数据库没有记录的解决方法

hibernate版本:3.3

使用hibernate插入数据后,show_sql能打印出sql语句出来

也没有显示什么异常,但是在数据库中没有记录

在hibernate.cfg.xml添加下面的语句后,问题解决。

<property name="connection.autocommit">true</property>

  

posted @ 2013-01-17 10:14  Catcher_8  阅读(483)  评论(0编辑  收藏  举报