Skip to content

Commit

Permalink
Fix arrays over user-defined ranges (#3342)
Browse files Browse the repository at this point in the history
Fixes #3137

(cherry picked from commit 592588d)
  • Loading branch information
roji committed Oct 31, 2024
1 parent 52e427f commit 8a2dc0c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ protected NpgsqlArrayTypeMapping(RelationalTypeMappingParameters parameters)
// Otherwise let the ADO.NET layer infer the PostgreSQL type. We can't always let it infer, otherwise
// when given a byte[] it will infer byte (but we want smallint[])
NpgsqlDbType = NpgsqlTypes.NpgsqlDbType.Array
| (ElementTypeMapping is INpgsqlTypeMapping elementNpgsqlTypeMapping
| (ElementTypeMapping is INpgsqlTypeMapping { NpgsqlDbType: not NpgsqlTypes.NpgsqlDbType.Unknown } elementNpgsqlTypeMapping
? elementNpgsqlTypeMapping.NpgsqlDbType
: ElementTypeMapping.DbType.HasValue
? new NpgsqlParameter { DbType = ElementTypeMapping.DbType.Value }.NpgsqlDbType
Expand Down

0 comments on commit 8a2dc0c

Please sign in to comment.