diff --git a/src/Storage/Mapping/MetadataDriver.php b/src/Storage/Mapping/MetadataDriver.php
index <HASH>..<HASH> 100644
--- a/src/Storage/Mapping/MetadataDriver.php
+++ b/src/Storage/Mapping/MetadataDriver.php
@@ -265,6 +265,9 @@ class MetadataDriver implements MappingDriver
      */
     public function setIncomingRelations($className, $table)
     {
+        if (!isset($this->contenttypes[$contentKey]['relations'])) {
+            return;
+        }
         $mapping = [
             'fieldname' => 'incomingrelation',
             'type'      => 'null',
fix skip of id lookup