Dependent Role of referential constraint errors

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
cjbiggs
Posts: 105
Joined: Fri 15 Jan 2010 19:56

Dependent Role of referential constraint errors

Post by cjbiggs » Thu 09 Feb 2012 03:05

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.

Shalex
Site Admin
Posts: 8248
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Fri 10 Feb 2012 16:44

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.

Shalex
Site Admin
Posts: 8248
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Mon 13 Feb 2012 14:11

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.

cjbiggs
Posts: 105
Joined: Fri 15 Jan 2010 19:56

Post by cjbiggs » Mon 13 Feb 2012 15:13

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.

Shalex
Site Admin
Posts: 8248
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Thu 16 Feb 2012 15:41

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.

cjbiggs
Posts: 105
Joined: Fri 15 Jan 2010 19:56

Post by cjbiggs » Fri 17 Feb 2012 15:01

Thanks
Last edited by cjbiggs on Mon 20 Feb 2012 22:19, edited 1 time in total.

Shalex
Site Admin
Posts: 8248
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Mon 20 Feb 2012 10:42

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.

cjbiggs
Posts: 105
Joined: Fri 15 Jan 2010 19:56

Post by cjbiggs » Mon 20 Feb 2012 22:19

Ok Thanks

cjbiggs
Posts: 105
Joined: Fri 15 Jan 2010 19:56

Post by cjbiggs » Tue 21 Feb 2012 17:16

Sorry But we have not received they email that contains the download for the internal build. Can you please resend it?

Thanks,

Charlie J.

Shalex
Site Admin
Posts: 8248
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Tue 21 Feb 2012 17:57

Just resent to [djmail at redshfit*com].

cjbiggs
Posts: 105
Joined: Fri 15 Jan 2010 19:56

Post by cjbiggs » Tue 21 Feb 2012 18:12

How big is the file, because there might by a size limit to that email. Can you send it to cjbiggs@theinnovationbox.com?

Thanks,

Charlie J.

Shalex
Site Admin
Posts: 8248
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Wed 22 Feb 2012 08:54

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).

cjbiggs
Posts: 105
Joined: Fri 15 Jan 2010 19:56

Post by cjbiggs » Wed 22 Feb 2012 14:30

The email address is spelled incorrectly. It is djmail@redshift.com

Thanks,

Charlie J.

Shalex
Site Admin
Posts: 8248
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Wed 22 Feb 2012 16:05

Done.

cjbiggs
Posts: 105
Joined: Fri 15 Jan 2010 19:56

Post by cjbiggs » Fri 24 Feb 2012 04:37

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.

Post Reply