数据库org.springframework.dao.InvalidDataAccessApiUsageException: object references an unsaved transient instance – save the transient instance before flushing: com.zs.entity.GuahaodanEntity; nested excepti 云博小周宇2024年5月5日2023年8月20日1 Min Read ssh里hibernate的 一对多多对一的问题 save时 一的一方还处于持久化状态时,多的一方这时候保存的话就会出现这个问题 必须先将一的一方先保存解除持久化状态,才可以再保存多的一方 注意保存顺序就好了