I'm porting an existing project using NH + SqlServer to support
Oracle.  Mostly going well, but here's a couple of things I've noticed
that I wonder if anybody else has seen and/or worked around...

In an hbm file I do something like so
<sql-query name="query1">
declare
    x int := 1;
begin
    more pl sql statements..
end;
</sql-query>

Then I use GetNamedQuery and ExecuteUpdate to run this batch.  Problem
is,  that := assignment syntax blows up NHibernate, I suppose because
it thinks that it is a substitution parameter.
Is there any known way to use a PL/SQL batch like so in an
ISQLQuery?

Secondly,
In either SQL or Oracle,  if in my ISQLQuery i have something like so
    select whatever from table where  col = :myparameter;    -- note
the ending semicolon here
NH considers that ending semicolon to be part of the parameter name.
Turns out this is a problem with SQL also, we just don't notice it
typically because semicolons are not generally reqiired in SQL,
whereas Oracle is very strict about such things.

I can work around the second problem by just being careful not to have
a ; directly after a parameter.
The first one though I think might limit our ability to use PL/SQL in
this way.

Anyone have any thoughts on either of these?

thanks.


-- 
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