diff --git a/core/lib/Drupal/Core/Entity/DatabaseStorageController.php b/core/lib/Drupal/Core/Entity/DatabaseStorageController.php
index 5eeb637..d18903c 100644
--- a/core/lib/Drupal/Core/Entity/DatabaseStorageController.php
+++ b/core/lib/Drupal/Core/Entity/DatabaseStorageController.php
@@ -116,6 +116,12 @@ public function __construct($entity_type, array $entity_info, Connection $databa
   public function loadMultiple(array $ids = NULL) {
     $entities = array();
 
+    // Filter out IDs that do not match the entity key data type.
+    if (!empty($ids) && isset($this->entityInfo['entity_keys']['datatype']) && $this->entityInfo['entity_keys']['datatype'] == 'integer') {
+      $ids = array_filter($ids, 'is_numeric');
+      $ids = array_map('intval', $ids);
+    }
+
     // Create a new variable which is either a prepared version of the $ids
     // array for later comparison with the entity cache, or FALSE if no $ids
     // were passed. The $ids array is reduced as items are loaded from cache,
diff --git a/core/modules/node/lib/Drupal/node/Plugin/Core/Entity/Node.php b/core/modules/node/lib/Drupal/node/Plugin/Core/Entity/Node.php
index 6572ba9..c34cb76 100644
--- a/core/modules/node/lib/Drupal/node/Plugin/Core/Entity/Node.php
+++ b/core/modules/node/lib/Drupal/node/Plugin/Core/Entity/Node.php
@@ -45,6 +45,7 @@
  *     "bundle" = "type",
  *     "label" = "title",
  *     "uuid" = "uuid"
+ *     "datatype" = "integer"
  *   },
  *   bundle_keys = {
  *     "bundle" = "type"
