views:

401

answers:

2

I was making tests with SubSonic with SQL Server and everything was fine.

I decided to install MySQL and made the same tests, but now I have a little problem

My table name is ClienteEndereco in SQL Server but when i make change in my web.config to work with MYSQL and recompile the program the table name comes Clienteendereco

SQL Server = Cliente**E**ndereco
MySql      = Cliente**e**ndereco

I tried to use regexIgnoreCase="true" but nothing happens.

Can anyone help to solve that? How to make subsonic "ignores case" in SQL Server and MySql?

Thank you.

  <add name="mssql" 
       type="SubSonic.SqlDataProvider, SubSonic" 
       connectionStringName="mssql" 
       fixPluralClassNames="false" 
       generatedNamespace="ModeloDados" 
       regexMatchExpression="A-Za-z" 
       regexIgnoreCase="true" 
       removeUnderscores="false" 
       setPropertyDefaultsFromDatabase="true" 
       generateNullableProperties="true" 
       useExtendedProperties="true" 
       useUtc="true"/>
A: 

As Pawel pointed out MySQL on Windows and OS X uses only lowercase names for tables by default. There is a configuration option that you can use to change this behaviour. The following blog posting gives a brief overview:

MySQL Case-sensitivity issues

Adam
A: 

I founded one way..I used the "regexDictionaryReplace" . This way work in mysql and mssql

  <add name="mysql" type="SubSonic.MySqlDataProvider, SubSonic"
             regexDictionaryReplace="Empresaendereco,EmpresaEndereco"
             fixDatabaseObjectCasing="true" connectionStringName="mysql"
             generateRelatedTablesAsProperties="true"
             fixPluralClassNames="false"
             generatedNamespace="ModeloDados"
             regexIgnoreCase="true"
             removeUnderscores="false"
             setPropertyDefaultsFromDatabase="true"
             generateNullableProperties="true"
             useExtendedProperties="true"
             useUtc="true" />

Thanks for all help!!!

Valmir