/** * @param AbstractDbEntity $dbEntity * @return array */ protected function getPrimaryKeyWhereParameters(AbstractDbEntity $dbEntity) { if (is_array($dbEntity->getPrimaryDbPropertyKey())) { $whereParameters = $dbEntity->getPrimaryDbValue(); } else { $whereParameters = [$dbEntity->getPrimaryDbValue()]; } return $whereParameters; }
/** * Merges other object's modified database data into this object. * * @param AbstractDbEntity $otherEntity */ public function mergeWith(AbstractDbEntity $otherEntity) { $dataToMerge = $otherEntity->getModifiedDbData(); $this->setDbData($dataToMerge); }