Commit cddb8783 by Klimov Paul

ActiveRelationTrait::getModelKey() updated to work with non scalar keys.

parent 1129d820
...@@ -203,7 +203,8 @@ trait ActiveRelationTrait ...@@ -203,7 +203,8 @@ trait ActiveRelationTrait
return serialize($key); return serialize($key);
} else { } else {
$attribute = reset($attributes); $attribute = reset($attributes);
return $model[$attribute]; $key = $model[$attribute];
return is_scalar($key) ? $key : serialize($key);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment