Runtime Schema Changes

3 posts, 0 answers
  1. Murray
    Murray avatar
    13 posts
    Member since:
    Jul 2010

    Posted 16 Aug 2011 Link to this post

    Hi 

    I would like to utilise ORM for the ability to make runtime schema changes.

    I am just having issues finding the appropriate documentation on this feature.

    Do you have any example projects that show this working ( ie add a table / and or columns to database at runtime)

    And also what is the recommended way to utilise these features. is it the Fluent API?

    Thanks

    Murray
  2. Murray
    Murray avatar
    13 posts
    Member since:
    Jul 2010

    Posted 16 Aug 2011 Link to this post

    Ah I did find the documentation

    http://www.telerik.com/help/openaccess-orm/openaccess-tasks-howto-use-artificial-fields.html


    My question then would be is there a way built into OpenAccess to make the changes to the database for you after you update the xml?

    Or is this something that has to be handled externally to OpenAccess?

  3. DevCraft banner
  4. Nikola
    Admin
    Nikola avatar
    27 posts

    Posted 18 Aug 2011 Link to this post

    Hello Murray,

    The OpenAccess API contains methods for generating and executing DDL scripts based on the OpenAccess metadata. I have prepared several links for your convenience.

    1. You can have a look here here for an overview of utilizing artificial types/properties by using the Fluent Mapping API.
    2. You should check the Artificial Types part in particular because it contains example code regarding executing a DDL script based on artificial types and properties.
    3. Finally if you need more information you can check the OpenAccess API reference following this link.

    Choosing between the Fluent API and XML editing approach is up to you. I personally would go with the Fluent API because I believe it makes things simple and obvious.

    Hope that helps and have a nice day.

    Greetings,
    Nikola
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

Back to Top