object references an unsaved transient instance

Posted 面具人生lql

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了object references an unsaved transient instance相关的知识,希望对你有一定的参考价值。

报错:object references an unsaved transient instance - save the transient instance before flushing: com.it.shop.model.Publishers
解决:设置 ManyToOne, OneToMany两边的 Cascade策略一致 @ManyToOne (fetch = FetchType. LAZY ,cascade = CascadeType. ALL ) @OneToMany (cascade = CascadeType. ALL , fetch = FetchType. LAZY , mappedBy = "publishers" )     

以上是关于object references an unsaved transient instance的主要内容,如果未能解决你的问题,请参考以下文章

object references an unsaved transient instance异常

kali 2016:mount ntfs 分区只读 --Falling back to read-only mount because the NTFS partition is in an unsa

.NetCore 3.1 WebAPI 运行时报错Object reference not set to an?

关于Unity3D的错误:NullReferenceException: Object reference not set to an instance of an object 的解答

You may experience an access violation when you access an STL object through a pointer or reference

org.springframework.dao.InvalidDataAccessApiUsageException: object references an unsaved transient i