mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 20:52:48 +08:00
改进聚合模型主键和关联键相同的情况
This commit is contained in:
@@ -126,7 +126,7 @@ class Merge extends Model
|
||||
$item = [];
|
||||
foreach ($data as $key => $val) {
|
||||
if ($insert || in_array($key, $this->change) || $this->isPk($key)) {
|
||||
if (array_key_exists($key, $this->mapFields)) {
|
||||
if ($this->fk != $key && array_key_exists($key, $this->mapFields)) {
|
||||
list($name, $key) = explode('.', $this->mapFields[$key]);
|
||||
if ($model == $name) {
|
||||
$item[$key] = $val;
|
||||
|
||||
Reference in New Issue
Block a user