2 posts, 0 answers
  1. Will Vandergrift
    Will Vandergrift avatar
    3 posts
    Member since:
    Mar 2010

    Posted 26 Jan 2011 Link to this post

    I'm in the process of converting a project over from another ORM to OpenAccess. The project is a WCF RIA Silverlight app that connects to a database that uses several join tables.

    The problem, that I'm running into, is how to expose properties that are related via join tables. I've attached an image that shows two tables that are associated in the database via a join table.

    I found documentation about the JoinTableAssociationAttribute but haven't been able to use it to expose a ProcessStandards property in my class.

    private IList<ProcessStandard> processStandards = new List<ProcessStandard>();
    [JoinTableAssociation(TableName = "LessonProcessStandards", OwnerColumns = "ID", TargetColumns = "PSID")]
    public virtual IList<ProcessStandard> ProcessStandards
            return this.processStandards;

    I apologize if this is a simple problem, but so far I've been unable to figure it out browsing through the forums or documentation. Thanks for the help.

  2. PetarP
    PetarP avatar
    754 posts

    Posted 27 Jan 2011 Link to this post

    Hi Will Vandergrift,

     WCF RIA data services does not support Many-to-Many relationships out of the box. This is not a limitation that is implied by us but by RIA data services itself.
    The only possibility as for now is to reverse map your join table and use it as a real entity. This way you will be able to do a 1:N associations from your two other entities to the join table itself.

    All the best,
    the Telerik team
    Accelerate your learning with industry's first Telerik OpenAccess ORM SDK. Download today.
  3. DevCraft banner
Back to Top