[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 解释器,它将改变服务器应该如何工作的概念.它的目标是帮助程序员构建高度可伸缩的应用程序,编 ...
随机推荐
- pytorch-MNIST数据模型测试
用pytorch搭建一个DNN网络,主要目的是熟悉pytorch的使用 """ test Function """ import torch ...
- 使用docker容器运行MySQL数据库并持久化数据文件
1.下载mysql镜像 # docker pull mysql 2.启动mysql容器 # docker run -itd -v /data:/var/lib/mysql -p 33060:3306 ...
- ios 11越狱移除
https://baijiahao.baidu.com/s?id=1593748369421662278&wfr=spider&for=pc 不越狱抹机步骤: 点击设置 进入自带游览 ...
- PrimeNG之FileUpload
--文件上传是一个支持拖放,多文件上传,自动上传,进度跟踪和验证的上传. Import import {FileUploadModule} from 'primeng/primeng'; Gettin ...
- ES6 迭代器
Iterator Iterator 是 ES6 引入的一种新的遍历机制,迭代器有两个核心概念: 迭代器是一个统一的接口,它的作用是使各种数据结构可被便捷的访问,它是通过一个键为Symbol.itera ...
- JMeter-标的上架调整与完成
问题:利随本青,按日的返回的参数不正确 各种计息方式的上标,新做产品的上架 散标各种计息方式的上架,新做产品的上架 修改后B环境上架 修改后C环境上架 [制作提案(担保机构)-提交18] loan.d ...
- windows程序设计 获取系统文件路径
获取系统文件路径,打印到txt文件中. #include <windows.h> int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hP ...
- COM中参数标识
- Linux基础命令---lpstat查看打印任务
lpstat lpstat指令用来显示当前任务.打印机的状态.如果没有参数,那么就显示打印队列. 此命令的适用范围:RedHat.RHEL.Ubuntu.CentOS.Fedora.openSUSE. ...
- 虚拟机centos7配置本地yum源
在虚拟机中要使用yum命令,就要先配置一下yum源,下面就分享一下这个过程: 1. 挂载iso到vmware,首先得确保CD/DVD连接到镜像.可以这样操作 2. 执行下面的命令 # mkdir /m ...