DotNetNext / SqlSugar

.Net aot ORM Fastest ORM Simple Easy VB.NET Sqlite orm Oracle ORM Mysql Orm 虚谷数据库 postgresql ORm SqlServer oRm 达梦 ORM 人大金仓 ORM 神通ORM C# ORM , C# ORM .NET ORM NET5 ORM .NET6 ORM ClickHouse orm QuestDb ,TDengine ORM,OceanBase orm,GaussDB orm ,Tidb orm Object/Relational Mapping
https://www.donet5.com/Home/Doc
MIT License
5.27k stars 1.33k forks source link

查询数组字段 Object must implement IConvertible. #1095

Closed zanderzhg closed 1 year ago

zanderzhg commented 1 year ago

实体

....
[SugarColumn(ColumnDescription = "用户姓名")]
    public string Name { get; set; } = string.Empty;

[SugarColumn(ColumnDescription = "绑定的角色ids", ColumnDataType = "int8[]", IsArray = true)]
    public long[]? RoleIds { get; set; }
....
        var roleIds = await _accountRepository.AsQueryable()
            .Where(i => i.Id == 1)
            .Select(i => i.Name)
            .FirstAsync();
// Select(i=>i.Name)就能查询没问题,但是Select(i=>i.RoleIds)就报Object must implement IConvertible.错误
zanderzhg commented 1 year ago

postgresql数据库

DotNetNext commented 1 year ago

SqlSugarCore 5.1.3.31-preview13 更新最新预览版本已修复

zanderzhg commented 1 year ago

SqlSugarCore 5.1.3.31-preview13 更新最新预览版本已修复

SqlSugarCore 5.1.3.31-preview13 SqlSugarCore 5.1.3.31-preview17 还是报相同的错误

DotNetNext commented 1 year ago

异步忘记改了,我一会在发布个版本