Hibernate
Sunshine_du
从未放弃过!
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
hibernate 出现 is not mapped 问题
在用hibernate框架时, 运行时报org.hibernate.hql.ast.QuerySyntaxException:tab_user is not mapped [select u.username from tab_user u where u.username=? and and password=?] 错误: 上面的错误是因为自己写了错误的HQL语句: Str原创 2017-10-17 18:33:48 · 10167 阅读 · 0 评论 -
hibernate缓存
一级缓存(Session级别的缓存) 由于Session对象的生命周期通常对应一个数据库事务,因此它的缓存是事务范围的缓存,一级缓存是必须的 那么是不是我们使用了一级缓存,就保证了每次查询相同对象就都可以不通过数据库查询呢? 1.使用session.clear()方法 2. 使用session.evict(object)方法 3.原创 2017-10-11 19:13:40 · 167 阅读 · 0 评论
分享