Fix "fieldname is not instance of 'Models\XXXXX'" error

When your model have references 

``` php
    protected static $attrs = array(
        'number' => array('type' => 'integer'),
        'fieldname' => array('model'=>'Models\Somemodel','type'=>'reference')
    );
```

You may face some exceptions when you try to do smth like this:

```php
$obj = new Somemodel::id(...);
$data = $obj->toArray();
$data['number']++; 
$obj->update($data);
```

This PR should fix it