`
文章列表
onPrepareStatement getEntity onLoad preFlush findDirty-》dirtyCheck postFlush
http://gchuyun.iteye.com/blog/174228   使用方式: SessionFactory.openSession(Interceptor)//每个session拥有自己的拦截器,不共享   Configuration.setInterceptor(Interceptor)//各个session共享此拦截器   Lifecycle接口包含4个方法: 1. public boolean onSave(Session s) throws CallbackException; 2. public boolean onUpdate(Session s) ...
1.開啟Session不會馬上取得Connection,而是在最後真正需要連接資料庫進行更新或查詢時才會取 得Connection,如果有設定Connection pool,則從Connection pool中取得Connection,而關閉Session時,如果有設定Connection pool,則是將Connection歸還給Connection pool,而不是直接關閉Connection。 2.開啟一個Session會建立一個Persistence context ,它可以進行快取管理、dirty check等 3.所有的讀取、更新、插入等動作,則是在Transaction中完成 ...
Hibernate命名策略相关的类和接口包括四个:     NamingStrategy接口     DefaultNamingStrategy默认实现     ImprovedNamingStrategy实现     EJB3NamingStrategy实现以及其子类DefaultComponentSafeNamingStrategy http://caterpillar.onlyfun.net/Gossip/HibernateGossip/ImplementNamingStrategy.html  
Global site tag (gtag.js) - Google Analytics