public function __call($name, $arguments)
 {
     if ($this->query->method_exists($name)) {
         $result = static::callObjectMethod($this->query, $name, $arguments);
         return is_a($result, customBuilder::class) ? $this : $result;
     }
     return parent::__call($name, $arguments);
 }
 public function test_cast_array()
 {
     $this->bar->json = [1 => 11, 2 => 22];
     $this->bar->save();
     $composer = new ModelComposer();
     $composer->addModel($this->foo);
     $composer->addModel($this->reloadModel($this->bar));
     $this->assertInternalType('array', $this->composer->json);
     $this->assertEquals(11, $this->composer->json[1]);
 }