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

SqlException on V1_2/Capture Endpoint (Capture Masterdata) #470

Closed
vicmgj opened this issue Feb 9, 2024 · 0 comments
Closed

SqlException on V1_2/Capture Endpoint (Capture Masterdata) #470

vicmgj opened this issue Feb 9, 2024 · 0 comments

Comments

@vicmgj
Copy link

vicmgj commented Feb 9, 2024

Environment

  • Database Provider: SqlServer
  • Runtime: .net8

Issue

When interacting with the V1_2/Capture endpoint there appears to be a SqlException getting triggered with the Masterdata XML example (from the Postman Sandbox). Upon dumping the contents of the SaveChangesAsync() call embedded in the StoreAsync(Request request, CancellationToken cancellationToken) : CaptureHandler.cs method, SQL Profiler showed us that it's attempting to insert this query.

INSERT INTO [Cbv].[MasterDataChildren] 
([ChildrenId], [MasterDataId], [MasterDataRequestId], [MasterDataType], [MasterdataId], [MasterdataType])
VALUES 
(@p104, @p105, @p106, @p107, @p108, @p109),
(@p110, @p111, @p112, @p113, @p114, @p115),
(@p116, @p117, @p118, @p119, @p120, @p121);

The insert manages to have values for the first three properties of the insert statement, but the latter two do not - instead defaulting to null. From looking around I was not able to find a relationship linking the MasterdataId and MasterdataType properties to the MasterDataChildren table. Those appear to only be properties referenced within the MasterDataAttribute table. I did notice that the MasterDataChildren has a link to MasterData which contains a list of MasterDataAttribute's, potentially creating a link between the two?

All that being said, I was hoping you could provide any insight on how the DbContext is suggesting those two properties - MasterdataId and MasterdataType - belong to the MasterDataChildren type within the insert statement.

Thanks!

louisaxel-ambroise added a commit that referenced this issue Feb 12, 2024
…-configuration

#470 Fix fields names in EF Core model configuration
@vicmgj vicmgj closed this as completed Feb 12, 2024
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

1 participant