[hibernate-dev] Integrator and retrieving objects

Adam Warski adam at warski.org
Wed Apr 6 07:15:13 EDT 2011


> FullTextSession ftSession = session.unwrap(FullTextSession.class);
> //the current approach is via some static helper method
> //FullTextSession ftSession =  Search.getFullTextSession(session);
> 
> That would mean that the integration point between HSearch and Hibernate would have an unwrap method and Hibernate would delegate the unwrap calls to each integrator until a non null object is returned.
> 
> It's just a thought, WDYT?

But while EntityManager wraps a Session object, a Session doesn't wrap a FullTextSession, but the other way round, no?

-- 
Adam Warski
http://www.warski.org
http://www.softwaremill.eu








More information about the hibernate-dev mailing list