在使用hibernate开发项目时,为什么进行更新以后,在才进行预览还是以前的数据,数据库里面的数据明明已经更新了,为什么还是预览的以前的数据呀,是延迟加载?还是缓存的问题?
解决方案 »
- ssh分页,jsp页面数据不显示。只有上一页下一页这些,没有数据。
- struts2从后台返回页面值问题
- 一道java算法面试题(200分)
- 验证未通过,不想让它提交,该怎么控制
- 专业讨论群,欢迎您的加盟!66305398
- 请问xml文件的结点名字可不可以使用空格啊
- Validator不上网就不好使的问题..奇怪啊
- 谁知道如何解决这个问题? NO Serializer found for class java:com.sune365.platform.note.Note
- DOMParser开放源代码是不是已经没用啦???怎么会出现java.lang.VerifyError???
- 如何用XSL和XML的结合,来显示HTML文本输入框(Input)??期待中……
- 关于Criteria模糊查询及分页
- 第一次用struts
事务没提交吧
一般都用spring管理事务
你看看 你预览的时候 后台有没有 hibernate发出查询语句啊
如果没有 他就是直接在缓存里面拿到老数据啊
<hibernate-configuration> <session-factory>
<property name="connection.username">sa</property>
<property name="connection.url">
jdbc:sqlserver://localhost:1433;databaseName=luzheng
</property>
<property name="dialect">
org.hibernate.dialect.SQLServerDialect
</property>
<property name="myeclipse.connection.profile">luzheng</property>
<property name="connection.password">123456</property>
<property name="connection.driver_class">
com.microsoft.sqlserver.jdbc.SQLServerDriver
</property>
<property name="show_sql">true</property>
<mapping resource="com/jw/writ/entity/Client.hbm.xml" />
<mapping resource="com/jw/writ/entity/OtherGoods.hbm.xml" />
<mapping resource="com/jw/writ/entity/Users.hbm.xml" />
<mapping resource="com/jw/writ/entity/OtherThings.hbm.xml" />
<mapping resource="com/jw/writ/entity/Writ.hbm.xml" />
<mapping resource="com/jw/writ/entity/CorrectNotice.hbm.xml" />
<mapping resource="com/jw/writ/entity/Hearing.hbm.xml" />
<mapping resource="com/jw/writ/entity/LawAccording.hbm.xml" />
<mapping resource="com/jw/writ/entity/Cases.hbm.xml"></mapping>
<mapping resource="com/jw/writ/entity/OverCarInfo.hbm.xml" />
<mapping resource="com/jw/writ/entity/InCarInfo.hbm.xml" />
<mapping resource="com/jw/writ/entity/Include.hbm.xml" />
<mapping resource="com/jw/writ/entity/Goven.hbm.xml" />
<mapping resource="com/jw/writ/entity/Caseinfo.hbm.xml" />
<mapping resource="com/jw/writ/entity/Modelinfo.hbm.xml" />
<mapping resource="com/jw/writ/entity/Ruleinfo.hbm.xml" />
<mapping resource="com/jw/writ/entity/Bcase.hbm.xml" />
<mapping resource="com/jw/writ/entity/Organinfo.hbm.xml" />
<mapping resource="com/jw/writ/entity/Officersinfo.hbm.xml" />
<mapping resource="com/jw/writ/entity/Parameterinfo.hbm.xml" />
<mapping resource="com/jw/writ/entity/Qanswerinfo.hbm.xml" />
<mapping resource="com/jw/writ/entity/Sclient.hbm.xml" />
<mapping resource="com/jw/writ/entity/Question.hbm.xml" />
<mapping resource="com/jw/writ/entity/Message.hbm.xml" />
</session-factory></hibernate-configuration>