Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table trigger causing DbUpdateException #3965

Closed
erbatista opened this issue Dec 3, 2015 · 1 comment
Closed

Table trigger causing DbUpdateException #3965

erbatista opened this issue Dec 3, 2015 · 1 comment

Comments

@erbatista
Copy link

When saving an object to a table with a defined trigger I'm getting DbUpdateException:

An exception of type 'Microsoft.Data.Entity.DbUpdateException' occurred in EntityFramework.Core.dll

"The target table 'XYZ' of the DML statement cannot have any enabled triggers if the statement contains an OUTPUT clause without INTO clause"

This is the generated command text:
exec sp_executesql N'SET NOCOUNT OFF;
INSERT INTO 'XYZ' ([Code], [Name])
OUTPUT INSERTED.[XYZ_Key], INSERTED.[RowVersion]
VALUES (@p0, @p1);
',N'@p0 nvarchar(4000),@p1 nvarchar(4000)',@p0=N'tests',@p1=N'testt'

@rowanmiller
Copy link
Contributor

This is a dupe of #1441 and a fix has already been committed that will ship in RC2.

@ajcvickers ajcvickers reopened this Oct 16, 2022
@ajcvickers ajcvickers closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants