public function isChanged() { // When unbound, use the local changed flag if (!$this->record instanceof DataObject) { return $this->isChanged; } // Defer to parent record foreach ($this->compositeDatabaseFields() as $field => $spec) { $key = $this->getName() . $field; if ($this->record->isChanged($key)) { return true; } } return false; }