Problem with schema forcing using Oracle

Posts   
 
    
Lo1977
User
Posts: 2
Joined: 19-Jul-2005
# Posted on: 19-Jul-2005 19:08:14   

Hi,

I have a problem when forcing another schema in version 1.0.2004.2.

The Oracle schema in production is not the same as the development one, so I force the schema in the app.config using :

<add key="SchemaNameUsageSetting" value="1"/> <add key="SchemaNameToUse" value="MyProductionSchema" />

I works fine but when I want to save a new entity containing an Identity field, I get an error "Sequence not found" in my production environment.

When looking in the class PersistenceInfoFactory, it appears that the PersistenceInfoBucket is created with the schema hard-coded for the sequence. For example :

private static PersistenceInfoBucket CreateENG_JOBPARAMSEntityBucket() { PersistenceInfoBucket toReturn = new PersistenceInfoBucket(); toReturn.AddFieldPersistenceInfo("PAR_OID", new FieldPersistenceInfo(@"PRCDSK", "ENG_JOBPARAMS", "PAR_OID", false, (int)OracleDbType.Decimal, 22, 0, 10, true, "PRCDSK.SEQ_ENG_PARAM")); toReturn.AddFieldPersistenceInfo("JOB_OID", new FieldPersistenceInfo(@"PRCDSK", "ENG_JOBPARAMS", "JOB_OID", true, (int)OracleDbType.Decimal, 22, 0, 10, false, "")); toReturn.AddFieldPersistenceInfo("PAR_NAME", new FieldPersistenceInfo(@"PRCDSK", "ENG_JOBPARAMS", "PAR_NAME", false, (int)OracleDbType.Varchar2, 50, 0, 0, false, "")); toReturn.AddFieldPersistenceInfo("PAR_VALUE", new FieldPersistenceInfo(@"PRCDSK", "ENG_JOBPARAMS", "PAR_VALUE", false, (int)OracleDbType.Varchar2, 2000, 0, 0, false, ""));

return toReturn;

}

Is it a bug ? In previous version, the schema was not hard-coded. Is it possible to have a fix ?

Thanks a lot.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39898
Joined: 17-Aug-2003
# Posted on: 20-Jul-2005 12:10:37   

Will check it out.

(edit): reproduced. Working on fix.

(edit): ok, I fixed it. I now have to propagate it across the oracle daaAdapter.template files, and upload the fix. Stay tuned.

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39898
Joined: 17-Aug-2003
# Posted on: 20-Jul-2005 13:31:30   

A fix is now available: new runtimes and new templates. 1) be sure to download them both, as the templates need the new runtimes 2) be sure to re-generate your code with the new templates 3) be sure to use the new runtimes in production.

Frans Bouma | Lead developer LLBLGen Pro
Lo1977
User
Posts: 2
Joined: 19-Jul-2005
# Posted on: 21-Jul-2005 11:29:18   

Ok it works.

Thanks a lot for your quick reaction !

Have a nice day.