|
@@ -1225,6 +1225,9 @@ class Base {
|
|
|
$fields = $args[2];
|
|
|
if(!in_array($relKey, $fields)) $fields[] = $relKey;
|
|
|
}
|
|
|
+ if(count($fields) == 0) {
|
|
|
+ $fields = $this->getFields();
|
|
|
+ }
|
|
|
if(count($this->getFields()) > 0 && !in_array($relKey, $this->getFields())) {
|
|
|
$fields[] = $relKey;
|
|
|
}
|
|
@@ -1254,9 +1257,13 @@ class Base {
|
|
|
$fields = $args[2];
|
|
|
if(!in_array($relKey, $fields)) $fields[] = $relKey;
|
|
|
}
|
|
|
+ if(count($fields) == 0) {
|
|
|
+ $fields = $this->getFields();
|
|
|
+ }
|
|
|
if(count($this->getFields()) > 0 && !in_array($relKey, $this->getFields())) {
|
|
|
$fields[] = $relKey;
|
|
|
}
|
|
|
+
|
|
|
if(array_search('*', $fields) !== false) {
|
|
|
$fields = ['*'];
|
|
|
}
|