Skip to content

Conversation

@ChrisJollyAU
Copy link
Member

For primary key's that are a Guid, always generate the Guid client side in EFCore.Jet rather than by the external engine.

Reason for this is that we can't get the generated Guid back after insert.
With a normal numeric identity counter, Jet allows you to do SELECT @@identity and it will return the last value inserted to the identity. Unfortunately, there is nothing like that for a Guid - the above statement just returns the integer 0

Hence, we can solve this by the client-side Guid generation

@ChrisJollyAU ChrisJollyAU added this to the 9.0.0 milestone Aug 24, 2024
@ChrisJollyAU ChrisJollyAU merged commit 8a5c4d8 into CirrusRedOrg:master Aug 25, 2024
@ChrisJollyAU ChrisJollyAU deleted the guidclientside branch August 25, 2024 06:31
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

Successfully merging this pull request may close these issues.

1 participant