Page 1 of 1

Oracle type mapping

Posted: Tue 17 Apr 2012 11:50
by KLGregor
I have two types in my oracle database:

Code: Select all

CREATE OR REPLACE TYPE "R_FLOAT_LIST" AS OBJECT
(
  val FLOAT
)
and

Code: Select all

CREATE OR REPLACE TYPE "T_FLOAT_LIST" AS TABLE OF R_FLOAT_LIST
And I have a function

Code: Select all

  FUNCTION TEST(P_QTY INTEGER) RETURN T_FLOAT_LIST IS
    RESULT T_FLOAT_LIST := T_FLOAT_LIST();
  BEGIN
    SELECT R_FLOAT_LIST(LEVEL)
    BULK COLLECT INTO RESULT
    FROM DUAL
    CONNECT BY LEVEL <= P_QTY;
    
    RETURN(RESULT);
  END;
When I am trying to add it to my Entity Model I am getting an error “Cannot create method for storage function ‘TEST’ than can be composed. Only stored procedures may be mapped.”
When I am trying to add it a storage model I get an error «The Type TABLE is not qualified with a namespace or alias. Only PrimitiveTypes can be used without qualification.»
How can I map my function and my type into the Entity Model?

Posted: Thu 19 Apr 2012 15:16
by Shalex
KLGregor wrote:How can I map my function and my type into the Entity Model?
There is no way because it returns non-primitive Oracle type. Non-primitive types are not supported in Entity Framework. But you can reconstruct your function to return Oracle cursor as it is described at our blog: http://www.devart.com/blogs/dotconnect/ ... rsors.html.