Will Hibernate flush my updated persistent object when calling session.close() with FlushMode.AUTO?
问题 If FlushMode.AUTO is set, will Hibernate flush my updated persistent object when I call session.close()? I know that session.close() does not normally flush the session but I'm not sure how FlushMode.AUTO affects this. From the Docs: FlushMode.AUTO The Session is sometimes flushed before query execution in order to ensure that queries never return stale state. This is the default flush mode. Does this mean I can rely on Hibernate to verify my changes are flushed sometimes before my session is