Author: shijh
Date: Sun Sep 4 10:30:50 2016
New Revision: 1759170
URL:
http://svn.apache.org/viewvc?rev=1759170&view=revLog:
OFBIZ-8137 Entityname starts with schema name causes error in PostgreSQL
Modified:
ofbiz/branches/release14.12/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java
Modified: ofbiz/branches/release14.12/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release14.12/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java?rev=1759170&r1=1759169&r2=1759170&view=diff==============================================================================
--- ofbiz/branches/release14.12/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java (original)
+++ ofbiz/branches/release14.12/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java Sun Sep 4 10:30:50 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) {