Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
我通过_patch_method 给一个模型中的create方法添加几步自定义方法,添加完成之后,当我在这个模型创建数据时可以执行添加的方法,但是重启服务之后,这个补丁方法会失效,请问这是什么原因,求大佬指教
你根本不需要用_patch_method来自定义create方法,继承对应的实体类,然后直接覆写create方法就可以了。 另外,你的_patch_method的调用参数也是错的。
_patch_method
create
你好!看起来您对这段对话很感兴趣,但您还没有一个账号。
厌倦了每次访问都刷到同样的帖子?您注册账号后,您每次返回时都能精准定位到您上次浏览的位置,并可选择接收新回复通知(通过邮件或推送通知)。您还能收藏书签、为帖子顶,向社区成员表达您的欣赏。
有了你的建议,这篇帖子会更精彩哦 💗