Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

额外添加的updated_at #107

Open
TestAdmin007 opened this issue Apr 12, 2024 · 0 comments
Open

额外添加的updated_at #107

TestAdmin007 opened this issue Apr 12, 2024 · 0 comments

Comments

@TestAdmin007
Copy link

TestAdmin007 commented Apr 12, 2024

当模型中设置了 const UPDATED_AT = null; 时。
Batch.php 文件 第303行只是校验了updatedAt 字段是否在用户提交的字段列表中,而没有判断是否需要添加updatedAt
if (!in_array($updatedAtColumn, $columns)) { $addUpdatedAtValue = true; array_push($columns, $updatedAtColumn); }
导致模型中声明了无需更新时间的模型使用批量添加会报错!
SQLSTATE[42S22]: Column not found: 1054 Unknown column '' in 'field list'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant