We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9013d6e commit 199cdbbCopy full SHA for 199cdbb
dbObject.php
@@ -141,13 +141,15 @@ public function __get ($name) {
141
case 'hasone':
142
$obj = new $modelName;
143
$obj->returnType = $this->returnType;
144
- return $obj->byId($this->data[$name]);
+ $this->data[$name] = $obj->byId($this->data[$name]);
145
+ return $this->data[$name];
146
break;
147
case 'hasmany':
148
$key = $this->relations[$name][2];
149
150
- return $obj->where($key, $this->data[$this->primaryKey])->get();
151
+ $this->data[$name] = $obj->where($key, $this->data[$this->primaryKey])->get();
152
153
154
default:
155
0 commit comments