diff --git a/core/lib/Drupal/Core/Entity/ContentEntityDatabaseStorage.php b/core/lib/Drupal/Core/Entity/ContentEntityDatabaseStorage.php
index 27c8e78..9e3f2e4 100644
--- a/core/lib/Drupal/Core/Entity/ContentEntityDatabaseStorage.php
+++ b/core/lib/Drupal/Core/Entity/ContentEntityDatabaseStorage.php
@@ -588,7 +588,7 @@ protected function invokeHook($hook, EntityInterface $entity) {
   /**
    * Maps from an entity object to the storage record.
    *
-   * @param \Drupal\Core\Entity\EntityInterface $entity
+   * @param \Drupal\Core\Entity\ContentEntityInterface $entity
    *   The entity object.
    * @param string $table_key
    *   (optional) The entity key identifying the target table. Defaults to
@@ -597,7 +597,7 @@ protected function invokeHook($hook, EntityInterface $entity) {
    * @return \stdClass
    *   The record to store.
    */
-  protected function mapToStorageRecord(EntityInterface $entity, $table_key = 'base_table') {
+  protected function mapToStorageRecord(ContentEntityInterface $entity, $table_key = 'base_table') {
     $record = new \stdClass();
     $values = array();
     $definitions = $entity->getFieldDefinitions();
@@ -612,7 +612,17 @@ protected function mapToStorageRecord(EntityInterface $entity, $table_key = 'bas
         $multi_column_fields[$field] = TRUE;
         continue;
       }
-      $values[$name] = isset($definitions[$name]) && isset($entity->$name->value) ? $entity->$name->value : NULL;
+      $values[$name] = NULL;
+      if (isset($definitions[$name])) {
+        $main_property = $definitions[$name]->getMainPropertyName();
+        if ($main_property && isset($entity->get($name)->$main_property)) {
+          $values[$name] = $entity->get($name)->$main_property;
+        }
+        elseif (!$main_property) {
+          // If there is no main property, get all values.
+          $values[$name] = $entity->get($name)->first()->getValue();
+        }
+      }
     }
 
     // Handle fields that store multiple properties and match each property name
diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/MapItem.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/MapItem.php
index 26cdc41..11c7e2c 100644
--- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/MapItem.php
+++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/MapItem.php
@@ -97,4 +97,19 @@ public function __set($name, $value) {
     }
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  public static function mainPropertyName() {
+    // A map item has no main property.
+    return NULL;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function isEmpty() {
+    return empty($this->values);
+  }
+
 }
diff --git a/core/modules/shortcut/src/Entity/Shortcut.php b/core/modules/shortcut/src/Entity/Shortcut.php
index 5807c66..03be8c8 100644
--- a/core/modules/shortcut/src/Entity/Shortcut.php
+++ b/core/modules/shortcut/src/Entity/Shortcut.php
@@ -100,15 +100,14 @@ public function setRouteName($route_name) {
    * {@inheritdoc}
    */
   public function getRouteParams() {
-    $value = $this->get('route_parameters')->getValue();
-    return reset($value);
+    return $this->get('route_parameters')->first()->getValue();
   }
 
   /**
    * {@inheritdoc}
    */
   public function setRouteParams($route_parameters) {
-    $this->set('route_parameters', array('value' => $route_parameters));
+    $this->set('route_parameters', array($route_parameters));
     return $this;
   }
 
