Schema name overwrite with OracleODP.NET does not work for stored procedures

Posts   
 
    
bernhard
User
Posts: 34
Joined: 15-Jan-2007
# Posted on: 22-Aug-2012 09:38:24   

Hello

Has the bug described in the link below been fixed for the OracleODP.NET? http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=20022 I am using the SD.LLBLGen.Pro.DQE.OracleODP.NET20.dll Version 3.5.12.0317

When i only add the following line to my app.config it does not work. When call a stored procedure i get an error message and i see that LLGLGen tried to call the procedure on the schema OldSchema, so the schema override does not work for stored procedures for me.

<oracleSchemaNameOverwrites>
    <add key="OldSchema" value="NewSchema" />
</oracleSchemaNameOverwrites>

It works find when i configure it like this (added an extra ' ):

<oracleSchemaNameOverwrites>
    <add key="OldSchema" value="NewSchema" />
    <add key='"OldSchema"' value="NewSchema" />
</oracleSchemaNameOverwrites>

Thanks for any help

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39910
Joined: 17-Aug-2003
# Posted on: 22-Aug-2012 11:11:17   

please update to the latest build first.

Frans Bouma | Lead developer LLBLGen Pro
bernhard
User
Posts: 34
Joined: 15-Jan-2007
# Posted on: 22-Aug-2012 11:32:33   

Hi Otis

But the Version 3.5.12.0317 is the lasted build or not? I installed the LLBLGen Pro v3.5 build from August 8th, 2012.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39910
Joined: 17-Aug-2003
# Posted on: 22-Aug-2012 14:02:46   

Oh my bad, I mis-read your post, I thought you were referring to ormsupportclasses from march 17th.

yes that code was merged into v3.5's.

You see the problem only with proc calls not with entity fetches? Also, the procs you're calling which fail, are these in packages ? (so names have an extra '.') ? the proc calls are calls generated by the code generator or formulated by hand ? (some people do that, not using wrapper quotes).

Frans Bouma | Lead developer LLBLGen Pro
bernhard
User
Posts: 34
Joined: 15-Jan-2007
# Posted on: 22-Aug-2012 14:08:46   

Yes i only have this problem with the stored procedures i call, the entity fetches work fine.

This is the generated code for the stored prodecure which i call.

private static StoredProcedureCall CreateSysDtgetsysdateCall(IDataAccessCore dataAccessProvider, System.DateTime returnValue)
{
  return new StoredProcedureCall(dataAccessProvider, "\"OLD_SCHEMA\".\"PA_SYS.DTGETSYSDATE\"", "SysDtgetsysdate")
    .AddParameter("RETURN_VALUE", "Date", 0, ParameterDirection.ReturnValue, true, 0, 0, returnValue);
}
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39910
Joined: 17-Aug-2003
# Posted on: 23-Aug-2012 09:11:19   

We'll look into it.

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39910
Joined: 17-Aug-2003
# Posted on: 23-Aug-2012 09:54:48   

in-code overwrites work: adapter.SchemaNameOverwrites("OldSchema", "NewSchema");

Looking into the config overwrites...

(edit) config overwrites are ignored indeed. Looks like a " strip problem. Looking into it.

(edit) works in v3.1. We changed some code in v3.5 to make it more streamlined, apparently the issue wasn't solved in v3.5.

(edit) Found it. We will remove the cause of the error by refactoring some code so it will take till this afternoon (CET) before we have a fix for you.

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39910
Joined: 17-Aug-2003
# Posted on: 23-Aug-2012 10:56:11   

Fixed. See attached dll. This should fix the problem (also on DB2). Oracle and DB2 are affected, the other databases don't have this issue.

Refactoring has to wait till v4, as it crosses assembly boundaries, and will therefore be a breaking change if you update just 1 of the assemblies.

Attachments
Filename File size Added on Approval
SD.LLBLGen.Pro.ORMSupportClasses.NET20.zip 249,488 23-Aug-2012 10:56.20 Approved
Frans Bouma | Lead developer LLBLGen Pro
bernhard
User
Posts: 34
Joined: 15-Jan-2007
# Posted on: 23-Aug-2012 12:04:24   

Thank you for your help and the quick fix, it works fine now