diff --git a/lib/Doctrine/ORM/Mapping/Builder/AssociationBuilder.php b/lib/Doctrine/ORM/Mapping/Builder/AssociationBuilder.php
index 942a662e4..2536f5be6 100644
--- a/lib/Doctrine/ORM/Mapping/Builder/AssociationBuilder.php
+++ b/lib/Doctrine/ORM/Mapping/Builder/AssociationBuilder.php
@@ -183,6 +183,17 @@ class AssociationBuilder
         return $this;
     }
 
+    /**
+     * Sets field as primary key.
+     *
+     * @return AssociationBuilder
+     */
+    public function isPrimaryKey()
+    {
+        $this->mapping['id'] = true;
+        return $this;
+    }
+
     /**
      * @return ClassMetadataBuilder
      *