Hi Fabio,

I tried Persist but result is same, it is probably due to incorrect
select scope_identity() on the database server side.

Sofija

On Apr 8, 12:53 am, Fabio Maulo <[email protected]> wrote:
> Use Persist instead SaveOrUpdate; Persist will make persistent the whole
> graph (all entities will have its POID).
> If you are using FNH take care with cascade setting because FNH does not
> use "persist" in cascades.
>
>
>
>
>
>
>
> On Friday, March 16, 2012 8:03:59 PM UTC-3, Sofija Blazevski wrote:
>
> > Hello, everyone!
>
> > I'm new to NHibernate, and I would like to use it together with
> > FluentNHibernate.
> > I've been trying to use them together for an updatable view scenario.
>
> > This is the problem:
>
> > None of the following Id generator classes
> > <generator class="identity" />
> > <generator class="native" />
>
> > allows inserting into updatable view. Updatable view (more precisely
> > database server) takes care of assigning id.
> > Each time I get "Null id" (or is it  "Null identifier" ) thrown from
> > ISession.SaveOrUpdate method.
> > While, on the other hand, same scenario with inserting into table
> > works perfectly.
>
> > On database everything is tested to work.
> > NHibernate version is 3.2.0.4000
>
> > What is correct way to setup NHibernate to allow inserting into a view
> > without providing value for whatever field is set as Id?
>
> > I would like to use NHibernate for an application with intensive usage
> > of views and stored procedures.
> > Now, I know you probably don't like usage of updatable views, and I
> > would not like to get into  discussion on why do I use them, I simply
> > need to use them - if I'm gonna use any ORM framework as there is no
> > painless way to just use stored procedures (I mean in any ORM in any
> > technology I came across so far).
>
> > Thanks in advance for helping.
>
> > - Sofija

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