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 688397
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:13:32+00:00 2026-05-14T02:13:32+00:00

I have a database framework where I have two tables. The first table has

  • 0

I have a database framework where I have two tables. The first table has a single column that is an identity and primary key. The second table contains two columns. One is a varchar primary key and the other is a nullable foreign key to the first table.

When adding the tables to the model I get the following validation error:

Condition cannot be specified for Column member ‘DetailsControlSetId’ because it is marked with a ‘Computed’ or ‘Identity’ StoreGeneratedPattern.

where ‘DetailsControlSetId’ is the second foreign key reference in the second table.

Steps to reproduce:

1) Create a new .Net 3.5 Client Profile project with Visual Studio 2010 RC.
2) Run scripts below against test database (empty database will do).
3) Create EDMX model, targeting the database created, but opt to not import any tables.
4) Update Model from Database selecting the two tables in the database (DetailsControlSet and Application).
5) Validate the EDMX model.

Table Creation Scripts:

CREATE TABLE [dbo].[DetailsControlSet](
    [DetailsControlSetId] [int] IDENTITY(1,1) NOT NULL,
    CONSTRAINT [PK_DetailsControlSet] PRIMARY KEY CLUSTERED 
    (
        [DetailsControlSetId] ASC
    )
)

GO

CREATE TABLE [dbo].[Application](
    [ApplicationName] [varchar](50) NOT NULL,
    [DetailsControlSetId] [int] NULL,
    CONSTRAINT [PK_Application] PRIMARY KEY CLUSTERED 
    (
        [ApplicationName] ASC
    )
)

GO

ALTER TABLE [dbo].[Application]  WITH CHECK ADD  CONSTRAINT [FK_Application_DetailsControlSet] FOREIGN KEY([DetailsControlSetId])
REFERENCES [dbo].[DetailsControlSet] ([DetailsControlSetId])
ON UPDATE CASCADE
ON DELETE CASCADE
GO

ALTER TABLE [dbo].[Application] CHECK CONSTRAINT [FK_Application_DetailsControlSet]
GO
  • 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-14T02:13:33+00:00Added an answer on May 14, 2026 at 2:13 am

    Update Now that you’ve (finally!) posted steps to reproduce this, I can make the error happen on my machine. And diffing the EDMX of the “import everything at first” vs. the “import tables later” models makes the problem obvious. The “working” model has this line:

    <Property Name="DetailsControlSetId" Type="int" />
    

    The “error” model has this line:

    <Property Name="DetailsControlSetId" Type="int" StoreGeneratedPattern="Identity" />
    

    That’s the only substantive difference between the two models.

    So to fix this:

    1. Right click EDMX in Solution Explorer.
    2. Open with XML editor.
    3. Delete StoreGeneratedPattern="Identity"
    4. Note that the error immediately goes away.

    Having this test case, I was able to do some research. It turns out this is a known bug in VS 2010 beta and was fixed a few days ago.

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

Sidebar

Related Questions

I have a simple database with 2 main tables with a many to many
We have a simple Table per Type Entity Framework 4.0 model :- ALl classes
I am working on an existing project that has two areas that can be
Is it possible to merge two assemblies at runtime such that, when you iterate
I started creating JPA/hibernate mappings for a legacy database based on Oracle. At one
For a new project I'm trying to create my business classes first and create
I'm using Symfony for the first time, and on a project requiring the front
My situation is i need to update 4 tables upon a request. I execute
I'm really thinking that in the years ahead, I will be creating internal apps
For my CMS application I'm writing a DLL that I will include into my

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.