Hibernate/GORM: collection was not processed by flush()

后端 未结 4 621
面向向阳花
面向向阳花 2021-01-01 21:18

I have an integration test in my Grails application that fails when I try to save an entity of type Member

invitingMember.save(flush: true)
         


        
4条回答
  •  时光取名叫无心
    2021-01-01 22:04

    The underlying problem is probably that Hibernate doesn't cascade the save. So when you flush the Member, Hibernate notices that the collection is still dirty (which is probably not what you want). So either flush the collection manually or tell Hibernate to cascade all the updates.

提交回复
热议问题