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

  • SEARCH
  • Home
  • 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 6225619
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:52:31+00:00 2026-05-24T08:52:31+00:00

I have a Model1.edmx, which has several tables. Now, I do not want all

  • 0

I have a Model1.edmx, which has several tables. Now, I do not want all the columns of the table TableA, so I created another entity and mapped it with TableA using table mapping.

I am facing lot of issues while doing the same. The error that I get is,

" Thier primary key may collide".

If I create the FK association, it says "Non-Primary-Key column(s) [XXX] are being mapped in both fragments to different conceptual side properties".

I am not sure, if the approach that I am taking is correct, as entity set alraedy exists for TableA.

If this is the approach what would be the solution.

If not, which way should I go.

UPDATE : I did delete the properties that were not required, also, I added the properties from other tables that were FK in the TableA.

Now I am getting error " Problem in mapping fragments starting at line 566:Must specify mapping for all key properties (TableAs.ID) of the EntitySet TableAs.“

UPDATE I added the other tables properties as they were FK, and I wanted few columns from the other table in the UI. Is this a good (or possible) approach? or should I create classes for it, and then map each property of the class manually?
Thanks in advance.

  • 1 1 Answer
  • 3 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-24T08:52:32+00:00Added an answer on May 24, 2026 at 8:52 am

    What you mean by this:

    Now, I do not want all the columns of the table TableA, so I created another entity and mapped it with TableA using table mapping.

    Is not entirely clear. Do you mean that you only want to deal with a subset of the columns in TableA and ignore the others everywhere in the application? Assuming they’re nullable (or have a StoreGeneratedProperty of Computed), you can just click on them in the entity for TableA and delete them.

    You can’t create another entity that’s mapped to TableA unless you’re dealing with table-per-hierarchy inheritance, which it doesn’t sound like you’re interested in.

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

Sidebar

Related Questions

I have a simple ADO.NET Entity Framework 4.0 model (edmx) which defines database tables
I have an edmx model which I have draged 2 tables onto - One
i have an entity-model file (edmx) file which contains few tables and few stored
From the regular aspnet_Users table I have created two sub-tables with one to one
I have: Model1 Model2 with field ForeignKey(Model1) I want to delete Model1 instance, but
I have model Foo which has field bar. The bar field should be unique,
I have a view which has an Int column which is nullable (let's call
I have created a C#/MVVM project which runs fine when I run it from
I have a database table called item that has a self-referencing field called itemParentID.
I have an EF 4.2 EDMX model which I use in a multi-tenant application.

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.