Page 1 of 2

Dependent Role of referential constraint errors

Posted: Thu 09 Feb 2012 03:05
by cjbiggs
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.

Posted: Fri 10 Feb 2012 16:44
by Shalex
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.

Posted: Mon 13 Feb 2012 14:11
by Shalex
The bug with detecting FK constraints and associations is fixed. We will notify you when the corresponding build of Entity Developer is available for download.

Posted: Mon 13 Feb 2012 15:13
by cjbiggs
That is great. Is there a way for me to get an internal build or patch for this issue? I know about the workaround that you mention, but that is alot of manually work for me.


Thanks,

Charlie J.

Posted: Thu 16 Feb 2012 15:41
by Shalex
Could you please send us the e-mail, your name, and the name of the company you have used when registering product? We have to check your license before sending an internal build.

Posted: Fri 17 Feb 2012 15:01
by cjbiggs
Thanks

Posted: Mon 20 Feb 2012 10:42
by Shalex
Charlie, we have sent a download link to [djmail at redshfit*com] (this e-mail is verified by our Sales department). We recommend you to remove the e-mails from your previous post to avoid receiving spam.

Posted: Mon 20 Feb 2012 22:19
by cjbiggs
Ok Thanks

Posted: Tue 21 Feb 2012 17:16
by cjbiggs
Sorry But we have not received they email that contains the download for the internal build. Can you please resend it?

Thanks,

Charlie J.

Posted: Tue 21 Feb 2012 17:57
by Shalex
Just resent to [djmail at redshfit*com].

Posted: Tue 21 Feb 2012 18:12
by cjbiggs
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.

Posted: Wed 22 Feb 2012 08:54
by Shalex
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).

Posted: Wed 22 Feb 2012 14:30
by cjbiggs
The email address is spelled incorrectly. It is [email protected]

Thanks,

Charlie J.

Posted: Wed 22 Feb 2012 16:05
by Shalex
Done.

Posted: Fri 24 Feb 2012 04:37
by cjbiggs
Got it. Thanks. I tested it and it works just fine. Thanks for the internal build. When will this fix be in a general release?

Thanks,

Charlie J.