Richard,
I thought i could get away with binding by name limitation by making
sure that all my procedures has a standard predetermined name for the
Ref Cursor variable, however the major roadblock for me  was that
NHibernate is generating parameter names newly and ignoring the ones
given in the mapping file. For example assuming i gave the following
as the sp call - { call GetUserById(:userid) } , and had the following
code - namedQuery.SetInt32("userid", 38), NHib will now generate a
parameter called p0 instead of what i gave in the mapping file. I am
looking in to see whether this can be bypassed but does not seem to be
an easy job.

I knew about the MS Oracle Provider being deprecated, and i was
already recommending ODP.NET for new projects, however the current one
i am working on is an existing application which already uses MS
Oracle Provider.

Regards
Dinesh

On Jan 22, 2:00 pm, "Richard Brown \(gmail\)"
<[email protected]> wrote:
> Hi Dinesh,
>
> That's great you've got it working.
>
> I had originally tried to get it working with both providers, but fell at a
> few hurdles early on with the Microsoft Oracle client.  In particular the
> parameters needing bound by name (having to match 'exactly' the name of the
> parameter to the stored procedure) was not something I could quickly get
> round, so I gave up.
>
> It's worth noting that (NHibernate aside) the future support might be better
> on the Oracle provided client over the Microsoft 
> one:http://reddevnews.com/articles/2009/06/16/microsoft-kills-oracle-data...http://blogs.msdn.com/adonet/archive/2009/06/15/system-data-oraclecli...
>
> Best of luck.
>
> Richard
>
> --------------------------------------------------
> From: "Dinesh" <[email protected]>
> Sent: Thursday, January 21, 2010 6:09 PM
> To: "nhusers" <[email protected]>
> Subject: [nhusers] Re: Support for loading entities from Oracle Stored
> Procedure
>
>
>
> > Thanks a lot Richard,
> > On Nhibernate Tests i was looking into examples on my local code base
> > which seem to have been out of sync and did not have the example for
> > selectEmploymentsForRegion. Thanks for pointing that out.
>
> > When i initially tried with OracleDataClient, it failed with a cast
> > error, a quick search revealed that we need to set hbm2ddl.keywords
> > property to none in session factory config to do away with the error.
>
> > Stored Procedures are working fine now, however i still need to think
> > through this as the current project for which i am considering already
> > uses MS Oracle Client, and this approach requires OracleDataClient.
>
> > I decided to look at the NHibernate Sources to see whether i can do
> > something on adding support, while i made some progress by extending
> > OracleClientDriver, i hit some road blocks for other reasons, one was
> > that Microsoft's OracleClient provider only supports parameters
> > binding by name and not position, and the other one was that
> > NHibernate seems to regenerate parameter names and not use the ones
> > provided in the Mapping file.
>
> > I noticed that NH-847 was fixed by you, was there any other reason
> > that you could not support MS's OracleClient
>
> > Regards
> > Dinesh

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to