nhibernate-core icon indicating copy to clipboard operation
nhibernate-core copied to clipboard

SqlStringHelper.RemoveAsAliasesFromSql remove *all* aliases

Open Louis9902 opened this issue 3 years ago • 3 comments

This removes multiple occurrences of aliases from the sql string not just the last one.

I had the problem while using the following projection, which results in invalid sql (sqlserver)

Projections.Distinct(Projections.ProjectionList()
.Add(Projections.Max(() => ability.Role))
.Add(Projections.GroupProperty(Projections.RootEntity())))

Louis9902 avatar Jul 07 '22 13:07 Louis9902

@hazzik can you or somebody else maybe approve the ci run, so I can check if everything works?

Louis9902 avatar Jul 10 '22 08:07 Louis9902

Okay, the MySQL failure seems to be unrelated, because it somehow breaks in the authentication step.

Louis9902 avatar Jul 10 '22 12:07 Louis9902

We need some tests, otherwise we would not be able to accept the contribution.

hazzik avatar Jul 20 '22 04:07 hazzik