More in this section

Forums / General Discussions / OpenAccess does not obey database table name in App.config?

OpenAccess does not obey database table name in App.config?

2 posts, 1 answered
  1. bemara57
    bemara57 avatar
    135 posts
    27 Mar 2008
    02 Feb 2011
    Link to this post
    I am trying to copy the Products Module sample and tried using the naming convention of the database table in the App.config, but it seems to ignore what I put in there and always uses the model class name. Below is my App.config:

    <?xml version="1.0"?>
            <section name="openaccess" type="Telerik.OpenAccess.Config.ConfigSectionHandler, Telerik.OpenAccess.Config, Version=, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342" requirePermission="false"/>
        <openaccess xmlns="">
                <connection id="DatabaseConnection1">
                <backendconfiguration id="mssqlConfiguration" backend="mssql">
            <mappings current="mssqlMapping">
                <mapping id="mssqlMapping">
                    <namespace name="MyNamespace.Modules.Mytest.Model">
                        <class name="MytestItem">
                            <extension key="db-table-name" value="sfex_mytest_item" />
                            <field name="permissions">
                                    <extension key="db-link-table" />
                            <field name="urls">
                                    <extension key="inverse" value="parent" />
                                    <extension key="managed" value="true" />
                            <field name="permissionChildren">
                                    <extension key="db-link-table" />
                        <class name="MytestItemUrlData">
                            <!--<extension key="db-table-name" value="sfex_mytest_urls" />-->
                            <field name="parent">
                                <extension key="db-ref" value="Telerik.Sitefinity.GenericContent.Model.Content.contentId">
                                    <extension key="db-column">
                                        <extension key="db-column-name" value="content_id" />
            <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>

    How come it is not obeying this: <extension key="db-table-name" value="sfex_mytest_item" />? It is creating the table as "mytest_item" instead.
  2. Nikolay Datchev
    Nikolay Datchev avatar
    87 posts
    01 Nov 2016
    02 Feb 2011
    Link to this post
    Hi bemara57,

    Is your app.config file an embedded resource. It might be the case that the config  is not considered at all if it is not embedded into the project. 

    Kind regards,
    Nikolay Datchev
    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
2 posts, 1 answered