兩者差別在 saveAndFlush() 比 save() 多呼叫了 EntityManager 的 flush() 方法,作用為立即將暫存在記憶體的entity狀態同步至料庫(但仍未提交)。
確定! 回上一頁