Permalink
Browse files

Use NamingStrategy.GetSchemaName() in PostrgreSQL

  • Loading branch information...
mythz committed Jan 18, 2019
1 parent 6fa5f22 commit 12cdd5e2d071383dcaa114f7453868715547fc8c
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/ServiceStack.OrmLite.PostgreSQL/PostgreSQLDialectProvider.cs
@@ -471,10 +471,10 @@ public override string GetQuotedTableName(ModelDefinition modelDef)
if (!modelDef.IsInSchema)
return base.GetQuotedTableName(modelDef);
if (Normalize && !ReservedWords.Contains(modelDef.ModelName) && !ReservedWords.Contains(modelDef.Schema))
return modelDef.Schema + "." + base.NamingStrategy.GetTableName(modelDef.ModelName);
return NamingStrategy.GetSchemaName(modelDef.Schema) + "." + NamingStrategy.GetTableName(modelDef.ModelName);

string escapedSchema = modelDef.Schema.Replace(".", "\".\"");
return $"\"{escapedSchema}\".\"{base.NamingStrategy.GetTableName(modelDef.ModelName)}\"";
string escapedSchema = NamingStrategy.GetSchemaName(modelDef.Schema).Replace(".", "\".\"");
return $"\"{escapedSchema}\".\"{NamingStrategy.GetTableName(modelDef.ModelName)}\"";
}

public override string GetLastInsertIdSqlSuffix<T>()

0 comments on commit 12cdd5e

Please sign in to comment.