Help with reverse mapping wizard

Thread is closed for posting
4 posts, 0 answers
  1. Paul
    Paul avatar
    114 posts
    Member since:
    May 2009

    Posted 14 May 2009 Link to this post

        I already have a database schema in MySQL and am trying to use the reverse mapping wizard to make my classes. Due to the design of the schema it hard to work out what settings I need to use.

    I have a table called application which has a primary id column called applicationid and some other columns that contain info about that application.

    I also have a table called station which has a primary id column called stationid and then a column called stationname and have a table called User which has a primary id column called userid and then a column called username.

    I then have a table called applicationassignment which does not have a primary id column but has three columns called applicationid , stationid and userid.

    The reverse mapping wizard show this on the applicationassignment table

    //***Telerik OpenAccess - Reverse Engineering errors***

    #error No primary key fields specified.

    The table data would look something like this:-
    Application Table
    ApplicationId     ApplicationName     ApplicationPath
    1                       notepad                  C:\windows\notepad.exe

    Station Table
    StationId    StationName
    1                Test-01
    2                Test-02

    User Table
    UserId    Username
    1            Paul
    2            Peter

    ApplicationAssignment Table
    ApplicationId    StationId    UserId
    1                       1                0
    1                       0                2
    1                       2                0
    1                       0                1

    As you can see a record for each assignment, I know not plesant but stuck with it.

    To query the applicationassignment table I would join application,station and user. What would I need to set on the reverse mapping wizard so that it will not display the error. I.e class, collection etc..


  2. Zoran
    Zoran avatar
    534 posts

    Posted 14 May 2009 Link to this post

    Hello Paul,

    OpenAccess does not support mapping for tables that do not contain a primary key identity. Just set a primary key column(s) for your applicationassignment table and everything should work fine from that point on.

    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.
  3. Jim
    Jim avatar
    52 posts
    Member since:
    Sep 2012

    Posted 01 May 2010 Link to this post

    It would be nice if the reverse mapping wizard could figure out the primary keys of views.
  4. Zoran
    Zoran avatar
    534 posts

    Posted 05 May 2010 Link to this post

    Hello James,

     This is not possible at the moment and it is not planned as a functionality of the Reverse Mapping Wizard for now. Nevertheless our team is thinking into this direction for the new Visual Designer that is part of the product since the latest Q1 2010 release.

    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top