Tencent / APIJSON

🏆 实时 零代码、全功能、强安全 ORM 库 🚀 后端接口和文档零代码,前端(客户端) 定制返回 JSON 的数据和结构 🏆 Real-Time coding-free, powerful and secure ORM 🚀 providing APIs and Docs without coding by Backend, and the returned JSON of API can be customized by Frontend(Client) users
http://apijson.cn
Other
17.27k stars 2.16k forks source link

[Bug] sqlserver 查询聚合函数出错 #649

Closed fengdu126 closed 11 months ago

fengdu126 commented 11 months ago

APIJSON Version/APIJSON 版本号

6.2

Database Type & Version/数据库类型及版本号

sqlserver2012

Environment/环境信息

- JDK/基础库:1.80
- OS/系统:win11

APIAuto Screenshots/APIAuto 请求与结果完整截屏

https://github.com/fengdu126/appokgo/blob/master/c80f2d8b563540fc110e9232b1f3b5d.png

Current Behavior/问题描述

sqlserver2012聚合函数出错

{
        "Moment": {
             "@column":"max(date):date"
        }
}

log提示:Caused by: java.sql.SQLException: ORDER BY 子句中的列 "dbo.Moment.id" 无效,因为该列没有包含在聚合函数或 GROUP BY 子句中。

好像只能查max(id):id

Expected Behavior/期望结果

另外,希望能查询多个,比如这样 "max(date):date,max(id):id"

Any additional comments?/其它补充说明?

No response