You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have this one Entity which behaves quite weird. When i sync my database with a BulkMerge the entities are beeing written, but my last two columns LinesAdded and LinesDeleted keep getting removed from the insert statement. See below. In this case I get the records in the target but only get the DefaultValue of "0" defined for the columns.
Is there some mechanism causing this?
The only option I set on the operation is KeepIdentityOnInsert = true;
Some help would be highly appreciated.
Exception
No Exception
Fiddle or Project (Optional)
SET IDENTITY_INSERT [data].[PartProgramValueChanges] ON;
MERGE INTO [data].[PartProgramValueChanges] AS DestinationTable
USING
(
SELECT TOP 100 PERCENT *FROM (SELECT @0_0 AS [PartProgramValueChange_Id], @0_1 AS [GitCommitHashValue], @0_2 AS [GitRepository_Id], @0_3 AS [LinesAdded], @0_4 AS [LinesDeleted], @0_5 AS [PartProgram_Id], @0_6 AS [SourceTimestamp], @0_7 AS ZZZ_Index) AS StagingTable ORDER BY ZZZ_Index
) AS StagingTable
ON DestinationTable.[PartProgramValueChange_Id] = StagingTable.[PartProgramValueChange_Id]
WHEN MATCHED THEN
UPDATESET [GitCommitHashValue] = StagingTable.[GitCommitHashValue], [GitRepository_Id] = StagingTable.[GitRepository_Id], [LinesAdded] = StagingTable.[LinesAdded], [LinesDeleted] = StagingTable.[LinesDeleted], [PartProgram_Id] = StagingTable.[P
artProgram_Id], [SourceTimestamp] = StagingTable.[SourceTimestamp]
WHEN NOT MATCHED THEN
INSERT ( [PartProgramValueChange_Id], [GitCommitHashValue], [GitRepository_Id], [PartProgram_Id], [SourceTimestamp] )
VALUES ( [PartProgramValueChange_Id], [GitCommitHashValue], [GitRepository_Id], [PartProgram_Id], [SourceTimestamp] )
OUTPUT
$action,
StagingTable.ZZZ_Index,
1,
INSERTED.[LinesAdded] AS [LinesAdded_zzzinserted], INSERTED.[LinesDeleted] AS [LinesDeleted_zzzinserted]
Further technical details
EF version: 7.0
EF Extensions version: 7.100.3
Database Provider: SqlServer
The text was updated successfully, but these errors were encountered:
I'm not sure if I understand the problem correctly. Are you looking to be able to insert values to some properties that you have set a default value to them?
Description
I have this one Entity which behaves quite weird. When i sync my database with a BulkMerge the entities are beeing written, but my last two columns LinesAdded and LinesDeleted keep getting removed from the insert statement. See below. In this case I get the records in the target but only get the DefaultValue of "0" defined for the columns.
Is there some mechanism causing this?
The only option I set on the operation is KeepIdentityOnInsert = true;
Some help would be highly appreciated.
Exception
No Exception
Fiddle or Project (Optional)
Further technical details
The text was updated successfully, but these errors were encountered: