ArgumentException: ResourceAssociationSet

2 posts, 0 answers
  1. Praveen
    Praveen avatar
    9 posts
    Member since:
    Oct 2007

    Posted 09 Apr 2013 Link to this post

    When trying to access a type which is self-referential, we get this error, but we don't know why or how to fix it.

    "System.ArgumentException: The ends of a ResourceAssociationSet cannot both have the same ResourceType and ResourceProperty values. If this is a self-referencing association, the ResourceAssociationSet must be unidirectional with the ResourceProperty on one of the ends set to null."

    Any ideas?
  2. Viktor Zhivkov
    Viktor Zhivkov avatar
    290 posts

    Posted 10 Apr 2013 Link to this post

    Hi Praveen,

    Thank you for your feedback.
    There is indeed a bug in our way of handling self-references when both ends of the association have properties.
    I have updated the OpenAccessMetadataProvider to handle properly this situation and you can find the new version of the file attached.
    You can copy the fixed template over the original ones in
    // for C# and Visual Studio 2012
    C:\Program Files\Telerik\OpenAccess ORM\dsl2012\Extensibility\Dsw\Templates\CSharp\DataServices
    // or for VB and Visual Studio 2012
    C:\Program Files\Telerik\OpenAccess ORM\dsl2012\Extensibility\Dsw\Templates\VisualBasic\DataServices

    If you are using Visual Studio 2010 please change dsl2012 to dsl2010.
    If you are part of a team that actively uses Add OpenAccess Service wizard, please distribute the new code file to all team mates.

    I am sorry for the inconvenience. I have also added 500 Telerik point for reporting a new bug in our product.

    Viktor Zhivkov
    the Telerik team
    Using Encrypted Connection Strings with Telerik OpenAccess ORM. Read our latest blog article >>
  3. DevCraft banner
Back to Top