views:

96

answers:

1

The relationship 'FK_EXTERNAL_ISMARKETI_MARKETIN' has columns that are not part of the key of the table on the primary side of the relationship. The relationship was excluded.

USE [Instruments.UnitTest] GO

ALTER TABLE [Instr].[ExternalIdentification]  WITH CHECK ADD  CONSTRAINT [FK_EXTERNAL_ISMARKETI_MARKETIN] FOREIGN KEY([InstrumentID], [MarketInstrumentID])
REFERENCES [Instr].[MarketInstrument] ([InstrumentID], [MarketInstrumentID])
GO

ALTER TABLE [Instr].[ExternalIdentification] CHECK CONSTRAINT [FK_EXTERNAL_ISMARKETI_MARKETIN]
GO

I'm using an association for NON-PRIMARY KEY columns, is this possible in the EF4?

A: 

Such associations are not supported in EF v4.

Devart
Any MS documentation that prove that statement sir?
Rommel Manalo
In EF v1 there was no support, take a look at this link:http://social.msdn.microsoft.com/Forums/en/adodotnetentityframework/thread/654d4e35-eed9-4554-a75e-186b4aff7515As for EF v4, we have tried to make such associations to work and have not succeeded - mapping error occurs.
Devart
Thanks for the info
Rommel Manalo