diff --git a/src/EFCore.PG/Storage/Internal/Mapping/NpgsqlListTypeMapping.cs b/src/EFCore.PG/Storage/Internal/Mapping/NpgsqlListTypeMapping.cs index 49d6741c8..a3666015f 100644 --- a/src/EFCore.PG/Storage/Internal/Mapping/NpgsqlListTypeMapping.cs +++ b/src/EFCore.PG/Storage/Internal/Mapping/NpgsqlListTypeMapping.cs @@ -88,7 +88,9 @@ protected override string GenerateNonNullSqlLiteral(object value) sb.Append(ElementMapping.GenerateSqlLiteral(list[i])); } - sb.Append(']'); + sb.Append("]::"); + sb.Append(ElementMapping.StoreType); + sb.Append("[]"); return sb.ToString(); } @@ -143,7 +145,7 @@ static bool Compare(List a, List b, ValueComparer elementCo static List Snapshot(List source, ValueComparer elementComparer) { - if (source is null) + if (source == null) return null; var snapshot = new List(source.Count); @@ -194,7 +196,7 @@ static bool Compare(List a, List b) static List DoSnapshot(List source) { - if (source is null) + if (source == null) return null; var snapshot = new List(source.Count); @@ -243,7 +245,7 @@ static bool Compare(List a, List b) static List DoSnapshot(List source) { - if (source is null) + if (source == null) return null; var snapshot = new List(source.Count);