title: How to map two properties in one code first object to the same parent type
body: <p>I've been at this for hours and have tried many suggestions I found searching but no luck.  I'm using code first EF 5.  </p>
  
  <p>The situation is that I have a class Employee.  Then I have another class that has two properties on it, both are of type Employee.  I want these both to be foreign key constraints but the requirements allow many of the same requests to and from the same users so I can't just use them as keys.  I don't really care about Employee having the two collections for navigation but in my working through the problem that seemed a requirement.  If it simplifies the problem I can remove those.</p>
  
  <p>I get this message.
  System.Data.Entity.Edm.EdmAssociationEnd: : Multiplicity is not valid in Role 'Employee_RequestsForEmployee_Target' in relationship 'Employee_RequestsForEmployee'. Because the Dependent Role properties are not the key properties, the upper bound of the multiplicity of the Dependent Role must be '*'.</p>
  
  <p>I've tried this using the Fluent API in the OnModelCreation method of the context;</p>
  
  <blockquote>
    <p>modelBuilder.Entity()
                            .HasRequired(u => u.ForEmployee)
                            .WithMany()
                            .HasForeignKey(u => u.ForEmployeeId);</p>
  
  <pre><code>        modelBuilder.Entity&lt;RevenueTransferRequest&gt;()
                      .HasRequired(u =&gt; u.FromEmployee)
                      .WithMany()
                      .HasForeignKey(u =&gt; u.FromEmployeeId);
  </code></pre>
  </blockquote>
  
  <p>The classes in conflict are (I've removed some properties for clarity);</p>
  
  <pre><code>    public class Employee : IEmployee
      {
          [Key]
          public string Id { get; set; }
  
          [InverseProperty("ForEmployee")]
          public ICollection&lt;RevenueTransferRequest&gt; RequestsForEmployee { get; set; }
  
          [InverseProperty("FromEmployee")]
          public ICollection&lt;RevenueTransferRequest&gt; RequestsFromEmployee { get; set; }
      }
  
   public class RevenueTransferRequest : IRevenueTransferRequest
      {
          [Key]
          public Guid Id { get; set; }
  
          [Required]
          [ForeignKey("ForEmployee")]
          public String ForEmployeeId { get; set; }
  
          [InverseProperty("RequestsForEmployee")]
          public Employee ForEmployee { get; set; }
  
          [Required]
          [ForeignKey("FromEmployee")]
          public String FromEmployeeId { get; set; }
  
          [InverseProperty("RequestsFromEmployee")]
          public Employee FromEmployee { get; set; }
      }
  </code></pre>
  
  <p>Any help would be much appreciated.  Thanks in advance.</p>