hg merge release-6.2 (merge release6.2 into default)

This commit is contained in:
Carlos Ruiz 2019-09-07 13:30:15 +02:00
commit 54aab6fea3
3 changed files with 21 additions and 12 deletions

View File

@ -895,20 +895,24 @@ public class ModelClassGenerator
file.mkdirs();
// complete sql
String filterViews = null;
if (tableLike.toString().contains("%")) {
filterViews = "AND (TableName IN ('RV_WarehousePrice','RV_BPartner') OR IsView='N')"; // special views
}
StringBuilder sql = new StringBuilder();
sql.append("SELECT AD_Table_ID ")
.append("FROM AD_Table ")
.append("WHERE (TableName IN ('RV_WarehousePrice','RV_BPartner')") // special views
.append(" OR IsView='N')")
.append(" AND IsActive = 'Y' AND TableName NOT LIKE '%_Trl' ");
.append("WHERE IsActive = 'Y' AND TableName NOT LIKE '%_Trl' ");
// Autodetect if we need to use IN or LIKE clause - teo_sarca [ 3020640 ]
if (tableLike.indexOf(",") == -1)
sql.append(" AND TableName LIKE ").append(tableLike);
else
sql.append(" AND TableName IN (").append(tableLike).append(")"); // only specific tables
sql.append(" AND ").append(entityTypeFilter.toString());
if (filterViews != null) {
sql.append(filterViews);
}
sql.append(" ORDER BY TableName");
//
PreparedStatement pstmt = null;
ResultSet rs = null;

View File

@ -813,18 +813,23 @@ public class ModelInterfaceGenerator
file.mkdirs();
// complete sql
String filterViews = null;
if (tableLike.toString().contains("%")) {
filterViews = "AND (TableName IN ('RV_WarehousePrice','RV_BPartner') OR IsView='N')"; // special views
}
StringBuilder sql = new StringBuilder();
sql.append("SELECT AD_Table_ID ")
.append("FROM AD_Table ")
.append("WHERE (TableName IN ('RV_WarehousePrice','RV_BPartner')") // special views
.append(" OR IsView='N')")
.append(" AND IsActive = 'Y' AND TableName NOT LIKE '%_Trl' ");
.append("WHERE IsActive = 'Y' AND TableName NOT LIKE '%_Trl' ");
// Autodetect if we need to use IN or LIKE clause - teo_sarca [ 3020640 ]
if (tableLike.indexOf(",") == -1)
sql.append(" AND TableName LIKE ").append(tableLike);
else
sql.append(" AND TableName IN (").append(tableLike).append(")"); // only specific tables
sql.append(" AND ").append(entityTypeFilter.toString());
if (filterViews != null) {
sql.append(filterViews);
}
sql.append(" ORDER BY TableName");
//

File diff suppressed because one or more lines are too long