Dependent Role of referential constraint errors
Dependent Role of referential constraint errors
Using a simple PK-FK relationship to generate a model using Entity Developer 4.2.120, I get the following error messages.
1 The types of all properties in the Dependent Role of a referential constraint must be the same as the corresponding property types in the Principal Role. The type of property 'source_setup_id' on entity 'FkbugModel.Store.setup_item_code' does not match the type of property 'id_item_coding' on entity 'FkbugModel.Store.setup_item' in the referential constraint 'fk_child_to_parent'. PriceBook.edml
2 The types of all properties in the Dependent Role of a referential constraint must be the same as the corresponding property types in the Principal Role. The type of property 'item_state_name' on entity 'FkbugModel.Store.setup_item_code' does not match the type of property 'pack_size' on entity 'FkbugModel.Store.setup_item' in the referential constraint 'fk_child_to_parent'. PriceBook.edml
3 The types of all properties in the Dependent Role of a referential constraint must be the same as the corresponding property types in the Principal Role. The type of property 'SourceSetupId' on entity 'FkbugModel.SetupItemCode' does not match the type of property 'IdItemCoding' on entity 'FkbugModel.SetupItem' in the referential constraint 'SetupItem_SetupItemCode'. PriceBook.edml
4 The types of all properties in the Dependent Role of a referential constraint must be the same as the corresponding property types in the Principal Role. The type of property 'ItemStateName' on entity 'FkbugModel.SetupItemCode' does not match the type of property 'PackSize' on entity 'FkbugModel.SetupItem' in the referential constraint 'SetupItem_SetupItemCode'. PriceBook.edml
Script used to generate the database.
CREATE TABLE setup_item (
setup_id integer NOT NULL,
source_setup_id integer NOT NULL,
id_item_coding character varying(30) NOT NULL,
pack_size integer NOT NULL,
item_state_name character varying(50) NOT NULL
);
ALTER TABLE public.setup_item OWNER TO postgres;
CREATE TABLE setup_item_code (
setup_id integer NOT NULL,
source_setup_id integer NOT NULL,
id_item_coding character varying(30) NOT NULL,
pack_size integer NOT NULL,
item_state_name character varying(50) NOT NULL
);
ALTER TABLE public.setup_item_code OWNER TO postgres;
ALTER TABLE ONLY setup_item
ADD CONSTRAINT pk_setup_item PRIMARY KEY (setup_id, source_setup_id, id_item_coding, pack_size, item_state_name);
ALTER TABLE ONLY setup_item_code
ADD CONSTRAINT pk_setup_item_code PRIMARY KEY (setup_id, source_setup_id, id_item_coding, pack_size, item_state_name);
ALTER TABLE ONLY setup_item_code
ADD CONSTRAINT fk_child_to_parent FOREIGN KEY (setup_id, source_setup_id, id_item_coding, pack_size, item_state_name) REFERENCES setup_item(setup_id, source_setup_id, id_item_coding, pack_size, item_state_name);
Thanks,
Charlie J.
1 The types of all properties in the Dependent Role of a referential constraint must be the same as the corresponding property types in the Principal Role. The type of property 'source_setup_id' on entity 'FkbugModel.Store.setup_item_code' does not match the type of property 'id_item_coding' on entity 'FkbugModel.Store.setup_item' in the referential constraint 'fk_child_to_parent'. PriceBook.edml
2 The types of all properties in the Dependent Role of a referential constraint must be the same as the corresponding property types in the Principal Role. The type of property 'item_state_name' on entity 'FkbugModel.Store.setup_item_code' does not match the type of property 'pack_size' on entity 'FkbugModel.Store.setup_item' in the referential constraint 'fk_child_to_parent'. PriceBook.edml
3 The types of all properties in the Dependent Role of a referential constraint must be the same as the corresponding property types in the Principal Role. The type of property 'SourceSetupId' on entity 'FkbugModel.SetupItemCode' does not match the type of property 'IdItemCoding' on entity 'FkbugModel.SetupItem' in the referential constraint 'SetupItem_SetupItemCode'. PriceBook.edml
4 The types of all properties in the Dependent Role of a referential constraint must be the same as the corresponding property types in the Principal Role. The type of property 'ItemStateName' on entity 'FkbugModel.SetupItemCode' does not match the type of property 'PackSize' on entity 'FkbugModel.SetupItem' in the referential constraint 'SetupItem_SetupItemCode'. PriceBook.edml
Script used to generate the database.
CREATE TABLE setup_item (
setup_id integer NOT NULL,
source_setup_id integer NOT NULL,
id_item_coding character varying(30) NOT NULL,
pack_size integer NOT NULL,
item_state_name character varying(50) NOT NULL
);
ALTER TABLE public.setup_item OWNER TO postgres;
CREATE TABLE setup_item_code (
setup_id integer NOT NULL,
source_setup_id integer NOT NULL,
id_item_coding character varying(30) NOT NULL,
pack_size integer NOT NULL,
item_state_name character varying(50) NOT NULL
);
ALTER TABLE public.setup_item_code OWNER TO postgres;
ALTER TABLE ONLY setup_item
ADD CONSTRAINT pk_setup_item PRIMARY KEY (setup_id, source_setup_id, id_item_coding, pack_size, item_state_name);
ALTER TABLE ONLY setup_item_code
ADD CONSTRAINT pk_setup_item_code PRIMARY KEY (setup_id, source_setup_id, id_item_coding, pack_size, item_state_name);
ALTER TABLE ONLY setup_item_code
ADD CONSTRAINT fk_child_to_parent FOREIGN KEY (setup_id, source_setup_id, id_item_coding, pack_size, item_state_name) REFERENCES setup_item(setup_id, source_setup_id, id_item_coding, pack_size, item_state_name);
Thanks,
Charlie J.
Thank you for your report. We have reproduced the problem. We will post here when it is fixed.
As a workaround, please edit:
1) the association which was generated automatically: right click on the association in Model Explorer > Edit > set corresponding referencial constraint properties between two tables correctly;
2) the constraint in Model Explorer in a similar way.
As a workaround, please edit:
1) the association which was generated automatically: right click on the association in Model Explorer > Edit > set corresponding referencial constraint properties between two tables correctly;
2) the constraint in Model Explorer in a similar way.
How big is the file, because there might by a size limit to that email. Can you send it to [email protected]?
Thanks,
Charlie J.
Thanks,
Charlie J.
Here is a Delivery Failure message we are getting when sending an e-mail to [djmail at redshfit*com]:
Reason: Remote host said: 601 Failed to connect to the recipients mail server. No MX records were found for the 'redshfit.com' domain. Attempted to send the message to the following ip's:
208.64.124.162
1. Please check settings of your mail server.
2. We are entitled to send internal builds only to the registered e-mails.
3. Our e-mail contained only link and password (no attachment).
Reason: Remote host said: 601 Failed to connect to the recipients mail server. No MX records were found for the 'redshfit.com' domain. Attempted to send the message to the following ip's:
208.64.124.162
1. Please check settings of your mail server.
2. We are entitled to send internal builds only to the registered e-mails.
3. Our e-mail contained only link and password (no attachment).