Skip to content

Commit 899868d

Browse files
rojiWhatzGames
authored andcommitted
Fix arrays over user-defined ranges (npgsql#3342)
Fixes npgsql#3137
1 parent 5553bee commit 899868d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/EFCore.PG/Storage/Internal/Mapping/NpgsqlArrayTypeMapping.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ protected NpgsqlArrayTypeMapping(RelationalTypeMappingParameters parameters)
190190
// Otherwise let the ADO.NET layer infer the PostgreSQL type. We can't always let it infer, otherwise
191191
// when given a byte[] it will infer byte (but we want smallint[])
192192
NpgsqlDbType = NpgsqlTypes.NpgsqlDbType.Array
193-
| (ElementTypeMapping is INpgsqlTypeMapping elementNpgsqlTypeMapping
193+
| (ElementTypeMapping is INpgsqlTypeMapping { NpgsqlDbType: not NpgsqlTypes.NpgsqlDbType.Unknown } elementNpgsqlTypeMapping
194194
? elementNpgsqlTypeMapping.NpgsqlDbType
195195
: ElementTypeMapping.DbType.HasValue
196196
? new NpgsqlParameter { DbType = ElementTypeMapping.DbType.Value }.NpgsqlDbType

0 commit comments

Comments
 (0)