JpaRepository中saveAndFlush(S entity)方法和父接口的save(S entity)的区别,说法错误一项是?
(A)两个方法都可以保存实体。
(B) save(S entity)可以保存,saveAndFlush(S entity)只是刷新一下,不会保存。
(C) save(S entity)是将瞬时态实体变成托管态再变成持久态,即保存数据。saveAndFlush(S entity)是将托管态对象变成持久态,即保存数据。
(D) save(S entity)方法底层调用了flush()刷新方法,saveAndFlush(S entity)相当于调用save()和flush()两个方法。
参考答案
继续答题:下一题

