jdbc tuj fix
This commit is contained in:
@@ -298,6 +298,11 @@ public abstract class ConvertTCompV0ToTckComponentMigrationTask extends Abstract
|
||||
//remove tcompv0 PROPERTIES element at last
|
||||
ParameterUtilTool.removeParameterType(nodeType, tcompV0PropertiesElement);
|
||||
|
||||
ElementParameterType versionElementParameter = ParameterUtilTool.findParameterType(nodeType, "VERSION");
|
||||
if(versionElementParameter != null) {
|
||||
ParameterUtilTool.removeParameterType(nodeType, versionElementParameter);
|
||||
}
|
||||
|
||||
//no need to change the unique name as it use unify name like "tDBInput_1", and tcompv0's node's metadata(metadata name/connection name/schema) in item match the connection by the unique name,
|
||||
//so no need to migrate the metadata/connection line from tcompv0 to tck, it should work.
|
||||
}
|
||||
|
||||
@@ -240,6 +240,11 @@ globalMap.put("<%=cid %>_MAPPINGS_URL", mappings_url_<%=cid %>);
|
||||
|
||||
if(cid.contains("JDBC") && p.getFieldType() == EParameterFieldType.MEMO_SQL && value.contains("+")) {
|
||||
value = org.talend.core.model.utils.NodeUtil.replaceCRLFInMEMO_SQL(value);
|
||||
} else if(cid.contains("JDBC") && key.contains("tableName") && (value.contains("+") || value.contains(".") || "pid".equals(value.trim()))) {
|
||||
//as common, should no database table is named with "+" or ".", and "+" and "." should appear for java var or expression or database full table name with catalog/schema, so do the "if" check above
|
||||
//user may use var : pid, which we have no way to know that is a var or not a var for user, here treat it as a var here, not wrap by double quote
|
||||
//not change value, keep origin one
|
||||
value = "String.valueOf(" + value + ")";
|
||||
} else {
|
||||
// fix MEMO Types: behave now as TEXT_AREA
|
||||
if (p.getFieldType().toString().startsWith("MEMO")){
|
||||
|
||||
Reference in New Issue
Block a user