Skip to content

Commit

Permalink
Handle bug in composite fks on SQL Server 12.0.2000 (the SQL bug was …
Browse files Browse the repository at this point in the history
…fixed in 12.0.2269)
  • Loading branch information
Nate McMaster committed Oct 15, 2015
1 parent f773fb4 commit 929f542
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@ private void GetForeignKeys()
update_referential_action_desc
FROM sys.foreign_keys AS f
INNER JOIN sys.foreign_key_columns AS fc
ON f.object_id = fc.constraint_object_id";
ON f.object_id = fc.constraint_object_id
ORDER BY f.name, fc.constraint_column_id";
using (var reader = command.ExecuteReader())
{
var lastFkName = "";
Expand Down

6 comments on commit 929f542

@ErikEJ
Copy link
Contributor

@ErikEJ ErikEJ commented on 929f542 Oct 16, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What bug was that? Do you have a KB number?

@natemcmaster
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was localdb only. I didn't bother looking for a KB number.

@ErikEJ
Copy link
Contributor

@ErikEJ ErikEJ commented on 929f542 Oct 16, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@natemcmaster
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe we have the same issue there. This was specific to EF7's composite foreign keys.

@ErikEJ
Copy link
Contributor

@ErikEJ ErikEJ commented on 929f542 Oct 16, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Composite? As in multicolumn?

@natemcmaster
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup.

Please sign in to comment.