Key is not primary

Discussion of open issues, suggestions and bugs regarding EntityDAC
Post Reply
ludydoo
Posts: 6
Joined: Sun 22 Nov 2015 21:53

Key is not primary

Post by ludydoo » Sun 22 Nov 2015 21:56

Hi,

I am working with a legacy database. It has some design mistakes. One of them being that there is a foreign key on a table that points to another field on another table which is not the primary key (but is unique).

EG :

USERS
----------
ID (PK)
User (Unique)

MANDATES
----------------
ID (PK)
User (FK on USERS.USER)

If I use EntityDAC to set MANDATE.USER = USER1, I get an error

"Key is not primary".

Any way I can get this to work?

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Key is not primary

Post by AlexP » Mon 23 Nov 2015 09:08

Hello,

Please send the project and model, on which the error occurs to support*devart*com.

Post Reply