Compare commits

...

2 Commits

2 changed files with 11 additions and 2 deletions

View File

@ -211,10 +211,15 @@ trait EntityTrait {
$this->{$field['name']} = null;
}
elseif ( $field['type'] === 'array' ) {
$this->{$field['name']} = substr($value, 0, 1) === "a" ? unserialize($value) : json_decode($value, true);
if ( is_string($value)) {
$this->{$field['name']} = substr($value, 0, 1) === "a" ? unserialize($value) : json_decode($value, true);
}
elseif ( is_array($value) ) {
$this->{$field['name']} = $value;
}
}
elseif ( EntityField::isScalarType($field['type']) ) {
if ( $field['type'] === 'string' ) {
$annotation = $entityResolver->searchFieldAnnotation($field['name'], new Field() );

View File

@ -67,7 +67,11 @@ class Where extends Fragment {
}
return $this->renderSegments([
! $this->parent && ! empty($this->conditionList) ? static::SQL_TOKEN : "",
=======
! $this->parent && ! $skipToken ? static::SQL_TOKEN : "",
>>>>>>> 27d5fd0b08b98f6fda3b8a6682b2dd7c7a692d82
implode(" ", $stack)
]);
}