Forward Mapping DB Layout

Thread is closed for posting
2 posts, 0 answers
  1. David Hufford
    David Hufford avatar
    9 posts
    Member since:
    Jun 2009

    Posted 28 Jun 2009 Link to this post

    Hi,
    Suppose I have an M:N relationship between Item1 and Item2, each with an ID property of type GUID.  Using the forward mapping wizard will generate:

    Key - Item1ID - GUID
    Key - seq - int
    Item2ID - GUID

    Since this is an M:N relationship, I would like to have it as:
    Key - Item1ID
    Key - Item2ID
     and then a sequence or timestamp or version stamp.

    Is this possible?  What is the advantage to doing it the first way?  If you know you are going to be looking up info from both sides of the M:N, then why not index them both?
  2. Ady
    Admin
    Ady avatar
    589 posts

    Posted 03 Jul 2009 Link to this post

    Hello David ,
     
     The advantage of having the sequence is that the order of instances in the collection is maintained. You can uncheck the 'Preserve order' checkbox on the collection field mapping and OA will create a PK on the 2 ID columns.

    Regards,
    Ady
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top