Refer to
http://www.hibernate.org/hib_docs/v3/reference/en/html/objectstate.html#objectstate-flushing.
The session may be flushed before the transaction is explicitly committed. One trigger is some queries. The documentation discusses how to change the flush mode to prevent this from happening.
However, I think you should consider not executing the query during the transaction (and therefore not needing to tinker with the flush mode). Queries can make a transaction take longer, and your thread may use more than its fair share of resources.[/url]