Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / OpenAccess ORM > OpenAccess ORM Free Edition > 'Bill-of-Materials' generated validation error

Not answered 'Bill-of-Materials' generated validation error

Feed from this thread
  • Craig avatar

    Posted on Nov 15, 2011 (permalink)

    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

    Reply

  • Alexander Alexander admin's avatar

    Posted on Nov 15, 2011 (permalink)

    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. 

    Reply

  • Craig avatar

    Posted on Nov 15, 2011 (permalink)

    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

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / OpenAccess ORM > OpenAccess ORM Free Edition > 'Bill-of-Materials' generated validation error