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