OpenAccess does not obey database table name in App.config?
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"
?>
<
configuration
>
<
configSections
>
<
section
name
=
"openaccess"
type
=
"Telerik.OpenAccess.Config.ConfigSectionHandler, Telerik.OpenAccess.Config, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342"
requirePermission
=
"false"
/>
</
configSections
>
<
openaccess
xmlns
=
"http://www.telerik.com/OpenAccess"
>
<
connections
>
<
connection
id
=
"DatabaseConnection1"
>
<
databasename
>Sitefinity4</
databasename
>
<
servername
>WIN-30EAUAH6HVM\SQLEXPRESS</
servername
>
<
integratedSecurity
>True</
integratedSecurity
>
<
backendconfigurationname
>mssqlConfiguration</
backendconfigurationname
>
</
connection
>
</
connections
>
<
backendconfigurations
>
<
backendconfiguration
id
=
"mssqlConfiguration"
backend
=
"mssql"
>
<
mappingname
>mssqlMapping</
mappingname
>
</
backendconfiguration
>
</
backendconfigurations
>
<
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"
>
<
collection
>
<
extension
key
=
"db-link-table"
/>
</
collection
>
</
field
>
<
field
name
=
"urls"
>
<
collection
>
<
extension
key
=
"inverse"
value
=
"parent"
/>
<
extension
key
=
"managed"
value
=
"true"
/>
</
collection
>
</
field
>
<
field
name
=
"permissionChildren"
>
<
collection
>
<
extension
key
=
"db-link-table"
/>
</
collection
>
</
field
>
</
class
>
<
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"
/>
</
extension
>
</
extension
>
</
field
>
</
class
>
</
namespace
>
</
mapping
>
</
mappings
>
</
openaccess
>
<
startup
>
<
supportedRuntime
version
=
"v4.0"
sku
=
".NETFramework,Version=v4.0"
/>
</
startup
>
</
configuration
>
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