You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by sh...@apache.org on 2016/09/04 10:31:10 UTC
svn commit: r1759171 -
/ofbiz/branches/release13.07/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java
Author: shijh
Date: Sun Sep 4 10:31:10 2016
New Revision: 1759171
URL: http://svn.apache.org/viewvc?rev=1759171&view=rev
Log:
OFBIZ-8137 Entityname starts with schema name causes error in PostgreSQL
Modified:
ofbiz/branches/release13.07/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java
Modified: ofbiz/branches/release13.07/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java?rev=1759171&r1=1759170&r2=1759171&view=diff
==============================================================================
--- ofbiz/branches/release13.07/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java (original)
+++ ofbiz/branches/release13.07/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java Sun Sep 4 10:31:10 2016
@@ -1033,7 +1033,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) {
@@ -3211,7 +3211,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) {