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