Reputation: 37
I don´t know the answer for this question.
With MSSQLSERVER and MYSQL the next configuration runs very well but with Oracle don´t.
With Oracle appear like this
Cargo c = new Cargo(); c.Idcargo = 1;
With MSSQL AND MYSQL
c.IdCargo = 1;
How to configure the connection with Oracle to appear "IdCargo" and not "Idcargo". ??
THE CONFIGURATION:
<providers>
<clear/>
<add name="oracle" type="SubSonic.oracleDataProvider, SubSonic"
connectionStringName="oracle"
fixDatabaseObjectCasing="true"
regexDictionaryReplace="Empresaendereco,EmpresaEndereco;Empresacontato,EmpresaContato;Franqueadoendereco,FranqueadoEndereco;Franqueadocontato,FranqueadoContato;Funcionarioacesso,FuncionarioAcesso;Funcionarioendereco,FuncionarioEndereco;Funcionariocontato,FuncionarioContato;Clienteendereco,ClienteEndereco;Clientecontato,ClienteContato;Clientehistorico,ClienteHistorico;Agendastatus,AgendaStatus;Historicostatus,HistoricoStatus"
generateRelatedTablesAsProperties="true"
fixPluralClassNames="false"
generatedNamespace="ModeloDados"
regexIgnoreCase="false"
removeUnderscores="false"
setPropertyDefaultsFromDatabase="true"
generateNullableProperties="true"
useExtendedProperties="true" useUtc="true"/>
</providers>
Upvotes: 0
Views: 401
Reputation: 8677
As runxc1 says Oracle does not respect case for column/table names, your regexdictionaryreplace config is, I imagine, hiding the issue for tables. You can force oracle to be case sensitive in your db creation scripts by surrounding table/column names with quotes however I believe that has it's own drawbacks:
http://www.dbforums.com/oracle/1005513-column-name-any-convention.html#post3705627 http://oracle.ittoolbox.com/groups/technical-functional/oracle-apps-l/column-name-case-771715
Since you are having the same problem with MySql I would suggest you move to using underscores (once again as runxc1 says) for your db table/column naming conventions then you can remove the regexdictionaryreplace completely.
Upvotes: 0
Reputation: 8233
Valmir, What does the definition of your Cargo Table look like? I am betting that your error is coming from Oracle and not SubSonic if your definition looks something like this
Create Table Cargo(
ldCargo Decimal(12,0) )
Than your property in subsonic will not come across as ldCargo. This is due to the fact that Oracle stores all of the column names and table names as upper case. You would need to change ldCargo to ld_cargo if you would like to have it come across in SubSonic as camel case (SubSonic will remove the "_" for you)
Upvotes: 1