title: Entity Framework inserting row with composite key
body: <p>I am using Entity Framework 4.3.1 and I am trying to insert a new record into the table my <code>ProductVersion</code> entity is based on.</p>
  
  <p>The <code>ProductVersion</code> entity has 2 properties that make up a composite primary key for the table called <code>ProductId</code> and <code>ProductOrdinal</code>.</p>
  
  <p>Whenever someone updates a product entry I am creating and passing a <code>ProductVersion</code> entity back to my repository, incrementing the <code>ProductOrdinal</code> property, and attempting to add the entity to the context and save it.</p>
  
  <p>I keep getting the following error:</p>
  
  <blockquote>
    <p>The property 'ProductOrdinal' is part of the object's key information and cannot be modified.</p>
  </blockquote>
  
  <p>Neither of the columns that make up the key are autonumbering and I have annotated the properties in my POCO with the following:</p>
  
  <pre><code>[Key, Column("PROD_Ordinal", Order=2), DatabaseGenerated(DatabaseGeneratedOption.None)]
  public long ProductOrdinal { get; set; }
  </code></pre>