Updateable ignorecolums pgsql array type

This commit is contained in:
sunkaixuan 2022-04-22 13:40:43 +08:00
parent e86c82881c
commit c08434233b
2 changed files with 13 additions and 0 deletions

View File

@ -20,9 +20,19 @@ namespace OrmTest
list= Db.Queryable<UnitJsonTest>().ToList();
UValidate.Check("order2", list.First().Order.Name, "Json");
var list2 = Db.Queryable<UnitJsonTest>().ToList();
Db.CodeFirst.InitTables<UnitArrayTest>();
Db.Updateable(new UnitArrayTest() { Name="a" }).IgnoreColumns(true).ExecuteCommand();
}
}
public class UnitArrayTest
{
[SqlSugar.SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
public int Id { get; set; }
public string Name { get; set;}
[SqlSugar.SugarColumn(IsArray =true)]
public int[] ids { get; set; }
}
public class UnitJsonTest
{

View File

@ -113,6 +113,9 @@ namespace SqlSugar
{
sqlParameter.NpgsqlDbType = ArrayMapping[type] | NpgsqlDbType.Array;
}
else if (type==DBNull.Value.GetType())
{
}
else
{
Check.Exception(true, sqlParameter.Value.GetType().Name + " No Support");