Mapping SP return data

Mapping SP return data

Postby i.kopcanski » Thu 26 Aug 2010 15:39

Hello,

We have a stored procedure named 'dynamicpicklist' in Oracle database with simple latest statement in it's code:

execute immediate 'select * from v2_dynamic_picklist';

In Oracle EF model we have v2_dynamic_picklist working entity.
We know it's working one since with LINQ statements it's possible to retrieve data from that table.
We made function import of 'dynamicpicklist' stored procedure and mapped it's result set
to v2_dynamic_picklist entites collection. Despite the fact that the stored procedure is properly
executed via EF generated code, we recieve the following exception:

The data reader is incompatible with the specified 'OnGuard.DCMS.Model.DisplayTemplate.v2_dynamic_picklist'.
A member of the type, 'id', does not have a corresponding column in the data reader with the same name."} System.Data.EntityCommandExecutionException

Is it possible to configure Oracle EF model or at least re-write the Oracle stored procedure differently
so this exception does not occure anymore?
i.kopcanski
 
Posts: 7
Joined: Mon 09 Nov 2009 17:36

Postby Shalex » Mon 30 Aug 2010 10:55

Please make sure that the name of the 'id' property from the CSDL part of your model is the same as the name of the corresponding column in the table you are working with (does the 'v2_dynamic_picklist' table have the 'id' column? If not, edit your CSDL with XML Editor).

Also please refer to http://www.devart.com/blogs/dotconnect/?p=5#sp (drag&drop the Dept table to the designer surface of Entity Developer to be able to set the return type of the GetDeptProc method to the Dept class).

If the problem persists, please send us a test project with your model and DDL to reproduce the issue in our environment. Your current version of dotConnect for Oracle is 5.70.152, isn't it?
Shalex
Devart Team
 
Posts: 7781
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for Oracle