![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
hibernate
大师兄啊
做你自己想做的事~
展开
-
hibernate和Jdbc查询的区别以及hibernate查询普通查询和Hql
hibernate查询我们先来看看传统的jdbc的dao是怎么写的 (1)首先创建一个连接池public class lianjie { static String url="jdbc:sqlserver://localhost:1433;DatabaseName=SuperMarket"; static String user="sa"; static String原创 2015-11-23 00:54:43 · 35548 阅读 · 0 评论 -
hibernate什么时候会抛出懒加载的异常
hibernate什么时候会抛出懒加载的异常原创 2015-11-23 18:02:35 · 35455 阅读 · 0 评论 -
hibernate中创建session的两种方式方式,区别在哪里?
hibernate的session的产生方式,区别在哪里?hibernate的session的产生方式,区别在哪里?如何产生?session的产生方式有哪些,并且为什么要分这个?产生流程:1、方式一sessionFactory.opensession():一般的crud操作我们用的是这个操作,只有增删改才用到事务,查询不需要。原创 2015-12-13 21:27:48 · 38893 阅读 · 0 评论 -
application.xml中配置HibernateTemplate模板
配置HibernateTemplate模板 (注意:这里注入的是sessionFactory) //在application.xml的配置<bean id="hibernateTemplate" class="org.springframework.orm.hibernate3.HibernateTemplate"> <property name="sessionFactory"> <原创 2015-12-01 23:39:09 · 35361 阅读 · 0 评论