Foreign key name is too long

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
Posts: 8
Joined: Tue 03 Mar 2015 06:11

Foreign key name is too long

Post by hcro12 » Tue 03 Mar 2015 12:14

When I run a ctxt.CreateDatabase(false, true), I got "Identifier name 'FK_omse_networkelements_Omse_Networkelement_Lnk_Omse_NetworkElements' is too long".

SQL statement from dbMonitor:

Code: Select all

CREATE TABLE omse_networkelements (
   NetworkElement_Id INT(11) AUTO_INCREMENT NOT NULL,
   NetworkElement_XtranId INT(11),
   NetworkElement_Number INT(11) NOT NULL,
   NetworkElement_Name LONGTEXT NOT NULL,
   NetworkElement_TimeStamp VARCHAR(50),
   lnk_Omse_NetworkElement_Types INT(11) NOT NULL,
   lnk_Omse_NetworkElements INT(11),
   lnk_Omse_Components INT(11),
   CONSTRAINT PK_omse_networkelements PRIMARY KEY (NetworkElement_Id),
   CONSTRAINT FK_omse_networkelements_Omse_Component FOREIGN KEY (lnk_Omse_Components) REFERENCES omse_components (Comp_Id) ON DELETE NO ACTION,
   CONSTRAINT FK_omse_networkelements_Omse_Networkelement_Lnk_Omse_NetworkElements FOREIGN KEY (lnk_Omse_NetworkElements) REFERENCES omse_networkelements (NetworkElement_Id) ON DELETE NO ACTION,
   CONSTRAINT FK_omse_networkelements_Omse_Networkelement_Type FOREIGN KEY (lnk_Omse_NetworkElement_Types) REFERENCES omse_networkelement_types (NetworkElement_Type_Id) ON DELETE NO ACTION
I have included in my config file:

Code: Select all

    <CodeFirstOptions TruncateLongDefaultNames="true" />
But no luck :(

Any tips?

Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Foreign key name is too long

Post by MariiaI » Tue 03 Mar 2015 12:28

We have asked you for the additional information here.

Post Reply