The Life Cycle of Hibernate entity object
来源:互联网 发布:司法拍卖淘宝网. 编辑:程序博客网 时间:2024/05/17 04:41
The life cycle of hibernate entity object can be devided into three state, as transient, persistent and detached.
When declaring and setting an object without using save() , the object is stored in memeory and has no relation with database, which is called transient. You're able to update the entity object as you want, however, never influncing the datebase.
When you use the function commit(), which means that the entity object get to persistent. In this state, the object is managed by hibernate or session. if you update your entity object and comit() again at this state, the data in database will be updated as well.
The state after close() or delete() is called deached. this is the state that the entity object is managed by databas and have no relationship with hibernate or session. If you want to update, you have to get another session, which start a new lift cycle.
- The Life Cycle of Hibernate entity object
- Life Cycle of Object
- Entity,Object Identity And Object Life Cycle
- The Life Cycle of a JSP Page
- Handling IRPs 11: Life Cycle of a File Object
- Life Cycle of Threads
- DOJO组件生命周期(the life cycle of dojo widget)
- DOJO组件生命周期(the life cycle of dojo widget)
- React Native -- The Life-Cycle of a Composite Component
- DOJO组件生命周期(the life cycle of dojo widget)
- The EC2 Instance Life Cycle
- Life Cycle of a Linux Program
- The order of life!
- The wholeness of life
- the Art of Life
- The Wholeness of Life
- The ASP.NET Page Life Cycle
- What is the 'software life cycle'?
- 生产者和消费者问题+java版
- C# WebService调用的三大难题
- AM335X DDR 3 调试总结
- 2.struts2配置文件Web.XML与Struts.XML模板详细说明
- 下载中文文件乱码问题
- The Life Cycle of Hibernate entity object
- java析构函数替代者finalize()解说
- JSP pageEncoding和contentType属性
- 数据结构面试题:单链表逆置
- Java与C#时间转换
- Linux 进程管理剖析
- 我的IT生涯
- java(构造方法实例)
- 程序员都应该知道的福利