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

This commit is contained in:
Klimov Paul
2013-12-01 17:46:21 +02:00
parent 1129d820ed
commit cddb878360

View File

@ -203,7 +203,8 @@ trait ActiveRelationTrait
return serialize($key);
} else {
$attribute = reset($attributes);
return $model[$attribute];
$key = $model[$attribute];
return is_scalar($key) ? $key : serialize($key);
}
}