Cannot setup up constraint (MS SQL)

3 posts, 0 answers
  1. Rob Hedgpeth
    Rob Hedgpeth avatar
    7 posts
    Member since:
    May 2011

    Posted 17 Jun 2011 Link to this post

    I have deleted all constraints from my database tables in order to alleviate some issues with an SSIS solution I am using. Because of this when I updated my .rlinq file from the database all of my constraints were removed (as expected). 

    I now want to add them back only to the object mapper. However, I am running into a problem where the field that I need to use as a foreign key is not included in the correct drop down list of fields. There seems to be something happening behind the scenes that is trying to auto-assign the relationships. Why is this, and how can I get around it?

    Constraint Editor Screen Shot

    From this screen shot you can see that the "Constraint Editor" is trying to assume certain connections. This would be fine if because "PatientID" exists in the second drop down list under the "Source Table" that it is excluded from the first drop down list, making it impossible to associate "PatientID" with the "ID" field (which cannot be changed in the form) under the "Target Table".

    So to wrap all of that up...

    All I need to do is associate "PatientID" (Source Table) with "ID" (Target Table). Am I missing something obvious here?


  2. Zoran
    Zoran avatar
    534 posts

    Posted 21 Jun 2011 Link to this post

    Hi Rob Hedgpeth,

     If you would like to create associations between your classes in the object model, you should create them using the associations tool from the toolbox. It is started automatically when you drag an association from class A to class B. Creating the constraints in your object model has no value if you do not want to have constraints in your database.

    I did give you the same answer in your support ticket but I am putting it here as well for anyone in the community that has the same concerns.

    the Telerik team
    Q1’11 SP1 of Telerik OpenAccess is available for download; also available is the Q2'11 Roadmap for Telerik OpenAccess ORM.
  3. DevCraft banner
  4. Rob Hedgpeth
    Rob Hedgpeth avatar
    7 posts
    Member since:
    May 2011

    Posted 22 Jun 2011 Link to this post

    Thanks, Zoran. Much appreciated!
Back to Top