During the "saved" event, the reload() method is called, which, in turn calls getFreshInstance() and wipes out all relations that were on the model before save.
This breaks laravel's $model->push() method because it removes any relations that could be recursively saved.
Our use case involves a Hierarchical reference list that also carries translations as a relation. When we call push() all translations are wiped out because Baum loaded a fresh instance and tried to replace its relations with the empty set from the new model instance.
During the "saved" event, the reload() method is called, which, in turn calls getFreshInstance() and wipes out all relations that were on the model before save.
This breaks laravel's $model->push() method because it removes any relations that could be recursively saved.
Our use case involves a Hierarchical reference list that also carries translations as a relation. When we call push() all translations are wiped out because Baum loaded a fresh instance and tried to replace its relations with the empty set from the new model instance.
This pull request fixes that issue.