Page 1 of 2

Oracle + ModificationFunctionMapping

Posted: Thu 29 Jan 2009 12:07
by McpGza
Can you provide a small example for modification (eg. insert) stored procedure mapping?

How the insert stored procedure sholud look like? Hogy the msl mapping and ssdl sholud look like?

Please show an example.

Posted: Thu 29 Jan 2009 12:36
by AndreyR
Here is a simple example.
Stored procedure Dept_Insert looks like:

Code: Select all

CREATE OR REPLACE PROCEDURE SCOTT.Dept_Insert (
	Pdeptno NUMBER,
	Pdname VARCHAR, 
	Ploc VARCHAR )
IS 
BEGIN
	INSERT INTO Dept(Deptno, Dname, Loc) VALUES (Pdeptno, Pdname, Ploc);
END;
The Modification Function Mapping looks like:

Code: Select all

              
                
                  
                  
                  
...
              
The SSDL part looks like:

Code: Select all

        
          
          
          
        

Posted: Thu 29 Jan 2009 12:45
by McpGza
AndreyR wrote:Here is a simple example.
Stored procedure Dept_Insert looks like:
...
Thank you, but the insert needs result binding for server generated indentity columns. I dont see the result binding in your example, how it works?

Posted: Thu 29 Jan 2009 13:45
by AndreyR
There is no easy way to handle such situation.
I have sent an email with some hints to the address you provided in your profile.

Posted: Thu 29 Jan 2009 13:54
by McpGza
AndreyR wrote:There is no easy way to handle such situation.
Yes, we noticed there is no easy way :)

Thank you for very fast response, we will try your suggestion soon.
Regards,
Geza

Oracle + ModificationFunctionMapping

Posted: Fri 13 Mar 2009 14:00
by andregur
Please publish information about result binding for server generated indentity columns from insert stored procedure.
I think that such information is necessary for many developers.

Posted: Mon 16 Mar 2009 07:38
by AndreyR
We have sent you a workaround.

I also need information about the workaround

Posted: Tue 21 Apr 2009 14:52
by Ido Flatow
AndreyR wrote:We have sent you a workaround.
Can you please publish an article that describe how to do it?

Thanks,
Ido.

Posted: Wed 22 Apr 2009 09:01
by AndreyR
We have sent you a workaround.

RAW for storage and Binary for conceptual is problematic

Posted: Thu 23 Apr 2009 10:30
by Ido Flatow
When you create an eager load with .Include() on more than one entity, the generated query creates a sql part to select null values, and because it created TO_BLOB(NULL) parts instead of HEXTORAW(0) part and this causes exceptions because the union statement tries to union different types of columns.

I tried changing the conceptual type to GUID because I read somewhere that GUID is translated into RAW, but then I got an error message because the conceptual field of the GUID cannot be mapped to a function parameter of type REF CURSOR.

Any workaround for this problem?

Ido.

Posted: Thu 23 Apr 2009 11:05
by AndreyR
Thank you for the report, we are investigating the problem.
I will let you know about the results.

Posted: Wed 06 May 2009 09:18
by ToxicAtom
Is it possible to see the work around please?

Thank you

Posted: Wed 06 May 2009 11:21
by AndreyR
We have sent you the workaround.

Posted: Tue 12 May 2009 14:51
by ies
i want to see the work around too, can you send to me please?

thanks,
________
Peter Sutcliffe (Race Driver)

Posted: Wed 13 May 2009 06:46
by AndreyR
We have sent you the workaround too.