Replies: 1 comment
-
|
这个貌似没有太好的解决方案,只有在saving 处理一下了 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
也碰到了 fetchFailed 的问题, 按属性修改器的方案如下解决
get 能正常获取到值, 但是编辑保存时 status 的值不会更新; 查了下代码 owl-admin/src/Services/AdminService.php , 是这里的 hasColumn 把非数据表的字段 state 过滤掉了
目前能想到的方案是在 saving 里给 status 赋值, 但直觉这样处理不太优雅, 未搜索到其他的方案, 对 laravel 不太熟悉, 想请教下有什么其他方案解决吗(status 字段改不了 😞 )?
另外我看了下 Illuminate/Database/Eloquent/Model.php Illuminate/Database/Eloquent/Concerns/HasAttributes.php 是有 originalIsEquivalent 判断的
似乎不用在 Service 层拦掉, 这样在属性修改器的 set 方法也能生效; 但后面又看到下面的注释, 是因为在 sqlite 下 originalIsEquivalent 无法正确判断么?
Beta Was this translation helpful? Give feedback.
All reactions