mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 20:52:48 +08:00
优化unique方法的查询
This commit is contained in:
@@ -561,7 +561,7 @@ class Validate
|
||||
if (isset($except)) {
|
||||
$map[$key] = ['neq', $except];
|
||||
}
|
||||
if ($model->where($map)->find()) {
|
||||
if ($model->where($map)->field($key)->find()) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user