Key is not primary

Key is not primary

Postby 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?
ludydoo
 
Posts: 6
Joined: Sun 22 Nov 2015 21:53

Re: Key is not primary

Postby AlexP » Mon 23 Nov 2015 09:08

Hello,

Please send the project and model, on which the error occurs to support*devart*com.
AlexP
Devart Team
 
Posts: 5525
Joined: Tue 10 Aug 2010 11:35


Return to EntityDAC