Author: shijh
Date: Sun Sep 4 10:29:19 2016
New Revision: 1759169
URL:
http://svn.apache.org/viewvc?rev=1759169&view=revLog:
OFBIZ-8137 Entityname starts with schema name causes error in PostgreSQL
Modified:
ofbiz/branches/release15.12/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java
Modified: ofbiz/branches/release15.12/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release15.12/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java?rev=1759169&r1=1759168&r2=1759169&view=diff==============================================================================
--- ofbiz/branches/release15.12/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java (original)
+++ ofbiz/branches/release15.12/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java Sun Sep 4 10:29:19 2016
@@ -1001,7 +1001,7 @@ public class DatabaseUtil {
String tableName = tableSet.getString("TABLE_NAME");
// for those databases which do not return the schema name with the table name (pgsql 7.3)
boolean appendSchemaName = false;
- if (tableName != null && lookupSchemaName != null && !tableName.startsWith(lookupSchemaName)) {
+ if (tableName != null && lookupSchemaName != null && !tableName.startsWith(lookupSchemaName + "\\.")) {
appendSchemaName = true;
}
if (needsUpperCase && tableName != null) {
@@ -3179,7 +3179,7 @@ public class DatabaseUtil {
String tableName = rawTableName;
// for those databases which do not return the schema name with the table name (pgsql 7.3)
boolean appendSchemaName = false;
- if (tableName != null && lookupSchemaName != null && !tableName.startsWith(lookupSchemaName)) {
+ if (tableName != null && lookupSchemaName != null && !tableName.startsWith(lookupSchemaName + "\\.")) {
appendSchemaName = true;
}
if (needsUpperCase && tableName != null) {