Hibernate中FlushMode.AUTO和FlushMode.ALWAYS之间的区别? [英] Difference between FlushMode.AUTO and FlushMode.ALWAYS in Hibernate?
问题描述
http://forum.springsource.org/archive/index.php/t-14044.html
Have gone through hibernate api specification on FlushMode but didn't get the exact difference. So please help.
Always means that before any query is run on a collection or such the query is rerun against the database. With auto I am assuming there is some "magic" under the hoods that knows most data doesn't change that often so you don't always have to flush. It also affects how often might happen during a transaction. I say might because some sources say setting the flushmode is only a hint to hibernate - but see this thread for some discussion...
http://forum.springsource.org/archive/index.php/t-14044.html
这篇关于Hibernate中FlushMode.AUTO和FlushMode.ALWAYS之间的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!