This is a migrated thread and some comments may be shown as answers.
SourceMultiplicity="One" problem?
2 Answers 28 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Kendall Bennett
Top achievements
Rank 2
Kendall Bennett asked on 15 Jul 2011, 09:08 PM
In my model, which was converted over from Entity Framework, many of the associations came over from Entity Framework as 1:Many associations in that it is expected that there would always be a reference to a particular entity. When I edit those associations in the visual designer, it always changes them to:

SourceMultiplicity="ZeroOne"

in the XML file, so they become 0-1:Many associations. There is no way to edit these values from the visual designer at all, so I get the impression that in reality every association is really a 0-1:Many in OpenAccess? How would an association ever get converted to a 1:Many association?

Also, related to this I noticed something annoying. Whenever I change the association it always renamed the backing fields for the properties involved in the endpoints. The properties themselves don't get renamed, but the backing fields do? For instance I might have a property called 'Products', and the backing field is '_Products' and then when I edit the association and save it, the backing field gets changed to '_Products1'. I know we never deal directly the backing fields, so the name is not that important, but it does cloud my change lists with a bunch of irrelevant changes in the XML file.

Is there any reason it cannot use the original name of the backing fields in this case?

2 Answers, 1 is accepted

Sort by
0
Zoran
Telerik team
answered on 20 Jul 2011, 05:08 PM
Hello Kendall Bennett,

 Unfortunately, at the moment 1:1 associations can not be modeled due to some restrictions in the OpenAccess runtime. For the moment you can workaround this issue looking into the single object that would be part of the collection on the n side of the association. Since we are getting more and more requests for this feature, we are evaluating the development required for it and we will schedule it for one of the next releases. At the moment we are preparing a KB article with a list of possible workarounds for different scenarios. 


I will give you an update in this forum thread after we have this KB uploaded.

Kind regards,
Zoran
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Kendall Bennett
Top achievements
Rank 2
answered on 20 Jul 2011, 09:56 PM
Ok thanks.
Tags
Design Time (Visual Designer & Tools)
Asked by
Kendall Bennett
Top achievements
Rank 2
Answers by
Zoran
Telerik team
Kendall Bennett
Top achievements
Rank 2
Share this question
or