Hibernate / Hibernate interview questions
The detached criteria allows you to create the query without Session. Then you can execute the search in an arbitrary session.
Using a DetachedCriteria is exactly the same as a Criteria except you can do the initial creation and setup of your query without having access to the session. When it comes time to run your query, you must convert it to an executable query with getExecutableCriteria(session).
More Related questions...