Calculates any property changes.

@return  array
172167
public function calculateChangeSet()
    {
        $set = [];
        foreach ($this->current as $key => $current) {
            $original = isset($this->original[$key]) ? $this->original[$key] : null;
            $set[$key]['old'] = $original;
            $set[$key]['new'] = $current;
        }
        foreach ($this->remove as $key) {
            $set[$key]['old'] = $this->original[$key];
            $set[$key]['new'] = null;
        }
        ksort($set);
        return $set;
    }
1026882
public function getChangeSet()
    {
        $changeset = parent::getChangeSet();
        $changeset['hasOne']  = $this->filterNotSavedProperties($this->hasOneRelationships->calculateChangeSet());
        $changeset['hasMany'] = $this->filterNotSavedProperties($this->hasManyRelationships->calculateChangeSet());
        return $changeset;
    }
978260
public function computeChangeSets()
    {
        // Compute changes for INSERTed entities first. This must always happen.
        $this->computeScheduleInsertsChangeSets();

        // Compute changes for other MANAGED entities. Change tracking policies take effect here.
        foreach ($this->identityMap as $className => $entities) {
            $class = $this->em->getClassMetadata($className);

            // Skip class if instances are read-only
            if ($class->isReadOnly) {
                continue;
            }

            // If change tracking is explicit or happens through notification, then only compute
            // changes on entities of that type that are explicitly marked for synchronization.
            switch (true) {
                case ($class->isChangeTrackingDeferredImplicit()):
                    $entitiesToProcess = $entities;
                    break;

                case (isset($this->scheduledForSynchronization[$className])):
                    $entitiesToProcess = $this->scheduledForSynchronization[$className];
                    break;

                default:
                    $entitiesToProcess = array();

            }

            foreach ($entitiesToProcess as $entity) {
                // Ignore uninitialized proxy objects
                if ($entity instanceof Proxy && ! $entity->__isInitialized__) {
                    continue;
                }

                // Only MANAGED entities that are NOT SCHEDULED FOR INSERTION OR DELETION are processed here.
                $oid = spl_object_hash($entity);

                if ( ! isset($this->entityInsertions[$oid]) &&  ! isset($this->entityDeletions[$oid]) && isset($this->entityStates[$oid])) {
                    $this->computeChangeSet($class, $entity);
                }
            }
        }
    }
285904
public function getDataChangesList() {
        return DataChangeRecord::get()->filter([
            'ChangeRecordID' => $this->owner->ID,
            'ChangeRecordClass' => $this->owner->ClassName
        ]);
    }
759941
public function hasPendingChangesets()
    {
        $qb = $this->createQueryBuilder('ac')
            ->select('count(ac)')
            ->where('ac.status = :status')
            ->setParameter('status', AclChangeset::STATUS_NEW);

        return $qb->getQuery()->getSingleScalarResult() != 0;
    }
1202828
public function diff()
    {
        $result = [];

        foreach ($this->keys() as $key) {
            if ($diff = $this->equal($key)) {
                $result[] = $diff; continue;
            }

            if ($diff = $this->delete($key)) {
                $result[] = $diff;
            }

            if ($diff = $this->insert($key)) {
                $result[] = $diff;
            }
        }

        return $result;
    }
1036849
public function getChangedAttributes()
    {
        $output = array();

        foreach ($this->attributes as $name => $value) {
            if ($this->hasChanged($name)) {
                $output[$name] = $value;
            }
        }

        return $output;
    }
598729
public function getChanges() {
		if (!$this->listening) {
			return [];
		}
		stream_set_blocking($this->connection->getOutputStream(), 0);
		$lines = [];
		while (($line = $this->connection->readLine())) {
			$this->checkForError($line);
			$lines[] = $line;
		}
		stream_set_blocking($this->connection->getOutputStream(), 1);
		return array_values(array_filter(array_map([$this, 'parseChangeLine'], $lines)));
	}
44859
public function getComputedProperties()
    {
        $result = array();

        if($row = $this->getIterator()->current()) {
            $result = $row->getComputedProperties();
        }

        return $result;
    }
78812
public function visibleProperties()
    {
        $properties = array_keys($this->_properties);
        $properties = array_merge($properties, $this->_virtual);

        return array_diff($properties, $this->_hidden);
    }
280715
protected function getAssignedValues()
    {
        $tableFields = $this->getTableFields();
        $newPropertiesArray = get_object_vars($this);

        $columns = $values = $tableData = [];

        foreach ($newPropertiesArray as $index => $value) {
            if (in_array($index, $tableFields)) {
                array_push($columns, $index);
                array_push( $values, $value);
            }
        }

        $tableData['columns'] = $columns;
        $tableData['values'] = $values; 

        return $tableData;
    }
433810
public function getComputedProperties()
    {
        $result = array();

        if($entity = $this->getIterator()->current()) {
            $result = $entity->getComputedProperties();
        }

        return $result;
    }
1189326
public function hasChange()
    {
        return (
            count($this->getFieldsWithUpdate()) > 0
            || count($this->getIndexesWithUpdate()) > 0
            || $this->addSoftDelete
            || $this->dropSoftDelete
            || $this->addTimestamps
            || $this->dropTimestamps);
    }
557625
protected function getAvailableChangeSets()
    {
        return ChangeSet::get()
            ->filter('State', ChangeSet::STATE_OPEN)
            ->filterByCallback(function ($item) {
                /** @var ChangeSet $item */
                return $item->canView();
            });
    }
834134
public function changes()
    {
        $changes = [];
        foreach ($this->changedAttributes as $attrName => $originalValue) {
            $changes[$attrName] = [$originalValue, $this->attributes->get($attrName)];
        }
        return $changes;
    }
773482
private function totalChanges(): array
    {
        return DB::table('gedcom')
            ->leftJoin('change', static function (JoinClause $join): void {
                $join
                    ->on('change.gedcom_id', '=', 'gedcom.gedcom_id')
                    ->where('change.status', '=', 'pending');
            })
            ->groupBy('gedcom.gedcom_id')
            ->pluck(DB::raw('COUNT(change_id)'), 'gedcom.gedcom_id')
            ->all();
    }
991640
protected function hasChange()
	{
		return !( $this->bound1() == $this->model->getRight() || $this->bound1() == $this->model->getLeft() );
	}