mmanos / laravel-metable

A meta package for Laravel 4 models.
MIT License
13 stars 3 forks source link

Meta pivot table cache relation bug #6

Closed dmyers closed 4 years ago

dmyers commented 8 years ago

@mmanos There's some issue where if you call $model->setMeta('key', 'value') more than once it that it will actually attempt to create another meta pivot record via findOrCreateMeta() which when that tries to find a meta it uses an array that is out of date with Laravel and the only way to solve is after calling unset($model->metas) on the cached relation. I suspect this might affect unsetMetas() as well so this really would be nice to solve in this package somehow.