title: Entity Framework Error 3002 / 3003 - Inheritance / key mapping issue
body: <p>I have a data model as follows:</p>
  
  <p><img src="https://i.stack.imgur.com/XWDYZ.png" alt="Data Model"></p>
  
  <p>A Customer has Products and Payment Methods. Each Product can be assigned any or all of the Customer's Payment Methods, with one set as default.</p>
  
  <p>Foreign Keys are:</p>
  
  <pre><code>Customer.CustomerId =&gt; Product.CustomerId
  Customer.CustomerId =&gt; PaymentMethod.CustomerId
  Product.ProductId =&gt; ProductPaymentMethod.ProductId
  PaymentMethod.PaymentMethodId =&gt; ProductPaymentMethod.PaymentMethodId
  </code></pre>
  
  <p>I want to customise this model for presentation purposes, Customer to have a collection of Payment Methods and a collection of Products. Products to have a collection of ProductPaymentMethods which inherit from PaymentMethod.</p>
  
  <p>I deleted the association between PaymentMethod and ProductPaymentMethod, added an inheritence from PaymentMethod to ProductPaymentMethod and deleted PaymentMethodId from ProductPaymentMethod. </p>
  
  <p>This is now my model:</p>
  
  <p><img src="https://i.stack.imgur.com/E6bqi.png" alt="Presentation Model"></p>
  
  <p>When I save the model or build the project I get 2 errors:</p>
  
  <blockquote>
    <p>Error 3002: Problem in mapping
    fragments starting at line
    226:Potential runtime violation of
    table ProductPaymentMethod's keys
    (ProductPaymentMethod.ProductPaymentMethodId):
    Columns
    (ProductPaymentMethod.ProductPaymentMethodId)
    are mapped to EntitySet
    PaymentMethods's properties
    (PaymentMethods.ProductPaymentMethodId)
    on the conceptual side but they do not
    form the EntitySet's key properties
    (PaymentMethods.PaymentMethodId).</p>
  </blockquote>
  
  <p>and</p>
  
  <blockquote>
    <p>Error 3003: Problem in mapping
    fragments starting at line 226:All the
    key properties
    (PaymentMethods.PaymentMethodId) of
    the EntitySet PaymentMethods must be
    mapped to all the key properties
    (ProductPaymentMethod.ProductPaymentMethodId)
    of table ProductPaymentMethod.</p>
  </blockquote>
  
  <p>What am I doing wrong?</p>
  
  <p><strong>EDIT:</strong> Having done some further Googling, I have found several solutions, most of which don't quite fit this scenario. Most talk about inheritance requiring a 1-1 not 1-many relationship. However, because of the Customer to Product 1-many relationship, the model requires a 1-many between PaymentMethod and ProfilePaymentMethod. Is it not possible to do what I am attempting?</p>