serenity-is / Serenity

Business Apps Made Simple with Asp.Net Core MVC / TypeScript
https://serenity.is
MIT License
2.57k stars 796 forks source link

[Bug report]: It getting an Oracle Error When oracle commend has Group by #6724

Closed wow-prime closed 1 year ago

wow-prime commented 1 year ago

Before submitting the bug report, please read and check the following items

What happened?

If I use GroupBy like below picture.

image

The Commend will be generated like below picture.

image

I get Oracle.ManagedDataAccess.Client.OracleException: 'ORA-00911 error.

First character cannot start with an underscore in Oracle.

I found the code at [ sb.Append(" 1 as _aliasx ");] and https://github.com/serenity-is/Serenity/blob/f3e0a7a5761860b38d8becd84f37f0dd7217088a/src/Serenity.Net.Data/FluentSql/SqlQuery_ToString.cs#L426

What did you expect to happen?

modify below [ sb.Append(" 1 as _aliasx ");] and https://github.com/serenity-is/Serenity/blob/f3e0a7a5761860b38d8becd84f37f0dd7217088a/src/Serenity.Net.Data/FluentSql/SqlQuery_ToString.cs#L426

How to reproduce?

modify below [ sb.Append(" 1 as _aliasx ");] and https://github.com/serenity-is/Serenity/blob/f3e0a7a5761860b38d8becd84f37f0dd7217088a/src/Serenity.Net.Data/FluentSql/SqlQuery_ToString.cs#L426

What Serenity Nuget Versions are you seeing the problem on? (separated by comma)

Serenity.Net.Data 6.5.4

Relevant log output

No response

Serene template version

6.5.4 5.2.3

Sergen version

5.2.3

Code editor

2022

Operating System

No response

Node.js version

No response

TypeScript version

No response

Database type and version

No response

On which device do you see the problem?

No response

On which operating system do you see the problem?

No response

On which browsers do you see the problem?

No response

On what version of the browsers do you see the problem?

No response

Additional information

No response

VictorTomaili commented 1 year ago

Will be released with the next version. f9d6b4b13edaed42313f2d6446bed3cd3d5e29bd