This question is locked. New answers and comments are not allowed.
Hi,
I've created a domain model from an existing database and have a validation error for a 'Bill-of-materials' construct. The error is "The MetaJoinTableAssociation SurveysHasSurveys1 can not be created. The foreign key column ParentId of the SURVEY_HISTORY join table points to the master and child tables at the same time" where ParentId is the parent survey id and SURVEY_HISTORY
is a key only table that contains the links between the surveys i.e. is a hierarchy of surveys.
SURVEY table declared like this in SQL Server
SurveyId (PK)
... other columns
SURVEY_HISTORY table declared like this in SQL Server
ParentId (PK2, FK)
SurveyId (PK1, FK)
At this point the SURVEY domain class has two collections, one for each reference from SURVEY_HISTORY.
What do I need to do to implement this hierarchy correctly?
Regards
Craig
I've created a domain model from an existing database and have a validation error for a 'Bill-of-materials' construct. The error is "The MetaJoinTableAssociation SurveysHasSurveys1 can not be created. The foreign key column ParentId of the SURVEY_HISTORY join table points to the master and child tables at the same time" where ParentId is the parent survey id and SURVEY_HISTORY
is a key only table that contains the links between the surveys i.e. is a hierarchy of surveys.
SURVEY table declared like this in SQL Server
SurveyId (PK)
... other columns
SURVEY_HISTORY table declared like this in SQL Server
ParentId (PK2, FK)
SurveyId (PK1, FK)
At this point the SURVEY domain class has two collections, one for each reference from SURVEY_HISTORY.
What do I need to do to implement this hierarchy correctly?
Regards
Craig