Problem on creating 2 many-to-many relations on a diagram

Problem on creating 2 many-to-many relations on a diagram

Postby detaybey » Thu 09 Jun 2011 17:28

Hi, I'm a new user of devart, and I'm using Devart DotConnect for Postgresql. I realized a serious problem and don't know if it's a bug or not.

In my diagram I have like 25 classes, and 2 of them has many-to-many relations. When I try to update the database from schema, i get errors.

Here's the reason;

CREATE TABLE public."Group_Forum" (
"Group_Id" INT8 NOT NULL,
"Forum_Id" INT8 NOT NULL,
CONSTRAINT "PrimaryKey" PRIMARY KEY ("Group_Id", "Forum_Id"),
CONSTRAINT "FK_Group_Forum_Group" FOREIGN KEY ("Group_Id") REFERENCES "Group" ("Id"),
CONSTRAINT "FK_Group_Forum_Forum" FOREIGN KEY ("Forum_Id") REFERENCES "Forum" ("Id")
);

--
-- Creating a table public."Role_Group"
--
CREATE TABLE public."Role_Group" (
"Role_Id" INT8 NOT NULL,
"Group_Id" INT8 NOT NULL,
CONSTRAINT "PrimaryKey" PRIMARY KEY ("Role_Id", "Group_Id"),
CONSTRAINT "FK_Role_Group_Role" FOREIGN KEY ("Role_Id") REFERENCES "Role" ("Id"),
CONSTRAINT "FK_Role_Group_Group" FOREIGN KEY ("Group_Id") REFERENCES "Group" ("Id")
);


As you see, two relations are created but with the same constraint name "PrimaryKey" and Postgresql does not like it at all :) When I change the constraint names to "PrimaryKey1" and "PrimaryKey2" (any different two names would do) it works.

but to get it working, I have to get the script generated and rename those areas. Not good :/

Can you please fix that naming problem so we can get the schema updates working properly? (Or at least give me an option to name the constraints)

Thanks.
detaybey
 
Posts: 9
Joined: Thu 09 Jun 2011 16:23

Postby AndreyR » Fri 10 Jun 2011 07:20

Thank you for the report, we are investigating the issue.
I will let you know about the results of our investigation.
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Postby AndreyR » Wed 06 Jul 2011 08:49

We have fixed the problem. The fixed build will be available in a week or so.
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Postby AndreyR » Mon 11 Jul 2011 08:44

This problem is fixed in the latest 5.30.185 build of dotConnect for PostgreSQL. The new build can be dowloaded from here (the trial version) or from Registered Users' Area (for users with active subscription only):
For the detailed information about the improvements and fixes available in dotConnect for PostgreSQL 5.30.185, please refer to
this announcement.
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16


Return to dotConnect for PostgreSQL