I'm trying to create a one to one association with two tables but i keep getting FK constraint error. I've tried to change my association to one to many and the exact same model worked. So, I came here for help.
Here are my tables (they were modified to be tested easily)
Code: Select all
CREATE TABLE public."BaseEntities" (
"Id" SERIAL NOT NULL,
"Any" VARCHAR,
"Father" INT4,
CONSTRAINT "PK_BaseEntities" PRIMARY KEY ("Id"),
CONSTRAINT "FK_BaseEntities_BaseEntities_0" FOREIGN KEY ("Father") REFERENCES public."BaseEntities" ("Id")
);
CREATE TABLE public."Parameters" (
"Id" SERIAL NOT NULL,
"Value" FLOAT4 NOT NULL,
CONSTRAINT "PK_Parameters" PRIMARY KEY ("Id"),
CONSTRAINT "FK_Parameters_BaseEntities_0" FOREIGN KEY ("Id") REFERENCES public."BaseEntities" ("Id")
);
What's wrong??
Thanks
Edit:
I forgot. I'm using LinqConnect 3.0.14, Windows 7, Postgresql 9.1 (although I also tried on SQL Server)