Compare commits
2 Commits
27d5fd0b08
...
6f558f2923
Author | SHA1 | Date | |
---|---|---|---|
6f558f2923 | |||
5be0c8cc01 |
@ -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() );
|
||||
|
||||
|
@ -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)
|
||||
]);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user