saveOrUpdatea) out of transaction: allowed. will save.a) out of transaction: allowed. will update.existinga) out of transaction: allowed. will update.
b) in of tra
因此,我们将实体B中的级联更改为 @OneToOne(cascade = { CascadeType.PERSIST, CascadeType.MERGE }) 现在,删除行为是所需的,但是当持久化实体B时,实体C没有持久级联,相反,我们得到一个org.springframework.dao.InvalidDataAccessApiUsageException Not-null property referencesvalue - transient instance must be saved before current operati