Do I ever need to explicitly flush GORM save calls in grails?

前端 未结 4 1977
说谎
说谎 2020-12-04 12:25

I have a strange situation which appears to indicate a GORM cacheing problem

//begin with all book.status\'s as UNREAD
Book.list().each { book.status = Statu         


        
4条回答
  •  北荒
    北荒 (楼主)
    2020-12-04 13:12

    For added info, you can't use flush or save(flush:true) in your domain class events (afterUpdate, beforeUpdate, ect) It will cause a stack overflow error. You can use save() without flush though.

    gorm docs

提交回复
热议问题