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

Help with reverse mapping wizard

3 Answers 90 Views
Getting Started
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Paul
Top achievements
Rank 1
Paul asked on 14 May 2009, 09:59 AM
Hi,
    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..

Thanks 



3 Answers, 1 is accepted

Sort by
0
Zoran
Telerik team
answered on 14 May 2009, 11:52 AM
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.

Greetings,
Zoran
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.
0
Jim
Top achievements
Rank 1
answered on 01 May 2010, 08:06 PM
It would be nice if the reverse mapping wizard could figure out the primary keys of views.
0
Zoran
Telerik team
answered on 05 May 2010, 12:55 PM
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.

Greetings,
Zoran
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.
Tags
Getting Started
Asked by
Paul
Top achievements
Rank 1
Answers by
Zoran
Telerik team
Jim
Top achievements
Rank 1
Share this question
or