RepoDB icon indicating copy to clipboard operation
RepoDB copied to clipboard

Support int and short in SetEntityIdentities for PostGres

Open andtii opened this issue 9 months ago • 0 comments

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

andtii avatar Feb 04 '25 11:02 andtii