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

Commit 12cdd5e

Browse files
committed
Use NamingStrategy.GetSchemaName() in PostrgreSQL
1 parent 6fa5f22 commit 12cdd5e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ServiceStack.OrmLite.PostgreSQL/PostgreSQLDialectProvider.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -471,10 +471,10 @@ public override string GetQuotedTableName(ModelDefinition modelDef)
471471
if (!modelDef.IsInSchema)
472472
return base.GetQuotedTableName(modelDef);
473473
if (Normalize && !ReservedWords.Contains(modelDef.ModelName) && !ReservedWords.Contains(modelDef.Schema))
474-
return modelDef.Schema + "." + base.NamingStrategy.GetTableName(modelDef.ModelName);
474+
return NamingStrategy.GetSchemaName(modelDef.Schema) + "." + NamingStrategy.GetTableName(modelDef.ModelName);
475475

476-
string escapedSchema = modelDef.Schema.Replace(".", "\".\"");
477-
return $"\"{escapedSchema}\".\"{base.NamingStrategy.GetTableName(modelDef.ModelName)}\"";
476+
string escapedSchema = NamingStrategy.GetSchemaName(modelDef.Schema).Replace(".", "\".\"");
477+
return $"\"{escapedSchema}\".\"{NamingStrategy.GetTableName(modelDef.ModelName)}\"";
478478
}
479479

480480
public override string GetLastInsertIdSqlSuffix<T>()

0 commit comments

Comments
 (0)