Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit c247404

Browse files
committed
Remove AS JOIN Aliases which Oracle doesn't support
1 parent 3960de1 commit c247404

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/ServiceStack.OrmLite/Expressions/SqlExpression.Join.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ protected virtual SqlExpression<T> InternalJoin(string joinType, Expression join
244244
FromExpression += joinFormat != null
245245
? $" {joinType} {joinFormat(DialectProvider, joinDef, sqlExpr)}"
246246
: joinAlias != null
247-
? $" {joinType} {SqlTable(joinDef)} AS {DialectProvider.GetQuotedName(joinAlias.Alias)} {sqlExpr}"
247+
? $" {joinType} {SqlTable(joinDef)} {DialectProvider.GetQuotedName(joinAlias.Alias)} {sqlExpr}"
248248
: $" {joinType} {SqlTable(joinDef)} {sqlExpr}";
249249

250250

src/ServiceStack.OrmLite/Expressions/SqlExpression.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1315,7 +1315,7 @@ public string SelectExpression
13151315
public string FromExpression
13161316
{
13171317
get => string.IsNullOrEmpty(fromExpression)
1318-
? " \nFROM " + DialectProvider.GetQuotedTableName(modelDef) + (TableAlias != null ? " AS " + DialectProvider.GetQuotedName(TableAlias) : "")
1318+
? " \nFROM " + DialectProvider.GetQuotedTableName(modelDef) + (TableAlias != null ? " " + DialectProvider.GetQuotedName(TableAlias) : "")
13191319
: fromExpression;
13201320
set => fromExpression = value;
13211321
}

0 commit comments

Comments
 (0)