【问题标题】:What happended to beforeUpdate, beforeInsert, beforeSave?beforeUpdate、beforeInsert、beforeSave 发生了什么?
【发布时间】:2018-08-06 09:30:23
【问题描述】:

在旧 Grails 版本中,我们在域类中有这些 beforeUpdatebeforeInsertbeforeSave 事件。

我在 Grails 3.x 中找不到它们了 - 我现在如何轻松处理这些事件?

更新:我刚刚注意到这些事件仍然有效,但我在文档中找不到它们了。它们是否已弃用?

【问题讨论】:

    标签: grails-3.0


    【解决方案1】:

    由于 grails 3.x GORM 有它自己的文档。

    这里是gorm事件的链接:

    http://gorm.grails.org/latest/hibernate/manual/index.html#eventsAutoTimestamping

    【讨论】:

    • 谢谢!我知道这一点,但我通过谷歌点击doc.gorm.io/callbacks.html 并没有注意到这是另一个 gorm!!!
    猜你喜欢
    • 2012-03-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-03-13
    • 2016-02-28
    • 2014-02-28
    • 2010-10-02
    • 2020-03-14
    相关资源
    最近更新 更多