title: Property name in a type must be unique
body: <p>I am using Entity Framework 5 and I have the following entities:</p>
  
  <pre><code>public class User {
    public Int32 Id { get; set; }
    public String Username { get; set; }    
    public virtual ICollection&lt;CLaim&gt; CLaims { get; set; }
  }
  
  public class Claim {
    public Int32 Id { get; set; }
    public String Type { get; set; }
    public String Value { get; set; }
    public virtual User User { get; set; }
  }
  </code></pre>
  
  <p>A few notes about these entities:</p>
  
  <ol>
  <li>In User entity the Id is the PK;</li>
  <li>In Claim entity the Id is a FK and is equal to User.Id;</li>
  <li>In Claim entity the PK is composite from (Id, Type, Value)</li>
  </ol>
  
  <p>So I have the following SQL for these entities:</p>
  
  <pre><code>create table dbo.Users
  (
    Id int identity not null 
      constraint PK_Users_Id primary key clustered (Id),  
    Username nvarchar (120) not null
      constraint UQ_Users_Username unique (Username)
  );
  
  create table dbo.Claims
  (
    Id int not null,
    [Type] nvarchar (200) not null,
    Value nvarchar (200) not null,
      constraint PK_Claims_Id_Type_Value primary key (Id, [Type], Value),
  );
  
  alter table dbo.Claims
  add constraint FK_CLaims_Id foreign key (Id) 
      references dbo.Users(Id) on delete cascade on update cascade;
  </code></pre>
  
  <p>Finally, the configuration of the entities are as follows:</p>
  
  <pre><code>internal class UserConfiguration : EntityTypeConfiguration&lt;User&gt; {
    internal UserConfiguration() : base() {
      ToTable("Users");
      HasKey(x =&gt; x.Id);
      Property(x =&gt; x.Id).IsRequired().HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);
      Property(x =&gt; x.Username).IsRequired().HasMaxLength(120);
    }
  }
  
  internal class ClaimConfiguration : EntityTypeConfiguration&lt;Claim&gt; {
    internal ClaimMapper() : base() {
      ToTable("Claims");
      HasKey(x =&gt; new { x.Id, x.Type, x.Value });
      Property(x =&gt; x.Id).IsRequired().HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);
      Property(x =&gt; x.Type).IsRequired().HasMaxLength(200);
      Property(x =&gt; x.Value).IsRequired().HasMaxLength(200);
  
      HasRequired&lt;User&gt;(x =&gt; x.User).WithMany(y =&gt; y.Claims).Map(z =&gt; { z.MapKey("Id"); });
    }
  }
  </code></pre>
  
  <p><strong>THE PROBLEM:</strong></p>
  
  <p>When I try to create a user I get the following error:</p>
  
  <blockquote>
    <p>Each property name in a type must be unique. Property name 'Id' was already defined.</p>
  </blockquote>
  
  <p>Does anyone knows what I might be doing wrong?</p>