Table Mapping

Thread is closed for posting
2 posts, 0 answers
  1. Helen
    Helen avatar
    101 posts
    Member since:
    Nov 2008

    Posted 09 Jun 2012 Link to this post

    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?


  2. Viktor Zhivkov
    Viktor Zhivkov avatar
    324 posts

    Posted 12 Jun 2012 Link to this post

    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!
Back to Top