Function imports for entity framework with odp.net managed driver -
i switched odp unmanaged odp managed (in conjunction entity framework). unmanaged drivers working fine after adding necessary information in web.config section. add stored procedures , generate complex types using function import - column information (i'm trying import stored procedure out refcursor parameter). after switch config section updated reflect new format , works @ runtime (so format correct).
however when try generate complex types again (or add new function import) system.notsupportedexception message: specified type not supported selector)
without indication type/selector (obviously)...
google has turned nothing , thread on oracle forums has gathered no response well.
versions: odp.net (odac) : v12.1 (production release; dll v4.121.1.0) ef v5 .net v4.5 config file (trimmed bit):
<configsections> <section name="oracle.manageddataaccess.client" type="oracleinternal.common.odpmsectionhandler, oracle.manageddataaccess"/> </configsections> <oracle.manageddataaccess.client> <version number="*"> <edmmappings> <edmmapping datatype="number"> <add name="bool" precision="1"/> <add name="byte" precision="2" /> <add name="int16" precision="5" /> <add name="int32" precision="10" /> <add name="int64" precision="38" /> </edmmapping> </edmmappings> <implicitrefcursor> <storedprocedure schema="ecom" name="shp_api_orders.create_order"> <refcursor name="o_rs"> <bindinfo mode="output"/> <metadata columnordinal="0" columnname="col1" nativedatatype="number" providertype="decimal" allowdbnull="false" numericprecision="10" numericscale="0" /> <metadata columnordinal="1" columnname="col2" nativedatatype="date" providertype="date" allowdbnull="true" /> <metadata columnordinal="2" columnname="col3" nativedatatype="varchar2" providertype="varchar2" allowdbnull="false" columnsize="10" /> </refcursor> </storedprocedure> </implicitrefcursor> </version> </oracle.manageddataaccess.client> <entityframework> <defaultconnectionfactory type="system.data.entity.infrastructure.sqlconnectionfactory, entityframework" /> </entityframework> <system.data> <dbproviderfactories> <remove invariant="oracle.manageddataaccess.client" /> <add name="odp.net, managed driver" invariant="oracle.manageddataaccess.client" description="oracle data provider .net, managed driver" type="oracle.manageddataaccess.client.oracleclientfactory, oracle.manageddataaccess, version=4.121.1.0, culture=neutral, publickeytoken=89b483f429c47342" /> </dbproviderfactories> </system.data>
the implicit ref cursor config file format different between unmanaged odp.net , managed odp.net. might part of problem.
to save pulling hair out, install latest oracle developer tools visual studio (odt) , use new feature automatically generates config:
1) install odt 12.1 if haven't already
2) find stored procedure in server explorer, right click , run it, , enter input parameters.
3) output ref cursor represents return value entity function, choose "add config" checkbox.
4) select either "show config" (and cut , paste) or "add config".
here screenshot of talking about:
http://i.imgur.com/t1bfmup.gif
if doesn't fix problem, play around boolean mapping. not 100% sure of of writing, remember hearing support booleans difference between managed , unmanaged odp.net. i'm sure it's buried in release notes or doc somewhere.
christian shay
oracle
Comments
Post a Comment