baum icon indicating copy to clipboard operation
baum copied to clipboard

Baum + Soft Deleting throws ModelNotFoundException

Open tristanthar opened this issue 7 years ago • 0 comments

I enabled soft deleting on my Profile model, and since that Baum throws a ModelNotFoundException whenever I try to call ->save() on my Profile model instances.

I managed to track down the issue to Baum's setDepth() method, where it calls the reload() method. There, it gets a fresh instance of the Model with $fresh = $this->getFreshInstance();, but that returns null and therefore the exception is throwed.

Any ideas how to fix this without breaking Baum functionality?

tristanthar avatar Jul 27 '17 00:07 tristanthar