[Hibernate] official tutorial - userguide
Persistence contexts
org.hibernate.Session API and javax.persistence.EntityManager API represent a context for dealing with persistent data. This concept is called apersistencec context. Persistent data has a state in relation to both a persistence context and the underlying database.
transient瞬时
The entity has just been instantiated and is not assocaiated with a persistence context.
It has no persistent representation in the database and typically no identifier value has been assigned(unless the assigned generator was used).
managed, or persistent 持久的]
实体有一个关联的标识符,并且和持久化上下文关联.
物理地存在或者不存在于数据库中.
detached 托管的,游离的
有关联的标识符,但是不再和持久化上下滑关联(通常因为持久化上下文被关闭或者实例被上下文清除.
removed
实体有关联的标识符并且和持久化上下文关联,然而它被计划从数据库中移除.
大多数org.hibernate.Session API and javax.persistence.EntityManager API的方法处理实体在这些状态之间的变动.
-------------从JPA中访问Hibernate APIs--------
Session session = entityManager.unwrap( Session.class );
SessionImplementor sessionImplementor = entityManager.unwrap( SessionImplementor.class );
SessionFactory sessionFactory = entityManager.getEntityManagerFactory().unwrap( SessionFactory.class );
----------------
[Hibernate] official tutorial - userguide的更多相关文章
- [转载] CMake Official Tutorial——教程还是官方的好
CMake官方教程传送门:https://cmake.org/cmake-tutorial/ 以下的内容跟官方教程基本一致,少数地方根据自己的测试有所改动: A Basic Starting Poin ...
- ROS->The Official Tutorial
系统安装 我的使用环境是Ubuntu 16.04LTS 32bit # deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (2016 ...
- MySQL official tutorial
1.installation 2.setup environment variables add %/MySQL Server/bin to path. then restart cmd/powers ...
- TensorFlow tutorial
代码示例来自https://github.com/aymericdamien/TensorFlow-Examples tensorflow先定义运算图,在run的时候才会进行真正的运算. run之前需 ...
- Tutorial: Reverse debugging with GDB 7 (转载)
Tutorial: Reverse debugging with GDB 7 Tutorial: Reverse debugging with GDB 7 by Jay Conrod posted o ...
- JPA、Hibernate、Spring-Data-Jpa的本质区别
什么是JPA? 全称Java Persistence API,可以通过注解或者XML描述[对象-关系表]之间的映射关系,并将实体对象持久化到数据库中. 为我们提供了: 1)ORM映射元数据:JPA支持 ...
- Excellent Articles
Lisp The roots of lisp Recursive Functions of Symbolic Expressions and Their Computation by Machine, ...
- MyBlog
2016-06-25 一直想在搭建一个自己的blog.说来惭愧,cnblogs中的个人博客虽笔耕不辍,但杂乱无章.然而之前总是嘴上说说.现在,终于要行动起来了. 初步计划: 思路: django + ...
- Node.js 入门手册:那些最流行的 Web 开发框架
这篇文章与大家分享最流行的 Node.js Web 开发框架.Node 是一个服务器端 JavaScript 解释器,它将改变服务器应该如何工作的概念.它的目标是帮助程序员构建高度可伸缩的应用程序,编 ...
随机推荐
- Codeforces 1043 - A/B/C/D/E/F - (Undone)
链接:http://codeforces.com/contest/1043 A - Elections - [水水水水题] 题意: 我和另一个人竞争选举,共有 $n$ 个人投票,每个人手上有 $k$ ...
- 磁盘异步I / O在Windows上显示为同步
概要 Microsoft Windows上的文件I / O可以是同步或异步的.I / O的默认行为是同步的,其中调用I / O函数并在I / O完成时返回.异步I / O允许I / O函数立即将执行返 ...
- Linux中找到占用cpu最高的线程
在工作中,经常会碰到CPU占用100%的情况,那如何找到是那个线程占用了cpu呢? 1. top命令,找到cpu占用最高的进程 2. 查看该进程的线程, top -p <pid> 3. ...
- git本地仓库 push到远程仓库出现错误
! [rejected] master -> master (fetch first) error: failed to push some refs to hint: Updates were ...
- eclipse 安装 lombok插件
下载插件 官网下载 :https://projectlombok.org/ 有些小伙伴官网可能打不开,现提供我的下载地址:https://files.cnblogs.com/files/niceyoo ...
- 解决 FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory 问题
https://blog.csdn.net/weixin_41196185/article/details/81114226 今天在启动vue项目的时候报了这样一个错误 观察到关键词是 FATAL E ...
- QCon2019全球软件开发大会广州站即将来袭
QCon广州2019|全球软件开发大会 会议时间:2019-05-25 08:00至 2019-05-28 18:00结束 会议地点: 广州 广州万富希尔顿酒店 中国广州市白云区云城东路515-5 ...
- 从零开始一起学习SLAM | 理解图优化,一步步带你看懂g2o代码
首发于公众号:计算机视觉life 旗下知识星球「从零开始学习SLAM」 这可能是最清晰讲解g2o代码框架的文章 理解图优化,一步步带你看懂g2o框架 小白:师兄师兄,最近我在看SLAM的优化算法,有种 ...
- 020-Json结构数据序列化异步传递
C#中将.Net对象序列化为Json字符串的方法: JavaScriptSerializer().Serialize(p),JavaScriptSerializer在System.Web.Extens ...
- phpcms列表页替换
根据栏目代号获取栏目图 <img src="{$CATEGORYS[$top_parentid][image]}" width="1200" height ...