[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 解释器,它将改变服务器应该如何工作的概念.它的目标是帮助程序员构建高度可伸缩的应用程序,编 ...
随机推荐
- consul服务配置维护
1.命令参数 -advertise:通知展现地址用来改变我们给集群中的其他节点展现的地址,默认情况下-bind地址就是展现地址,然而也存在一些路由地址是不能受约束的,这时候会激活一个不同的地址来供应, ...
- windows加固
1. 账户管理和认证授权 1.1 账户 默认账户安全 禁用Guest账户. 禁用或删除其他无用账户(建议先禁用账户三个月,待确认没有问题后删除.) 操作步骤 打开 控制面板 > 管理工具 > ...
- 详解FPGA中的建立时间与保持时间
概念对于一个数字系统而言,建立时间和保持时间可以说是基础中的基础,这两个概念就像是数字电路的地基,整个系统的稳定性绝大部分都取决于是否满足建立时间和保持时间.但是对于绝大部分包括我在内的初学者来说,建 ...
- (转载)中文Appium API 文档
该文档是Testerhome官方翻译的源地址:https://github.com/appium/appium/tree/master/docs/cn官方网站上的:http://appium.io/s ...
- CSS中list-style详解
取消默认的圆点和序号可以这样写list-style:none;, list的属性如下: list-style-type:square;//正方形 list-style-position:inside; ...
- Python Async/Await入门指南
转自:https://zhuanlan.zhihu.com/p/27258289 本文将会讲述Python 3.5之后出现的async/await的使用方法,以及它们的一些使用目的,如果错误,欢迎指正 ...
- 读取excel日期数据问题
1.企业导入数据,遇到日期数据, excel中显示日期格式正常 2009/3/13, 结果利用npoi读出来的竟然是 13-3月-2009,特别奇葩. so把excel中的日期数据统一成文本.利用Te ...
- mecacheq的配置
在处理业务逻辑时有可能遇到高并发问题,例如商城秒杀.微博评论等.如果不做任何措施可能在高瞬间造成服务器瘫痪,如何解决这个问题呢?队列是个不错的选择.队列(Queue)又称先进先出(First In F ...
- CSRF(Cross Site Request Forgery, 跨站域请求伪造)
CSRF(Cross Site Request Forgery, 跨站域请求伪造) CSRF 背景与介绍 CSRF(Cross Site Request Forgery, 跨站域请求伪造)是一种网络的 ...
- tiny6410采用sd卡烧写的问题
今天想用32G的SD卡来烧写tiny6410的uboot但是失败了,换了一张4G的卡就可以了, 还有sd卡启动的uboot使用tftp命令是有问题的