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

Support int and short in SetEntityIdentities for PostGres #1197

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andtii
Copy link

@andtii andtii commented Feb 4, 2025

When having a model with the Identity as a Int or Short and returning Ids in Bulkoperations there is an exceptions setting the value is the IdentityResult model because its a long poperty trying to set Int64 to Int32. This fix checks the result type and casts it to the correct type

[Map("test")]
public class TestModel
{
[Primary, Map("id")]
public int Id { get; set; }
}

the model has int defined causing exception on the Bulk Operations returning identity which this fix will solve

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