Eloquent on steroids, implements RoR like ActiveRecord features as traits, including in-model validations, user stamping, declarative relations, cascaded operations on relations (save, delete).
All models use $ExistingAttributesPersistence_tableColumns defined as class variable in Mortimer\Poignant\Model to store their existing column names. When the model eloquent.saving event handler tries to access the variable later, $ExistingAttributesPersistence_tableColumns contains the columns of the last model that called bootExistingAttributesPersistence.
As a result, ExistingAttributesPersistence trait deletes all model attributes in most cases.
All models use
$ExistingAttributesPersistence_tableColumns
defined as class variable in Mortimer\Poignant\Model to store their existing column names. When the modeleloquent.saving
event handler tries to access the variable later,$ExistingAttributesPersistence_tableColumns
contains the columns of the last model that calledbootExistingAttributesPersistence
.As a result,
ExistingAttributesPersistence
trait deletes all model attributes in most cases.