书上是这么说的: The synchronization of a persistence context with database is called flushing. Hibernate flushes occur at the following times: 1. When a Transaction on the Hibernate API is committed 2. Before a query is executed 3. When the application calls session.flush() explicity对于第二点是不是我理解错了。我原来理解是把session的cache同步到数据库。现在看来好象是在说多个session的情况下,session1更新了数据库,session2的query在查询前会刷新session2的cache?
The synchronization of a persistence context with database is called flushing. Hibernate flushes occur at the following times:
1. When a Transaction on the Hibernate API is committed
2. Before a query is executed
3. When the application calls session.flush() explicity对于第二点是不是我理解错了。我原来理解是把session的cache同步到数据库。现在看来好象是在说多个session的情况下,session1更新了数据库,session2的query在查询前会刷新session2的cache?
多个session的交互涉及到锁定