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

Commit 3226f0d

Browse files
committed
Update GetTableName Function
1. Schema name and table name should be separated by "." instead of "_". 2. Each portion of the identifier (eg schema name, table name, column name) should be a maximum of 30 bytes. Source: http://docs.oracle.com/cd/B28359_01/server.111/b28286/sql_elements008.htm#SQLRF00223
1 parent 2c76cf2 commit 3226f0d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ServiceStack.OrmLite.Oracle/OracleNamingStrategy.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ public override string ApplyNameRestrictions(string name)
4141
public override string GetTableName(ModelDefinition modelDef)
4242
{
4343
return modelDef.IsInSchema
44-
? ApplyNameRestrictions(modelDef.Schema
45-
+ "_" + GetTableName(modelDef.ModelName))
44+
? ApplyNameRestrictions(modelDef.Schema)
45+
+ "." + ApplyNameRestrictions(GetTableName(modelDef.ModelName))
4646
: GetTableName(modelDef.ModelName);
4747
}
4848

0 commit comments

Comments
 (0)