Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在更新任何行时更新日期字段。意味着每当我更新特定字段时,都需要自动更改日期。
我怎样才能在 grails 域类中得到这个?
Grails 可以为您做到这一点!
转到http://grails.org/doc/latest/guide/GORM.html并搜索“自动时间戳”
支持 2 个字段: “通过定义lastUpdated和dateCreated属性,GORM 将自动为您更新这些字段。”
lastUpdated
dateCreated