Oracle + ModificationFunctionMapping

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
McpGza
Posts: 3
Joined: Thu 29 Jan 2009 09:37

Oracle + ModificationFunctionMapping

Post by McpGza » Thu 29 Jan 2009 12:07

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.

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Thu 29 Jan 2009 12:36

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

        
          
          
          
        

McpGza
Posts: 3
Joined: Thu 29 Jan 2009 09:37

Post by McpGza » Thu 29 Jan 2009 12:45

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?

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Thu 29 Jan 2009 13:45

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.

McpGza
Posts: 3
Joined: Thu 29 Jan 2009 09:37

Post by McpGza » Thu 29 Jan 2009 13:54

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

andregur
Posts: 1
Joined: Fri 13 Mar 2009 12:53

Oracle + ModificationFunctionMapping

Post by andregur » Fri 13 Mar 2009 14:00

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.

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Mon 16 Mar 2009 07:38

We have sent you a workaround.

Ido Flatow
Posts: 8
Joined: Tue 21 Apr 2009 07:50

I also need information about the workaround

Post by Ido Flatow » Tue 21 Apr 2009 14:52

AndreyR wrote:We have sent you a workaround.
Can you please publish an article that describe how to do it?

Thanks,
Ido.

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Wed 22 Apr 2009 09:01

We have sent you a workaround.

Ido Flatow
Posts: 8
Joined: Tue 21 Apr 2009 07:50

RAW for storage and Binary for conceptual is problematic

Post by Ido Flatow » Thu 23 Apr 2009 10:30

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.

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Thu 23 Apr 2009 11:05

Thank you for the report, we are investigating the problem.
I will let you know about the results.

ToxicAtom
Posts: 1
Joined: Wed 06 May 2009 08:27

Post by ToxicAtom » Wed 06 May 2009 09:18

Is it possible to see the work around please?

Thank you

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Wed 06 May 2009 11:21

We have sent you the workaround.

ies
Posts: 26
Joined: Thu 26 Feb 2009 08:10

Post by ies » Tue 12 May 2009 14:51

i want to see the work around too, can you send to me please?

thanks,
________
Peter Sutcliffe (Race Driver)
Last edited by ies on Thu 24 Feb 2011 06:05, edited 1 time in total.

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Wed 13 May 2009 06:46

We have sent you the workaround too.

Post Reply