Closed
Description
Issue
It has to be created cache for when tried to retrieve from a model, some result that we doesn't want a relationship attached.
For example: Authors that does not have books:
$authors = collect([(new Author)->doesntHave('books')->first()]);
Stack Trace
Currently, if we try to execute the method, we have this stack:
ErrorException: Undefined index: column
/home/vagrant/Code/laravel-model-caching/src/CachedBuilder.php:106
/home/vagrant/Code/laravel-model-caching/vendor/laravel/framework/src/Illuminate/Support/Collection.php:1197
/home/vagrant/Code/laravel-model-caching/src/CachedBuilder.php:107
/home/vagrant/Code/laravel-model-caching/src/CachedBuilder.php:28
/home/vagrant/Code/laravel-model-caching/src/CachedBuilder.php:203