Hi Carlos and Hengsin!
Thanks for your answers, but I checked it a lot time.
I created short example 2pack for demo because maybe I had mistake when created 2pack and you can correct me.
Step-by-step my example:
Step 1)Crete table in Postgresql with new field volume_uom_id numeric(10,0)
CREATE TABLE test2
(
test2_id numeric(10,0) NOT NULL,
ad_client_id numeric(10,0) NOT NULL,
ad_org_id numeric(10,0) NOT NULL,
isactive character(1) NOT NULL DEFAULT 'Y'::bpchar,
created timestamp without time zone NOT NULL DEFAULT now(),
createdby numeric(10,0) NOT NULL,
updated timestamp without time zone NOT NULL DEFAULT now(),
updatedby numeric(10,0) NOT NULL,
name character varying(60) NOT NULL,
volume_uom_id numeric(10,0)
)
WITH (
OIDS=FALSE
);
ALTER TABLE test2
OWNER TO adempiere;
Step 2) Create new table Test2 in iDempiere
Step 3) For field volume_uom_id set
Reference*=Table
Reference Key=C_UOM
Step 4) Create window for this table.
Step 5) Create 2Pack=Test2.zip for this window (you can see this file in attachment)
Step 6) Pack In this 2Pack=Test2.zip on the server with RED1 path and OK.
org.adempiere.exceptions.DBException: org.postgresql.util.PSQLException: ERROR: foreign key constraint "volumeuom_test2" cannot be implemented
Detail: Key columns "volume_uom_id" and "c_uom_id" are of incompatible types: character varying and numeric.
Thanks,
Peter
вторник, 2 апреля 2019 г., 17:56:16 UTC+3 пользователь Carlos Antonio Ruiz Gomez написал: