Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6016813
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:02:14+00:00 2026-05-23T03:02:14+00:00

I have a data model as follows: A Customer has Products and Payment Methods.

  • 0

I have a data model as follows:

Data Model

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.

Foreign Keys are:

Customer.CustomerId => Product.CustomerId
Customer.CustomerId => PaymentMethod.CustomerId
Product.ProductId => ProductPaymentMethod.ProductId
PaymentMethod.PaymentMethodId => ProductPaymentMethod.PaymentMethodId

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.

I deleted the association between PaymentMethod and ProductPaymentMethod, added an inheritence from PaymentMethod to ProductPaymentMethod and deleted PaymentMethodId from ProductPaymentMethod.

This is now my model:

Presentation Model

When I save the model or build the project I get 2 errors:

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).

and

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.

What am I doing wrong?

EDIT: 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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T03:02:15+00:00Added an answer on May 23, 2026 at 3:02 am

    My only answer to this so far is to have some manually created POCO classes for presentation and a Mapper class to turn my data entity into a presentation entity

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem. Imagine this data model: [Person] table has: PersonId, Name1 [Tag]
I have an core data model as follows The attributes property of Page is
I have a data model where a 'Program' has a 1-to-many relationship with 'ToDo's
I have a data model that includes common columns like addedBy, editedby (user), addedDate,
My Techie Bretheren (and Sisteren, of course!), I have a LinqToSql data model that
I have a relationship in a Core Data model that feels like it wants
i have this in my BlogRepository public IQueryable<Subnus.MVC.Data.Model.Post> GetPosts() { var query = from
I have some configuration data that I'd like to model in code as so:
In my Core Data managed object model, I have an entity Foo with a
If I have the following: {hdrs: [Make,Model,Year], data : [ {Make:Honda,Model:Accord,Year:2008} {Make:Toyota,Model:Corolla,Year:2008} {Make:Honda,Model:Pilot,Year:2008}] }

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.