We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ISelect<WorkReportCountObj> iSelect = _freeSql.Select<WorkReportCountObj>() .WithSql( //待审批 _freeSql.Select<SysCheckForm, SysMessage>() .InnerJoin((a1, a2) => a1.Id == a2.WorkId) .Where((a1, a2) => a2.Type == 1 && a2.IsDelete == 1 && postIds.Contains(a2.UserDepartmentPostId)) .WhereIf(searchDto.start_time.HasValue, (a1, a2) => a2.RecvDate >= searchDto.start_time) .WhereIf(searchDto.end_time.HasValue, (a1, a2) => a2.RecvDate <= searchDto.end_time) .GroupBy((a1, a2) => a2.UserDepartmentPostId) .ToSql(r1 => new WorkReportCountObj() { uid = r1.Key, count = r1.Count(), type = 1, id_type = 2 }, FieldAliasOptions.AsProperty));
上述语句会输出SELECT UserDepartmentPostId 而不是我想要的SELECT UserDepartmentPostId AS uid
当语句为以下时,可以正常输出
ISelect<WorkReportCountObj> iSelect = _freeSql.Select<WorkReportCountObj>() .WithSql( //待审批 _freeSql.Select<SysCheckForm, SysMessage>() .InnerJoin((a1, a2) => a1.Id == a2.WorkId) .Where((a1, a2) => a2.Type == 1 && a2.IsDelete == 1 && postIds.Contains(a2.UserDepartmentPostId)) .WhereIf(searchDto.start_time.HasValue, (a1, a2) => a2.RecvDate >= searchDto.start_time) .WhereIf(searchDto.end_time.HasValue, (a1, a2) => a2.RecvDate <= searchDto.end_time) .GroupBy((a1, a2) => a2.UserDepartmentPostId) .ToSql(r1 => new WorkReportCountObj() { uid = r1.Value.Item2.UserDepartmentPostId, count = r1.Count(), type = 1, id_type = 2 }, FieldAliasOptions.AsProperty))
输出语句为SELECT UserDepartmentPostId AS uid ,此输出是正确的
mysql5.7
. net core3.1
The text was updated successfully, but these errors were encountered:
- 修复 GroupBy 特殊情况下 AsProperty 无效的 bug;#1141
e2a4041
v3.2.666-preview20220603 #1141 #1140
f3b79bf
v3.2.662 #1145 #1144 #1140 #1103 #1141 #1147 #1154 #278
4d0e792
No branches or pull requests
问题描述及重现步骤:
上述语句会输出SELECT UserDepartmentPostId 而不是我想要的SELECT UserDepartmentPostId AS uid
当语句为以下时,可以正常输出
输出语句为SELECT UserDepartmentPostId AS uid ,此输出是正确的
数据库的具体版本
安装的包
.net framework/. net core? 及具体版本
The text was updated successfully, but these errors were encountered: