'Bill-of-Materials' generated validation error

3 posts, 0 answers
  1. Craig
    Craig avatar
    112 posts
    Member since:
    Nov 2011

    Posted 15 Nov 2011 Link to this post

    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

  2. Alexander
    Admin
    Alexander avatar
    727 posts

    Posted 15 Nov 2011 Link to this post

    Hello Craig,

    This problem has been fixed and the fix will be part of the Q3 release, expected later this week. 

    However, you should be able to fix the error even now, without upgrading to the new version. Just double-click on the association to open the Association Editor and correct the mapping between the columns of the two tables, probably at the moment the ParentId column is used for a second time, instead of the SurveyId column.
    After saving the changes the error should go away. I hope that helps.

    Kind regards,
    Alexander
    the Telerik team
    Want to use Telerik OpenAccess with SQL Azure? Download the trial version today. 
  3. DevCraft banner
  4. Craig
    Craig avatar
    112 posts
    Member since:
    Nov 2011

    Posted 15 Nov 2011 Link to this post

    Thanks Alexander,
    I thought it would be something simple.
    Added association table back in to get access to the column names and error resolved.

    Regards
    Craig
Back to Top