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

Home Page:https://www.donet5.com/Home/Doc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

联表后,子查询In出错,由于子查询未定义关键词AS

xiaofeichuan opened this issue · comments

举例:

代码

db.Context.Queryable<Order>()
.LeftJoin<User>((orders, users) => orders.Id == users.Id)
.Where((orders, users) => orders.CustomId == SqlFunc.Subqueryable<Custom>().GroupBy(custom => custom.Id).Select(custom => custom.Id)).ToList()

sql:

SELECT * FROM `order` orders Left JOIN `user` users ON ( `orders`.`id` = `users`.`id` )
WHERE `orders`.`CustomId` in ((SELECT `custom`.`id` FROM `Custom` WHERE ( `sell_status` = 1 ) GROUP BY `experts_id`)) ) 

mysql提示错误:Unknown column 'custom.id' in 'field list

image

开发中出现该问题,不知是否我编写的问题,请SqlSugar大佬看看哟
随便感谢下SqlSugar,用了快一年,真心觉得不错,点赞

先确定是否是最新版本,这个我一会看

是否还有问题,回复一下,我记得修复过这个BUG

是否还有问题,回复一下,我记得修复过这个BUG

更新到最新版本就正常了,谢谢