diff --git a/src/EventSubscriber/FieldStorageSubscriber.php b/src/EventSubscriber/FieldStorageSubscriber.php
index a8eef23..d8fc06c 100644
--- a/src/EventSubscriber/FieldStorageSubscriber.php
+++ b/src/EventSubscriber/FieldStorageSubscriber.php
@@ -140,12 +140,18 @@ class FieldStorageSubscriber implements EventSubscriberInterface {
         }
         $tables[$table][] = $column;
         if ($entity_type->isRevisionable() && ($storage_definitions[$field_name]->isRevisionable())) {
-          if ($mapping->requiresDedicatedTableStorage($field_storage_definition)) {
-            $tables[$mapping->getDedicatedRevisionTableName($storage_definitions[$field_name])][] = $column;
+          try {
+            if ($mapping->requiresDedicatedTableStorage($storage_definitions[$field_name])) {
+              $tables[$mapping->getDedicatedRevisionTableName($storage_definitions[$field_name])][] = $column;
+            }
+            elseif ($mapping->allowsSharedTableStorage($storage_definitions[$field_name])) {
+              $revision_table = $entity_type->getRevisionDataTable() ?: $entity_type->getRevisionTable();
+              $tables[$revision_table][] = $column;
+              $tables[$revision_table] = array_unique($tables[$revision_table]);
+            }
           }
-          elseif ($mapping->allowsSharedTableStorage($field_storage_definition)) {
-            $revision_table = $entity_type->getRevisionDataTable() ?: $entity_type->getRevisionTable();
-            $tables[$revision_table][] = $column;
+          catch (SqlContentEntityStorageException $e) {
+            // Nothing to do if the revision table doesn't exist.
           }
         }
       }
diff --git a/tests/modules/dynamic_entity_reference_entity_test/dynamic_entity_reference_entity_test.module b/tests/modules/dynamic_entity_reference_entity_test/dynamic_entity_reference_entity_test.module
index 34778a3..bf8c54c 100644
--- a/tests/modules/dynamic_entity_reference_entity_test/dynamic_entity_reference_entity_test.module
+++ b/tests/modules/dynamic_entity_reference_entity_test/dynamic_entity_reference_entity_test.module
@@ -15,12 +15,34 @@ use Drupal\Core\StringTranslation\TranslatableMarkup;
 function dynamic_entity_reference_entity_test_entity_base_field_info(EntityTypeInterface $entity_type) {
   $fields = [];
   // 'entity_test' with no data table and 'entity_test_mul' is with data table.
-  if ($entity_type->id() == 'entity_test' || $entity_type->id() == 'entity_test_mul') {
+  $test_entities  = \Drupal::state()->get('dynamic_entity_reference_entity_test_entities', ['entity_test', 'entity_test_mul']);
+  $excluded_entity = \Drupal::state()->get('dynamic_entity_reference_entity_test_exclude', []);
+  if (in_array($entity_type->id(), $test_entities)) {
+    $allowed_entities = array_diff($test_entities, $excluded_entity);
+    $settings = [
+      'exclude_entity_types' => FALSE,
+      'entity_type_ids' => array_combine($allowed_entities, $allowed_entities),
+    ];
+    foreach ($test_entities as $entity_type_id) {
+      if (!in_array($entity_type_id, $excluded_entity)) {
+        $settings += [
+          $entity_type_id => [
+            'handler' => "default:$entity_type_id",
+            'handler_settings' => [
+              'target_bundles' => [
+                $entity_type_id => $entity_type_id,
+              ],
+            ],
+          ],
+        ];
+      }
+    }
     $fields['dynamic_references'] = BaseFieldDefinition::create('dynamic_entity_reference')
       ->setName('dynamic_references')
       ->setLabel((string) new TranslatableMarkup('References'))
       ->setDescription((string) new TranslatableMarkup('Reference another entity.'))
       ->setRequired(FALSE)
+      ->setRevisionable(\Drupal::state()->get('dynamic_entity_reference_entity_test_revisionable', FALSE))
       ->setCardinality(\Drupal::state()->get('dynamic_entity_reference_entity_test_cardinality', 1))
       ->setDisplayOptions('form', [
         'type' => 'dynamic_entity_reference_default',
@@ -32,50 +54,8 @@ function dynamic_entity_reference_entity_test_entity_base_field_info(EntityTypeI
         'weight' => 10,
       ])
       ->setDisplayConfigurable('form', TRUE)
-      ->setDisplayConfigurable('view', TRUE);
-    if (\Drupal::state()->get('dynamic_entity_reference_entity_test_exclude', '') == 'entity_test') {
-      $fields['dynamic_references']
-        ->setSettings([
-          'exclude_entity_types' => FALSE,
-          'entity_type_ids' => [
-            'entity_test_mul' => 'entity_test_mul',
-          ],
-          'entity_test_mul' => [
-            'handler' => "default:entity_test_mul",
-            'handler_settings' => [
-              'target_bundles' => [
-                'entity_test_mul' => 'entity_test_mul',
-              ],
-            ],
-          ],
-        ]);
-    }
-    else {
-      $fields['dynamic_references']
-        ->setSettings([
-          'exclude_entity_types' => FALSE,
-          'entity_type_ids' => [
-            'entity_test' => 'entity_test',
-            'entity_test_mul' => 'entity_test_mul',
-          ],
-          'entity_test' => [
-            'handler' => "default:entity_test",
-            'handler_settings' => [
-              'target_bundles' => [
-                'entity_test' => 'entity_test',
-              ],
-            ],
-          ],
-          'entity_test_mul' => [
-            'handler' => "default:entity_test_mul",
-            'handler_settings' => [
-              'target_bundles' => [
-                'entity_test_mul' => 'entity_test_mul',
-              ],
-            ],
-          ],
-        ]);
-    }
+      ->setDisplayConfigurable('view', TRUE)
+      ->setSettings($settings);
     if (\Drupal::state()->get('dynamic_entity_reference_entity_test_with_two_base_fields', FALSE)) {
       $fields['der'] = BaseFieldDefinition::createFromFieldStorageDefinition($fields['dynamic_references'])
         ->setName('der');
diff --git a/tests/src/Kernel/DynamicEntityReferenceBaseFieldRevisionTest.php b/tests/src/Kernel/DynamicEntityReferenceBaseFieldRevisionTest.php
new file mode 100644
index 0000000..0ecfaea
--- /dev/null
+++ b/tests/src/Kernel/DynamicEntityReferenceBaseFieldRevisionTest.php
@@ -0,0 +1,584 @@
+<?php
+
+namespace Drupal\Tests\dynamic_entity_reference\Kernel;
+
+use Drupal\config\Tests\SchemaCheckTestTrait;
+use Drupal\Core\Field\FieldStorageDefinitionInterface;
+use Drupal\KernelTests\Core\Entity\EntityKernelTestBase;
+
+/**
+ * Tests for the dynamic entity reference base field for revisionable entities.
+ *
+ * @group dynamic_entity_reference
+ */
+class DynamicEntityReferenceBaseFieldRevisionTest extends EntityKernelTestBase {
+
+  use SchemaCheckTestTrait;
+
+  /**
+   * The entity type used in this test.
+   *
+   * @var string
+   */
+  protected $entityType = 'entity_test_rev';
+
+  /**
+   * The entity type that is being referenced.
+   *
+   * @var string
+   */
+  protected $referencedEntityType = 'entity_test_mulrev';
+
+  /**
+   * The bundle used in this test.
+   *
+   * @var string
+   */
+  protected $bundle = 'entity_test_rev';
+
+  /**
+   * The name of the field used in this test.
+   *
+   * @var string
+   */
+  protected $fieldName = 'dynamic_references';
+
+  /**
+   * Modules to install.
+   *
+   * @var array
+   */
+  public static $modules = ['dynamic_entity_reference'];
+
+  /**
+   * Tests non-revisionable reference field validation.
+   */
+  public function testEntityReferenceNonRevisionableFieldValidation() {
+    \Drupal::state()->set('dynamic_entity_reference_entity_test_entities', [$this->entityType, $this->referencedEntityType]);
+    \Drupal::state()->set('dynamic_entity_reference_entity_test_cardinality', 1);
+    \Drupal::state()->set('dynamic_entity_reference_entity_test_exclude', [$this->entityType]);
+    $this->enableModules(['dynamic_entity_reference_entity_test']);
+    \Drupal::entityDefinitionUpdateManager()->applyUpdates();
+    $this->installEntitySchema($this->entityType);
+    $this->installEntitySchema($this->referencedEntityType);
+    $entity_type_manager = \Drupal::entityTypeManager();
+    // Test a valid reference.
+    $referenced_entity = $entity_type_manager
+      ->getStorage($this->referencedEntityType)
+      ->create(['type' => $this->bundle]);
+    $referenced_entity->save();
+
+    $entity = $entity_type_manager
+      ->getStorage($this->entityType)
+      ->create(['type' => $this->bundle]);
+    $entity->{$this->fieldName}->target_type = $referenced_entity->getEntityTypeId();
+    $entity->{$this->fieldName}->target_id = $referenced_entity->id();
+    $violations = $entity->{$this->fieldName}->validate();
+    $this->assertEquals($violations->count(), 0, 'Validation passes.');
+
+    $entity = $entity_type_manager
+      ->getStorage($this->entityType)
+      ->create(['type' => $this->bundle]);
+    $entity->{$this->fieldName}->entity = $referenced_entity;
+    $violations = $entity->{$this->fieldName}->validate();
+    $this->assertEquals($violations->count(), 0, 'Validation passes.');
+
+    // Test an invalid reference.
+    $entity = $entity_type_manager
+      ->getStorage($this->entityType)
+      ->create(['type' => $this->bundle]);
+    $entity->{$this->fieldName}->target_type = $referenced_entity->getEntityTypeId();
+    $entity->{$this->fieldName}->target_id = 9999;
+    $violations = $entity->{$this->fieldName}->validate();
+    $this->assertEquals($violations->count(), 1, 'Validation throws a violation.');
+    $this->assertEquals($violations[0]->getMessage(), t('The referenced entity (%type: %id) does not exist.', ['%type' => $this->referencedEntityType, '%id' => 9999]));
+
+    // Test an invalid target_type.
+    $entity = $entity_type_manager
+      ->getStorage($this->entityType)
+      ->create(['type' => $this->bundle]);
+    $entity->{$this->fieldName}->target_type = $entity->getEntityTypeId();
+    $entity->{$this->fieldName}->target_id = $referenced_entity->id();
+    $violations = $entity->{$this->fieldName}->validate();
+    $this->assertEquals($violations->count(), 1, 'Validation throws a violation.');
+    $this->assertEquals($violations[0]->getMessage(), t('The referenced entity (%type: %id) does not exist.', ['%type' => $this->entityType, '%id' => $referenced_entity->id()]));
+
+    // Test an invalid entity.
+    $entity = $entity_type_manager
+      ->getStorage($this->entityType)
+      ->create(['type' => $this->bundle]);
+    $entity->{$this->fieldName}->entity = $entity;
+    $violations = $entity->{$this->fieldName}->validate();
+    $this->assertEquals($violations->count(), 1, 'Validation throws a violation.');
+    $this->assertEquals($violations[0]->getMessage(), t('The referenced entity (%type: %id) does not exist.', ['%type' => $this->entityType, '%id' => NULL]));
+
+    // @todo Implement a test case for invalid bundle references after
+    // https://drupal.org/node/2064191 is fixed
+  }
+
+  /**
+   * Tests the multiple target entities loader.
+   */
+  public function testNonRevisionableReferencedEntitiesMultipleLoad() {
+    \Drupal::state()->set('dynamic_entity_reference_entity_test_entities', [$this->entityType, $this->referencedEntityType]);
+    \Drupal::state()->set('dynamic_entity_reference_entity_test_cardinality', FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED);
+    \Drupal::state()->set('dynamic_entity_reference_entity_test_exclude', [$this->entityType]);
+    $this->enableModules(['dynamic_entity_reference_entity_test']);
+    \Drupal::entityDefinitionUpdateManager()->applyUpdates();
+    $this->installEntitySchema($this->entityType);
+    $this->installEntitySchema($this->referencedEntityType);
+    $entity_type_manager = \Drupal::entityTypeManager();
+    // Create the parent entity.
+    $entity = $entity_type_manager
+      ->getStorage($this->entityType)
+      ->create(['type' => $this->bundle]);
+
+    // Create three target entities and attach them to parent field.
+    $target_entities = [];
+    $reference_field = [];
+    for ($i = 0; $i < 3; $i++) {
+      $target_entity = $entity_type_manager
+        ->getStorage($this->referencedEntityType)
+        ->create(['type' => $this->bundle]);
+      $target_entity->save();
+      $target_entities[] = $target_entity;
+      $reference_field[] = ['target_id' => $target_entity->id(), 'target_type' => $this->referencedEntityType];
+    }
+
+    // Also attach a non-existent entity and a NULL target id.
+    $reference_field[3]['target_id'] = 99999;
+    $reference_field[3]['target_type'] = $this->referencedEntityType;
+    $target_entities[3] = NULL;
+    $reference_field[4]['target_id'] = NULL;
+    $reference_field[4]['target_type'] = $this->referencedEntityType;
+    $target_entities[4] = NULL;
+
+    // Also attach a non-existent entity and a NULL target id.
+    $reference_field[5]['target_id'] = 99999;
+    $reference_field[5]['target_type'] = $this->entityType;
+    $target_entities[5] = NULL;
+    $reference_field[6]['target_id'] = NULL;
+    $reference_field[6]['target_type'] = NULL;
+    $target_entities[6] = NULL;
+
+    // Attach the first created target entity as the sixth item ($delta == 5) of
+    // the parent entity field. We want to test the case when the same target
+    // entity is referenced twice (or more times) in the same entity reference
+    // field.
+    $reference_field[7] = $reference_field[0];
+    $target_entities[7] = $target_entities[0];
+
+    // Create a new target entity that is not saved, thus testing the
+    // "autocreate" feature.
+    $target_entity_unsaved = $entity_type_manager
+      ->getStorage($this->referencedEntityType)
+      ->create(['type' => $this->bundle, 'name' => $this->randomString()]);
+    $reference_field[8]['entity'] = $target_entity_unsaved;
+    $target_entities[8] = $target_entity_unsaved;
+
+    // Set the field value.
+    $entity->{$this->fieldName}->setValue($reference_field);
+
+    // Load target entities using EntityReferenceField::referencedEntities().
+    $entities = $entity->{$this->fieldName}->referencedEntities();
+
+    // Test returned entities:
+    // - Deltas must be preserved.
+    // - Non-existent entities must not be retrieved in target entities result.
+    foreach ($target_entities as $delta => $target_entity) {
+      if (!empty($target_entity)) {
+        if (!$target_entity->isNew()) {
+          // There must be an entity in the loaded set having the same id for
+          // the same delta.
+          $this->assertEquals($target_entity->id(), $entities[$delta]->id());
+        }
+        else {
+          // For entities that were not yet saved, there must an entity in the
+          // loaded set having the same label for the same delta.
+          $this->assertEquals($target_entity->label(), $entities[$delta]->label());
+        }
+      }
+      else {
+        // A non-existent or NULL entity target id must not return any item in
+        // the target entities set.
+        $this->assertFalse(isset($entities[$delta]));
+      }
+    }
+  }
+
+  /**
+   * Tests the multiple non-revisionable basefields.
+   */
+  public function testNonRevisionableMultipleEntityReference() {
+    \Drupal::state()->set('dynamic_entity_reference_entity_test_entities', [$this->entityType, $this->referencedEntityType]);
+    \Drupal::state()->set('dynamic_entity_reference_entity_test_with_two_base_fields', TRUE);
+    $this->enableModules(['dynamic_entity_reference_entity_test']);
+    \Drupal::entityDefinitionUpdateManager()->applyUpdates();
+    $this->installEntitySchema($this->entityType);
+    $this->installEntitySchema($this->referencedEntityType);
+
+    // Create some test entities which link each other.
+    $referenced_entity = $this->container
+      ->get('entity_type.manager')
+      ->getStorage($this->entityType)
+      ->create();;
+    $referenced_entity->save();
+    $referenced_entity_mul = $this->container
+      ->get('entity_type.manager')
+      ->getStorage($this->referencedEntityType)
+      ->create();
+    $referenced_entity_mul->save();
+
+    $entity = $this->container
+      ->get('entity_type.manager')
+      ->getStorage($this->entityType)
+      ->create();
+    $entity->dynamic_references[] = $referenced_entity;
+    $entity->der[] = $referenced_entity_mul;
+    $entity->save();
+    // Loads an unchanged entity from the database.
+    $entity = $this->container
+      ->get('entity_type.manager')
+      ->getStorage($this->entityType)
+      ->loadUnchanged($entity->id());
+
+    // Check references correctly for dynamic_references field.
+    $this->assertEquals($entity->dynamic_references[0]->target_id, $referenced_entity->id());
+    $this->assertEquals($entity->dynamic_references[0]->target_type, $referenced_entity->getEntityTypeId());
+    $this->assertEquals($entity->dynamic_references[0]->entity->getName(), $referenced_entity->getName());
+    $this->assertEquals($entity->dynamic_references[0]->entity->id(), $referenced_entity->id());
+    $this->assertEquals($entity->dynamic_references[0]->entity->uuid(), $referenced_entity->uuid());
+
+    // Check references correctly for der field.
+    $this->assertEquals($entity->der[0]->target_id, $referenced_entity_mul->id());
+    $this->assertEquals($entity->der[0]->target_type, $referenced_entity_mul->getEntityTypeId());
+    $this->assertEquals($entity->der[0]->entity->getName(), $referenced_entity_mul->getName());
+    $this->assertEquals($entity->der[0]->entity->id(), $referenced_entity_mul->id());
+    $this->assertEquals($entity->der[0]->entity->uuid(), $referenced_entity_mul->uuid());
+
+    // Check the data in DB columns.
+    $database = $this->container
+      ->get('database');
+    $int_column = $database->query('SELECT dynamic_references__target_id_int FROM {entity_test_rev}')->fetchCol();
+    $str_column = $database->query('SELECT dynamic_references__target_id FROM {entity_test_rev}')->fetchCol();
+    $this->assertSame($int_column, $str_column);
+    $int_column = $database->query('SELECT der__target_id_int FROM {entity_test_rev}')->fetchCol();
+    $str_column = $database->query('SELECT der__target_id FROM {entity_test_rev}')->fetchCol();
+    $this->assertSame($int_column, $str_column);
+    $int_column = $database->query('SELECT dynamic_references__target_id_int FROM {entity_test_mulrev_property_data}')->fetchCol();
+    $str_column = $database->query('SELECT dynamic_references__target_id FROM {entity_test_mulrev_property_data}')->fetchCol();
+    $this->assertSame($int_column, $str_column);
+    $int_column = $database->query('SELECT der__target_id_int FROM {entity_test_mulrev_property_data}')->fetchCol();
+    $str_column = $database->query('SELECT der__target_id FROM {entity_test_mulrev_property_data}')->fetchCol();
+    $this->assertSame($int_column, $str_column);
+
+    $entity = $this->container
+      ->get('entity_type.manager')
+      ->getStorage($this->referencedEntityType)
+      ->create();
+    $entity->der[] = $referenced_entity;
+    $entity->dynamic_references[] = $referenced_entity_mul;
+    $entity->save();
+    // Loads an unchanged entity from the database.
+    $entity = $this->container
+      ->get('entity_type.manager')
+      ->getStorage($this->referencedEntityType)
+      ->loadUnchanged($entity->id());
+
+    // Check references correctly for dynamic_references field.
+    $this->assertEquals($entity->dynamic_references[0]->target_id, $referenced_entity_mul->id());
+    $this->assertEquals($entity->dynamic_references[0]->target_type, $referenced_entity_mul->getEntityTypeId());
+    $this->assertEquals($entity->dynamic_references[0]->entity->getName(), $referenced_entity_mul->getName());
+    $this->assertEquals($entity->dynamic_references[0]->entity->id(), $referenced_entity_mul->id());
+    $this->assertEquals($entity->dynamic_references[0]->entity->uuid(), $referenced_entity_mul->uuid());
+
+    // Check references correctly for der field.
+    $this->assertEquals($entity->der[0]->target_id, $referenced_entity->id());
+    $this->assertEquals($entity->der[0]->target_type, $referenced_entity->getEntityTypeId());
+    $this->assertEquals($entity->der[0]->entity->getName(), $referenced_entity->getName());
+    $this->assertEquals($entity->der[0]->entity->id(), $referenced_entity->id());
+    $this->assertEquals($entity->der[0]->entity->uuid(), $referenced_entity->uuid());
+
+    // Check the data in DB columns.
+    $int_column = $database->query('SELECT dynamic_references__target_id_int FROM {entity_test_rev}')->fetchCol();
+    $str_column = $database->query('SELECT dynamic_references__target_id FROM {entity_test_rev}')->fetchCol();
+    $this->assertSame($int_column, $str_column);
+    $int_column = $database->query('SELECT der__target_id_int FROM {entity_test_rev}')->fetchCol();
+    $str_column = $database->query('SELECT der__target_id FROM {entity_test_rev}')->fetchCol();
+    $this->assertSame($int_column, $str_column);
+    $int_column = $database->query('SELECT dynamic_references__target_id_int FROM {entity_test_mulrev_property_data}')->fetchCol();
+    $str_column = $database->query('SELECT dynamic_references__target_id FROM {entity_test_mulrev_property_data}')->fetchCol();
+    $this->assertSame($int_column, $str_column);
+    $int_column = $database->query('SELECT der__target_id_int FROM {entity_test_mulrev_property_data}')->fetchCol();
+    $str_column = $database->query('SELECT der__target_id FROM {entity_test_mulrev_property_data}')->fetchCol();
+    $this->assertSame($int_column, $str_column);
+  }
+
+  /**
+   * Tests revisionable reference field validation.
+   */
+  public function testEntityReferenceRevisionableFieldValidation() {
+    \Drupal::state()->set('dynamic_entity_reference_entity_test_entities', [$this->entityType, $this->referencedEntityType]);
+    \Drupal::state()->set('dynamic_entity_reference_entity_test_cardinality', 1);
+    \Drupal::state()->set('dynamic_entity_reference_entity_test_exclude', [$this->entityType]);
+    \Drupal::state()->set('dynamic_entity_reference_entity_test_revisionable', TRUE);
+    $this->enableModules(['dynamic_entity_reference_entity_test']);
+    \Drupal::entityDefinitionUpdateManager()->applyUpdates();
+    $this->installEntitySchema($this->entityType);
+    $this->installEntitySchema($this->referencedEntityType);
+    $entity_type_manager = \Drupal::entityTypeManager();
+    // Test a valid reference.
+    $referenced_entity = $entity_type_manager
+      ->getStorage($this->referencedEntityType)
+      ->create(['type' => $this->bundle]);
+    $referenced_entity->save();
+
+    $entity = $entity_type_manager
+      ->getStorage($this->entityType)
+      ->create(['type' => $this->bundle]);
+    $entity->{$this->fieldName}->target_type = $referenced_entity->getEntityTypeId();
+    $entity->{$this->fieldName}->target_id = $referenced_entity->id();
+    $violations = $entity->{$this->fieldName}->validate();
+    $this->assertEquals($violations->count(), 0, 'Validation passes.');
+
+    $entity = $entity_type_manager
+      ->getStorage($this->entityType)
+      ->create(['type' => $this->bundle]);
+    $entity->{$this->fieldName}->entity = $referenced_entity;
+    $violations = $entity->{$this->fieldName}->validate();
+    $this->assertEquals($violations->count(), 0, 'Validation passes.');
+
+    // Test an invalid reference.
+    $entity = $entity_type_manager
+      ->getStorage($this->entityType)
+      ->create(['type' => $this->bundle]);
+    $entity->{$this->fieldName}->target_type = $referenced_entity->getEntityTypeId();
+    $entity->{$this->fieldName}->target_id = 9999;
+    $violations = $entity->{$this->fieldName}->validate();
+    $this->assertEquals($violations->count(), 1, 'Validation throws a violation.');
+    $this->assertEquals($violations[0]->getMessage(), t('The referenced entity (%type: %id) does not exist.', ['%type' => $this->referencedEntityType, '%id' => 9999]));
+
+    // Test an invalid target_type.
+    $entity = $entity_type_manager
+      ->getStorage($this->entityType)
+      ->create(['type' => $this->bundle]);
+    $entity->{$this->fieldName}->target_type = $entity->getEntityTypeId();
+    $entity->{$this->fieldName}->target_id = $referenced_entity->id();
+    $violations = $entity->{$this->fieldName}->validate();
+    $this->assertEquals($violations->count(), 1, 'Validation throws a violation.');
+    $this->assertEquals($violations[0]->getMessage(), t('The referenced entity (%type: %id) does not exist.', ['%type' => $this->entityType, '%id' => $referenced_entity->id()]));
+
+    // Test an invalid entity.
+    $entity = $entity_type_manager
+      ->getStorage($this->entityType)
+      ->create(['type' => $this->bundle]);
+    $entity->{$this->fieldName}->entity = $entity;
+    $violations = $entity->{$this->fieldName}->validate();
+    $this->assertEquals($violations->count(), 1, 'Validation throws a violation.');
+    $this->assertEquals($violations[0]->getMessage(), t('The referenced entity (%type: %id) does not exist.', ['%type' => $this->entityType, '%id' => NULL]));
+
+    // @todo Implement a test case for invalid bundle references after
+    // https://drupal.org/node/2064191 is fixed
+  }
+
+  /**
+   * Tests the multiple target entities loader.
+   */
+  public function testRevisionableReferencedEntitiesMultipleLoad() {
+    \Drupal::state()->set('dynamic_entity_reference_entity_test_entities', [$this->entityType, $this->referencedEntityType]);
+    \Drupal::state()->set('dynamic_entity_reference_entity_test_cardinality', FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED);
+    \Drupal::state()->set('dynamic_entity_reference_entity_test_exclude', [$this->entityType]);
+    \Drupal::state()->set('dynamic_entity_reference_entity_test_revisionable', TRUE);
+    $this->enableModules(['dynamic_entity_reference_entity_test']);
+    \Drupal::entityDefinitionUpdateManager()->applyUpdates();
+    $this->installEntitySchema($this->entityType);
+    $this->installEntitySchema($this->referencedEntityType);
+    $entity_type_manager = \Drupal::entityTypeManager();
+    // Create the parent entity.
+    $entity = $entity_type_manager
+      ->getStorage($this->entityType)
+      ->create(['type' => $this->bundle]);
+
+    // Create three target entities and attach them to parent field.
+    $target_entities = [];
+    $reference_field = [];
+    for ($i = 0; $i < 3; $i++) {
+      $target_entity = $entity_type_manager
+        ->getStorage($this->referencedEntityType)
+        ->create(['type' => $this->bundle]);
+      $target_entity->save();
+      $target_entities[] = $target_entity;
+      $reference_field[] = ['target_id' => $target_entity->id(), 'target_type' => $this->referencedEntityType];
+    }
+
+    // Also attach a non-existent entity and a NULL target id.
+    $reference_field[3]['target_id'] = 99999;
+    $reference_field[3]['target_type'] = $this->referencedEntityType;
+    $target_entities[3] = NULL;
+    $reference_field[4]['target_id'] = NULL;
+    $reference_field[4]['target_type'] = $this->referencedEntityType;
+    $target_entities[4] = NULL;
+
+    // Also attach a non-existent entity and a NULL target id.
+    $reference_field[5]['target_id'] = 99999;
+    $reference_field[5]['target_type'] = $this->entityType;
+    $target_entities[5] = NULL;
+    $reference_field[6]['target_id'] = NULL;
+    $reference_field[6]['target_type'] = NULL;
+    $target_entities[6] = NULL;
+
+    // Attach the first created target entity as the sixth item ($delta == 5) of
+    // the parent entity field. We want to test the case when the same target
+    // entity is referenced twice (or more times) in the same entity reference
+    // field.
+    $reference_field[7] = $reference_field[0];
+    $target_entities[7] = $target_entities[0];
+
+    // Create a new target entity that is not saved, thus testing the
+    // "autocreate" feature.
+    $target_entity_unsaved = $entity_type_manager
+      ->getStorage($this->referencedEntityType)
+      ->create(['type' => $this->bundle, 'name' => $this->randomString()]);
+    $reference_field[8]['entity'] = $target_entity_unsaved;
+    $target_entities[8] = $target_entity_unsaved;
+
+    // Set the field value.
+    $entity->{$this->fieldName}->setValue($reference_field);
+
+    // Load target entities using EntityReferenceField::referencedEntities().
+    $entities = $entity->{$this->fieldName}->referencedEntities();
+
+    // Test returned entities:
+    // - Deltas must be preserved.
+    // - Non-existent entities must not be retrieved in target entities result.
+    foreach ($target_entities as $delta => $target_entity) {
+      if (!empty($target_entity)) {
+        if (!$target_entity->isNew()) {
+          // There must be an entity in the loaded set having the same id for
+          // the same delta.
+          $this->assertEquals($target_entity->id(), $entities[$delta]->id());
+        }
+        else {
+          // For entities that were not yet saved, there must an entity in the
+          // loaded set having the same label for the same delta.
+          $this->assertEquals($target_entity->label(), $entities[$delta]->label());
+        }
+      }
+      else {
+        // A non-existent or NULL entity target id must not return any item in
+        // the target entities set.
+        $this->assertFalse(isset($entities[$delta]));
+      }
+    }
+  }
+
+  /**
+   * Tests the multiple revisionable basefields.
+   */
+  public function testRevisionableMultipleEntityReference() {
+    \Drupal::state()->set('dynamic_entity_reference_entity_test_entities', [$this->entityType, $this->referencedEntityType]);
+    \Drupal::state()->set('dynamic_entity_reference_entity_test_with_two_base_fields', TRUE);
+    \Drupal::state()->set('dynamic_entity_reference_entity_test_revisionable', TRUE);
+    $this->enableModules(['dynamic_entity_reference_entity_test']);
+    \Drupal::entityDefinitionUpdateManager()->applyUpdates();
+    $this->installEntitySchema($this->entityType);
+    $this->installEntitySchema($this->referencedEntityType);
+
+    // Create some test entities which link each other.
+    $referenced_entity = $this->container
+      ->get('entity_type.manager')
+      ->getStorage($this->entityType)
+      ->create();;
+    $referenced_entity->save();
+    $referenced_entity_mul = $this->container
+      ->get('entity_type.manager')
+      ->getStorage($this->referencedEntityType)
+      ->create();
+    $referenced_entity_mul->save();
+
+    $entity = $this->container
+      ->get('entity_type.manager')
+      ->getStorage($this->entityType)
+      ->create();
+    $entity->dynamic_references[] = $referenced_entity;
+    $entity->der[] = $referenced_entity_mul;
+    $entity->save();
+    // Loads an unchanged entity from the database.
+    $entity = $this->container
+      ->get('entity_type.manager')
+      ->getStorage($this->entityType)
+      ->loadUnchanged($entity->id());
+
+    // Check references correctly for dynamic_references field.
+    $this->assertEquals($entity->dynamic_references[0]->target_id, $referenced_entity->id());
+    $this->assertEquals($entity->dynamic_references[0]->target_type, $referenced_entity->getEntityTypeId());
+    $this->assertEquals($entity->dynamic_references[0]->entity->getName(), $referenced_entity->getName());
+    $this->assertEquals($entity->dynamic_references[0]->entity->id(), $referenced_entity->id());
+    $this->assertEquals($entity->dynamic_references[0]->entity->uuid(), $referenced_entity->uuid());
+
+    // Check references correctly for der field.
+    $this->assertEquals($entity->der[0]->target_id, $referenced_entity_mul->id());
+    $this->assertEquals($entity->der[0]->target_type, $referenced_entity_mul->getEntityTypeId());
+    $this->assertEquals($entity->der[0]->entity->getName(), $referenced_entity_mul->getName());
+    $this->assertEquals($entity->der[0]->entity->id(), $referenced_entity_mul->id());
+    $this->assertEquals($entity->der[0]->entity->uuid(), $referenced_entity_mul->uuid());
+
+    // Check the data in DB columns.
+    $database = $this->container
+      ->get('database');
+    $int_column = $database->query('SELECT dynamic_references__target_id_int FROM {entity_test_rev}')->fetchCol();
+    $str_column = $database->query('SELECT dynamic_references__target_id FROM {entity_test_rev}')->fetchCol();
+    $this->assertSame($int_column, $str_column);
+    $int_column = $database->query('SELECT der__target_id_int FROM {entity_test_rev}')->fetchCol();
+    $str_column = $database->query('SELECT der__target_id FROM {entity_test_rev}')->fetchCol();
+    $this->assertSame($int_column, $str_column);
+    $int_column = $database->query('SELECT dynamic_references__target_id_int FROM {entity_test_mulrev_property_data}')->fetchCol();
+    $str_column = $database->query('SELECT dynamic_references__target_id FROM {entity_test_mulrev_property_data}')->fetchCol();
+    $this->assertSame($int_column, $str_column);
+    $int_column = $database->query('SELECT der__target_id_int FROM {entity_test_mulrev_property_data}')->fetchCol();
+    $str_column = $database->query('SELECT der__target_id FROM {entity_test_mulrev_property_data}')->fetchCol();
+    $this->assertSame($int_column, $str_column);
+
+    $entity = $this->container
+      ->get('entity_type.manager')
+      ->getStorage($this->referencedEntityType)
+      ->create();
+    $entity->der[] = $referenced_entity;
+    $entity->dynamic_references[] = $referenced_entity_mul;
+    $entity->save();
+    // Loads an unchanged entity from the database.
+    $entity = $this->container
+      ->get('entity_type.manager')
+      ->getStorage($this->referencedEntityType)
+      ->loadUnchanged($entity->id());
+
+    // Check references correctly for dynamic_references field.
+    $this->assertEquals($entity->dynamic_references[0]->target_id, $referenced_entity_mul->id());
+    $this->assertEquals($entity->dynamic_references[0]->target_type, $referenced_entity_mul->getEntityTypeId());
+    $this->assertEquals($entity->dynamic_references[0]->entity->getName(), $referenced_entity_mul->getName());
+    $this->assertEquals($entity->dynamic_references[0]->entity->id(), $referenced_entity_mul->id());
+    $this->assertEquals($entity->dynamic_references[0]->entity->uuid(), $referenced_entity_mul->uuid());
+
+    // Check references correctly for der field.
+    $this->assertEquals($entity->der[0]->target_id, $referenced_entity->id());
+    $this->assertEquals($entity->der[0]->target_type, $referenced_entity->getEntityTypeId());
+    $this->assertEquals($entity->der[0]->entity->getName(), $referenced_entity->getName());
+    $this->assertEquals($entity->der[0]->entity->id(), $referenced_entity->id());
+    $this->assertEquals($entity->der[0]->entity->uuid(), $referenced_entity->uuid());
+
+    // Check the data in DB columns.
+    $int_column = $database->query('SELECT dynamic_references__target_id_int FROM {entity_test_rev}')->fetchCol();
+    $str_column = $database->query('SELECT dynamic_references__target_id FROM {entity_test_rev}')->fetchCol();
+    $this->assertSame($int_column, $str_column);
+    $int_column = $database->query('SELECT der__target_id_int FROM {entity_test_rev}')->fetchCol();
+    $str_column = $database->query('SELECT der__target_id FROM {entity_test_rev}')->fetchCol();
+    $this->assertSame($int_column, $str_column);
+    $int_column = $database->query('SELECT dynamic_references__target_id_int FROM {entity_test_mulrev_property_data}')->fetchCol();
+    $str_column = $database->query('SELECT dynamic_references__target_id FROM {entity_test_mulrev_property_data}')->fetchCol();
+    $this->assertSame($int_column, $str_column);
+    $int_column = $database->query('SELECT der__target_id_int FROM {entity_test_mulrev_property_data}')->fetchCol();
+    $str_column = $database->query('SELECT der__target_id FROM {entity_test_mulrev_property_data}')->fetchCol();
+    $this->assertSame($int_column, $str_column);
+  }
+
+}
diff --git a/tests/src/Kernel/DynamicEntityReferenceBaseFieldTest.php b/tests/src/Kernel/DynamicEntityReferenceBaseFieldTest.php
index 153c1b5..3bdc488 100644
--- a/tests/src/Kernel/DynamicEntityReferenceBaseFieldTest.php
+++ b/tests/src/Kernel/DynamicEntityReferenceBaseFieldTest.php
@@ -9,7 +9,7 @@ use Drupal\entity_test\Entity\EntityTestMul;
 use Drupal\KernelTests\Core\Entity\EntityKernelTestBase;
 
 /**
- * Tests for the dynamic entity reference field.
+ * Tests for the dynamic entity reference base field.
  *
  * @group dynamic_entity_reference
  */
@@ -57,7 +57,7 @@ class DynamicEntityReferenceBaseFieldTest extends EntityKernelTestBase {
    */
   public function testEntityReferenceFieldValidation() {
     \Drupal::state()->set('dynamic_entity_reference_entity_test_cardinality', 1);
-    \Drupal::state()->set('dynamic_entity_reference_entity_test_exclude', 'entity_test');
+    \Drupal::state()->set('dynamic_entity_reference_entity_test_exclude', [$this->entityType]);
     $this->enableModules(['dynamic_entity_reference_entity_test']);
     \Drupal::entityDefinitionUpdateManager()->applyUpdates();
     $this->installEntitySchema('entity_test_mul');
@@ -121,7 +121,7 @@ class DynamicEntityReferenceBaseFieldTest extends EntityKernelTestBase {
    */
   public function testReferencedEntitiesMultipleLoad() {
     \Drupal::state()->set('dynamic_entity_reference_entity_test_cardinality', FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED);
-    \Drupal::state()->set('dynamic_entity_reference_entity_test_exclude', 'entity_test');
+    \Drupal::state()->set('dynamic_entity_reference_entity_test_exclude', [$this->entityType]);
     $this->enableModules(['dynamic_entity_reference_entity_test']);
     \Drupal::entityDefinitionUpdateManager()->applyUpdates();
     $this->installEntitySchema('entity_test_mul');
@@ -208,8 +208,6 @@ class DynamicEntityReferenceBaseFieldTest extends EntityKernelTestBase {
    * Tests the der field type for referencing multiple content entities.
    */
   public function testMultipleEntityReference() {
-    \Drupal::state()->set('dynamic_entity_reference_entity_test_cardinality', 1);
-    \Drupal::state()->set('dynamic_entity_reference_entity_test_exclude', '');
     \Drupal::state()->set('dynamic_entity_reference_entity_test_with_two_base_fields', TRUE);
     $this->enableModules(['dynamic_entity_reference_entity_test']);
     \Drupal::entityDefinitionUpdateManager()->applyUpdates();
@@ -228,7 +226,7 @@ class DynamicEntityReferenceBaseFieldTest extends EntityKernelTestBase {
     // Loads an unchanged entity from the database.
     $entity = $this->container
       ->get('entity_type.manager')
-      ->getStorage('entity_test')
+      ->getStorage($this->entityType)
       ->loadUnchanged($entity->id());
 
     // Check references correctly for dynamic_references field.
