If I call Persist and later Commit fails, will the Persist be rolled
back?

I take it you think identity is bad choice for Ids.  I can't say I
disagree.  Maybe this is an example of why it's not great.  It was the
easiest option.  What do you prefer, guid, hi-lo?


On Dec 17, 11:02 am, Fabio Maulo <[email protected]> wrote:
> Then you have even another problem: you are using identity
>
> On Fri, Dec 17, 2010 at 1:56 PM, Tim Scott 
> <[email protected]>wrote:
>
>
>
> > I answered my own question.  The insert does not happen on Save, but
> > later on Commit.  Since the Id is gotten from the DB, it is not known
> > until the insert happens.
>
> > On Dec 17, 10:41 am, Tim Scott <[email protected]> wrote:
> > > parent.AddChild(transientChid);
> > > session.Save(parent);
>
> > > I have the parent mapped to cascade, and it does.  But
> > > transientChild.Id is still the transient value (0) after it has been
> > > persisted with the cascade.  Is this expected?  How do I get the newly
> > > created child's Id?
>
> > > By the way, I have two situations like this, one is mapped inverse and
> > > the other is not.  Same result in both cases: child Id is transient
> > > value after cascade inserted;
>
> > --
> > 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]<nhusers%[email protected]>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/nhusers?hl=en.
>
> --
> Fabio Maulo

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