kiddivouchers/kohana-orm — pull request #1 by cs278 (2014-01-29 11:43:31+00:00)
Title: Related model fixes

This addresses a couple of problems.

When setting a belongs to relationship to NULL nothing is persisted.

```php
$user->key = null;
$user->save(); // Nothing gets saved.
```

If a belongs to relationship is set to NULL ORM fails at certain points due to the assumption the internal related array contains ORM objects.

```php
$user->key = null;
$user->as_array(); // Fatal error
```