Is it possible to change the default behaviour of OpenAccess mapping?

2 posts, 0 answers
  1. Chau Cheng
    Chau Cheng avatar
    1 posts
    Member since:
    Jun 2008

    Posted 09 Dec 2009 Link to this post

    What I am saying is, when doing forward mapping, I want :

    1. System.String automatically map to NVARCHAR, 

    2. The DB Table  Name and Column Name automatically use my Class Name and Property Name (not the private field name).

    Going the mapping designer UI to tweak everything manually is a bit tedious for huge schema.
  2. PetarP
    PetarP avatar
    754 posts

    Posted 11 Dec 2009 Link to this post

    Hello Chau Cheng,

     1. You can set the type mapping from the Backend configuration settings wizard. Navigate to Telerik -> OpenAccess -> Configuration->Backend configuration settings. At the bottom of the pop up window you will see a CLR Type Mapping setting. Click on the Collection and open the mapping screen. Set NVARCHAR for the SQL type of the System.String CLR type. Clicking ok will result in adding the following node to your app.config file:

          <backendconfiguration id="mssqlConfiguration" backend="mssql">

    2. Unfortunately this is not yet possible with Telerik OpenAccess ORM. The only workaround would be to manually rename your column names. We are terribly sorry for any inconvenience this might have caused.

    All the best,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. DevCraft banner
Back to Top