DBML display does not show new foreign key constraints - by OmegaMan

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 414601 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 2/13/2009 7:21:31 PM
Access Restriction Public


I am updating my database and changing the FK constraints on the fly. VS2008 does not seem to see those changes immediately nor allow me to easily update the dbml file. Even a refresh to the Server Explorer in VS2008 does not get constraints. 

I refresh and drag and drop the tables in question onto the dbml file in VS2008, but it has no affect even though SQL Server Management studio shows the FK constraints on the tables! Its as if the tables are cached in VS2008.

The problem will go away if I do these steps

1) Build the project with the tables not showing the foreign key constraints.
2) Remove tables in question.
3) Drag/Drop the tables back to the dbml file.

Wala....the links are there...why? Note my links are 1 to many.  

I expect to not have to build to solve this issue, and that a refresh to the SQL server explorer in VS2008 should be enough. I understand I need to delete the *old* tables from the dbml file, but don't have me build...it seems counter intuitive to have to build visually wrong tables, then delete and re-add when the re-add should be enough.
Sign in to post a comment.
Posted by Michael Freidgeim on 6/22/2012 at 4:58 PM
I don't understand, why it is marked as fixed, because related (more general) issue https://connect.microsoft.com/VisualStudio/feedback/details/260723/linq-for-sql-designer-support-for-refresh-resync-of-tables-and-columns is marked as "won't fix"
Posted by Stephane Roze on 6/8/2012 at 1:38 PM
I have the same issue in vs2010 and my FK constraints don't appears because my new table didn't have primary key. I have added it ant it works !
Posted by Microsoft on 3/13/2009 at 2:28 PM
This issue will be fixed in the next version of Visual Studio (Dev 10)
Posted by Microsoft on 2/15/2009 at 10:54 PM
We were able to reproduce the issue you are seeing. We are escalating this issue to the product unit who works on that specific feature area. The product team will review this issue and make a decision on whether they will fix it or not for the next release.