Page 1 of 1

Import of EDMX file results in "foreign key...not being enforced"

Posted: Mon 27 Jan 2014 21:16
by billster6809
I am trying to import an existing EDMX file in Entity Developer. It reports an error for two entity types. I have a base "StorageLocation" type. From that, there is a derived "RackStorage" type. From that, I have "RackGrid" and "RackDiamond" derived types.

I get the following errors, which I could not find described in the help. The edmx has no problems in VisualStudio 2012 or 2013, and the generated classes work just fine as they are currently being created from the edmx (inheritance chain is properly enforced). The errors, although they reference the RackStorage type, actually result in the error 'x' on the base class StorageLocation.

Can you tell me how to address these errors so that I can complete the conversion? If you need the edmx file to evaluate, I can provide it; just tell me where it goes.

1 Problem in mapping fragments starting at lines 877, 888:The foreign key 'Foreign key constraint 'FK_RackDiamond_inherits_RackStorage' from table StorageLocations_RackDiamond (Id) to table StorageLocations_RackStorage (Id):' is not being enforced in the model. An Association or inheritance relationship needs to be created to enforce this constraint.
D:\Tmp\WineDataModel.edml

2 Problem in mapping fragments starting at lines 877, 883:The foreign key 'Foreign key constraint 'FK_RackGrid_inherits_RackStorage' from table StorageLocations_RackGrid (Id) to table StorageLocations_RackStorage (Id):' is not being enforced in the model. An Association or inheritance relationship needs to be created to enforce this constraint.
D:\Tmp\WineDataModel.edml

Re: Import of EDMX file results in "foreign key...not being enforced"

Posted: Tue 28 Jan 2014 12:10
by Shalex
billster6809 wrote:If you need the edmx file to evaluate, I can provide it; just tell me where it goes.
Please specify the exact version (x.x.xxx) of your Entity Developer and send us your *.edmx file.

Re: Import of EDMX file results in "foreign key...not being enforced"

Posted: Tue 28 Jan 2014 18:57
by billster6809
Information sent via email as requested, including the edmx file.
Version is the current one, 5.78.276 (just purchased a day ago)

Re: Import of EDMX file results in "foreign key...not being enforced"

Posted: Thu 30 Jan 2014 11:55
by Shalex
Thank you for the test model. We are investigating the issue.

Re: Import of EDMX file results in "foreign key...not being enforced"

Posted: Wed 12 Feb 2014 12:16
by Shalex
The bug with parsing inheritances in *.edmx is fixed. We will notify you when the corresponding build of Entity Developer is available for download.

Re: Import of EDMX file results in "foreign key...not being enforced"

Posted: Thu 13 Feb 2014 16:35
by Shalex
New build of Entity Developer 5.7.296 is available for download!
It can be downloaded from http://www.devart.com/entitydeveloper/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=32&t=28929.

Re: Import of EDMX file results in "foreign key...not being enforced"

Posted: Thu 13 Feb 2014 21:00
by billster6809
I confirm that 5.7.296 resolves the import issue. EDMX file is now successfully imported into Entity Developer with no errors.

Thank you for excellent support!