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

Table Mapping

1 Answer 58 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Helen
Top achievements
Rank 2
Helen asked on 09 Jun 2012, 09:50 PM
I have a really simple question.

I have generated a Model.rlinq file from my database. I would like to rename some of the tables in it to be different from the table names in the database. However, if I do that with the "Edit Table" menu item, will it still map to the correct database table, or do I have to do something else to ensure that the newly-named table will still map to the original database table?

TIA

Helen

1 Answer, 1 is accepted

Sort by
0
Viktor Zhivkov
Telerik team
answered on 12 Jun 2012, 02:59 PM
Hi Helen,

OpenAccess has two levels of abstraction when working with our domain model.
The conceptual level works with Entity types that can/should map to tables on relation level.
You can freely rename Entity types using our visual designer (by selecting an Entity and editing its properties) or Batch Operations dialog (very useful for bulk renames) without affecting the mapping between the entity type and the underlying relational database.
If you really need to rename the relational table from the OpenAccess designer you should do the same with the database using an approach similar to the one described in the "Pushing Domain Model Changes to the Database" section of this article. Otherwise you will get runtime exceptions that a table is missing from the database.

If you have any other questions, please do not hesitate to post them here in the forum or in our support system.

All the best,
Viktor Zhivkov
the Telerik team
Follow @OpenAccessORM Twitter channel to be the first one to get the latest updates on new releases, tips and tricks and sneak peeks at our product labs!
Tags
General Discussions
Asked by
Helen
Top achievements
Rank 2
Answers by
Viktor Zhivkov
Telerik team
Share this question
or