This is a migrated thread and some comments may be shown as answers.

Forward Mapping DB Layout

1 Answer 65 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
David Hufford
Top achievements
Rank 1
David Hufford asked on 29 Jun 2009, 04:01 AM
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?

1 Answer, 1 is accepted

Sort by
0
Ady
Telerik team
answered on 03 Jul 2009, 10:20 AM
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.
Tags
General Discussions
Asked by
David Hufford
Top achievements
Rank 1
Answers by
Ady
Telerik team
Share this question
or