org.springframework.dao.InvalidDataAccessApiUsageException: object references an unsaved transient instance - save the transient instance before flushing: com.zs.entity.GuahaodanEntity; nested excepti
ssh里hibernate的 一对多多对一的问题 save时 一的一方还处于持久化状态时,多的一方这时候保存的话就会出现这个问题
必须先将一的一方先保存解除持久化状态,才可以再保存多的一方
注意保存顺序就好了