![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ORM
文章平均质量分 89
Agile牧
最重要的,拥有跟随内心与直觉的勇气,你的内心与直觉多少已经知道你真正想要成为什么样的人。任何其它事物都是次要的。
展开
-
Hibernate 一对一映射之主键关联 Annotation Example
lt;javassist-version>3.12.1.GA</javassist-version> <slf4j-nop-version>1.6.6</slf4j-nop-version> <mysql-connector-version>5.1.21</mysql-connector-version> </properti原创 2012-08-29 14:50:14 · 107 阅读 · 0 评论 -
Spring MyBatis CRUD
g/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>org.原创 2017-05-31 22:05:17 · 117 阅读 · 0 评论 -
Hibernate常见术语、操作、区别
原创 2017-03-02 22:08:12 · 102 阅读 · 0 评论 -
Hibernate HQL, SQL查询及抓取策略
pache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>org.fool.hibernate</groupId> <artifactId>hibernate_hql</artifactId> <原创 2013-04-10 09:53:34 · 96 阅读 · 0 评论 -
MyBatis CRUD Operations
pache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>org.fool.mybatis</groupId> <artifactId>MyBatis</artifactId> <version&原创 2013-03-27 16:48:43 · 58 阅读 · 0 评论 -
Spring Hibernate CRUD
ache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>org.fool.springjdbc</groupId> <artifactId>springhibernate</artifactId> &原创 2013-03-21 14:21:54 · 105 阅读 · 0 评论 -
Hibernate 3和4的HibernateUtil
ttp://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>org.fool.hibernate</groupId> <artifactId>hibernate3.6</artifactId>原创 2013-02-16 16:19:13 · 80 阅读 · 0 评论 -
Hibernate getCurrentSession() vs openSession()
ntSession()创建的session在commit或rollback时会自动关闭,而采用openSession()创建的session必须手动关闭 2、使用getCurrentSession()需要在hibernate.cfg.xml文件中加入如下配置: * 如果使用的是本地事务(jdbc事务) <property name="hibernate.current_session_context_class">thread<原创 2012-12-21 12:30:51 · 53 阅读 · 0 评论 -
Hibernate Many to Many Annotation Example
ent;drop table if exists student_course;create table course (cid integer not null auto_increment, name varchar(255), primary key (cid));create table student (sid integer not null auto_increment, name varchar(255), primary key (sid));create table st原创 2012-08-30 15:01:37 · 95 阅读 · 0 评论 -
Hibernate One to Many Annotation Example
assist-version>3.12.1.GA</javassist-version> <slf4j-nop-version>1.6.6</slf4j-nop-version> <mysql-connector-version>5.1.21</mysql-connector-version> </properties&原创 2012-08-30 09:46:08 · 83 阅读 · 0 评论 -
Hibernate 一对一映射之外键关联 Annotation Example
ssist-version>3.12.1.GA</javassist-version> <slf4j-nop-version>1.6.6</slf4j-nop-version> <mysql-connector-version>5.1.21</mysql-connector-version> </properties&原创 2012-08-29 16:39:46 · 81 阅读 · 0 评论 -
MyBatis一级缓存和二级缓存(转)
结果结果缓存起来,当下次查询的时候,如果判断先前有个完全一样的查询,会直接从缓存中直接将结果取出,返回给用户,不需要再进行一次数据库查询了。 MyBatis会在一次会话的表示 —— 一个SqlSession对象中创建一个本地缓存(local cache),对于每一次查询,都会尝试根据查询的条件去本地缓存中查找是否在缓存中,如果在缓存中,就直接从缓存中取出,然后返回给用户;否则,从数据库读取数据,将查询结果存入缓存并返回给用户。 一级缓存是SqlSession级别的缓存。在操作数据库时原创 2017-08-31 20:26:53 · 133 阅读 · 0 评论