public function propertyChanged($document, $propertyName, $oldValue, $newValue)
{
$oid = spl_object_hash($document);
$class = $this->dm->getClassMetadata(get_class($document));
if (!isset($class->fieldMappings[$propertyName])) {
return;
// ignore non-persistent fields
}
// Update changeset and mark document for synchronization
$this->documentChangeSets[$oid][$propertyName] = array($oldValue, $newValue);
if (!isset($this->scheduledForDirtyCheck[$class->name][$oid])) {
$this->scheduleForDirtyCheck($document);
}
}