Skip to content

Commit 8a2dc0c

Browse files
committed
Fix arrays over user-defined ranges (#3342)
Fixes #3137 (cherry picked from commit 592588d)
1 parent 52e427f commit 8a2dc0c

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
@@ -187,7 +187,7 @@ protected NpgsqlArrayTypeMapping(RelationalTypeMappingParameters parameters)
187187
// Otherwise let the ADO.NET layer infer the PostgreSQL type. We can't always let it infer, otherwise
188188
// when given a byte[] it will infer byte (but we want smallint[])
189189
NpgsqlDbType = NpgsqlTypes.NpgsqlDbType.Array
190-
| (ElementTypeMapping is INpgsqlTypeMapping elementNpgsqlTypeMapping
190+
| (ElementTypeMapping is INpgsqlTypeMapping { NpgsqlDbType: not NpgsqlTypes.NpgsqlDbType.Unknown } elementNpgsqlTypeMapping
191191
? elementNpgsqlTypeMapping.NpgsqlDbType
192192
: ElementTypeMapping.DbType.HasValue
193193
? new NpgsqlParameter { DbType = ElementTypeMapping.DbType.Value }.NpgsqlDbType

0 commit comments

Comments
 (0)