HibernateTemplate and Session(base on id)
get() and load() :
second level cache same valid because base on id,first search object by query ID
common use if lazy=true load() will return proxy not real execute query
find()/queryObject.list() and iterate()/queryObject.iterate()
find()/queryObject.list() not use second level cache
usecase:common query use multi paramter(where a='' and b='' and……)
iterate()/queryObject.iterate() neet hold seeion
usecase:have get ids
get() and load() :
second level cache same valid because base on id,first search object by query ID
common use if lazy=true load() will return proxy not real execute query
find()/queryObject.list() and iterate()/queryObject.iterate()
find()/queryObject.list() not use second level cache
usecase:common query use multi paramter(where a='' and b='' and……)
iterate()/queryObject.iterate() neet hold seeion
usecase:have get ids