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.
假设我有一个Person带有name字段的课程。我可以做一个Person.findByName,但是如果我想重写这个方法以确保查询被缓存怎么办?如何覆盖此动态查找器方法?
Person
name
Person.findByName
你可以简单地写:
Person.findByName("some-name", [cache: true])