IDEMPIERE-3022 Copy Columns from table error message
This commit is contained in:
parent
70e97317ad
commit
42f3bd217b
|
@ -0,0 +1,8 @@
|
||||||
|
SET SQLBLANKLINES ON
|
||||||
|
SET DEFINE OFF
|
||||||
|
|
||||||
|
-- IDEMPIERE-3022 Copy Columns from table error message
|
||||||
|
-- Feb 1, 2016 5:11:42 PM CET
|
||||||
|
INSERT INTO AD_Message (MsgType,MsgText,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Message_ID,Value,EntityType,AD_Message_UU) VALUES ('E','Target table must not have columns',0,0,'Y',TO_DATE('2016-02-01 17:11:42','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2016-02-01 17:11:42','YYYY-MM-DD HH24:MI:SS'),0,200398,'ErrorCopyColumns','D','e74d8970-44f1-4cd0-9b5e-ee21af6c286e')
|
||||||
|
;
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
-- IDEMPIERE-3022 Copy Columns from table error message
|
||||||
|
-- Feb 1, 2016 5:11:42 PM CET
|
||||||
|
INSERT INTO AD_Message (MsgType,MsgText,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Message_ID,Value,EntityType,AD_Message_UU) VALUES ('E','Target table must not have columns',0,0,'Y',TO_TIMESTAMP('2016-02-01 17:11:42','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2016-02-01 17:11:42','YYYY-MM-DD HH24:MI:SS'),0,200398,'ErrorCopyColumns','D','e74d8970-44f1-4cd0-9b5e-ee21af6c286e')
|
||||||
|
;
|
||||||
|
|
|
@ -22,6 +22,8 @@ import org.compiere.model.MTable;
|
||||||
import org.compiere.model.M_Element;
|
import org.compiere.model.M_Element;
|
||||||
import org.compiere.model.PO;
|
import org.compiere.model.PO;
|
||||||
import org.compiere.util.AdempiereSystemError;
|
import org.compiere.util.AdempiereSystemError;
|
||||||
|
import org.compiere.util.Env;
|
||||||
|
import org.compiere.util.Msg;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copy columns from one table to other
|
* Copy columns from one table to other
|
||||||
|
@ -76,8 +78,7 @@ public class CopyColumnsFromTable extends SvrProcess
|
||||||
MTable targetTable = new MTable(getCtx(), p_target_AD_Table_ID, get_TrxName());
|
MTable targetTable = new MTable(getCtx(), p_target_AD_Table_ID, get_TrxName());
|
||||||
MColumn[] targetColumns = targetTable.getColumns(true);
|
MColumn[] targetColumns = targetTable.getColumns(true);
|
||||||
if (targetColumns.length > 0)
|
if (targetColumns.length > 0)
|
||||||
// TODO: dictionary message
|
throw new AdempiereSystemError(Msg.getMsg(Env.getCtx(), "ErrorCopyColumns"));
|
||||||
throw new AdempiereSystemError("Target table must not have columns");
|
|
||||||
|
|
||||||
MTable sourceTable = new MTable(getCtx(), p_source_AD_Table_ID, get_TrxName());
|
MTable sourceTable = new MTable(getCtx(), p_source_AD_Table_ID, get_TrxName());
|
||||||
MColumn[] sourceColumns = sourceTable.getColumns(true);
|
MColumn[] sourceColumns = sourceTable.getColumns(true);
|
||||||
|
|
Loading…
Reference in New Issue