mini\Database\Model::isDirty()
Method
public
Signature
public function isDirty(): ?array
Returns
?array
Documentation
Check which properties have changed since the entity was loaded (or last saved).
Returns null if the entity is clean or was never loaded from the database (new entities are not considered dirty — they have no original state).
Returns an associative array of original values for changed properties: ['name' => 'Old Name', 'email' => 'old@example.com']
The caller can get the new values from the entity itself.