Yeah I want to have the same guid through the whole system, the
suggestion to remove it were kind of stupid, but I still have my
natural ID,

John Rayner, I have some validation checks before I finally persist my
object the default scenario is that its new, but not always, and
either if I know that I should use Save it wont help for my childs.

But session.Persist() does all what I need it to do :).

On 24 Juni, 22:50, John Rayner <[email protected]> wrote:
> I thought that the point of using a Guid in a distributed system like
> this, was to maintain object identity throughout the system.  So I'm
> surprised that you want to try and get a new Id value when you shift
> the record into a new database.  And if you keep the ID, then I don't
> think you'll have these problems with NH.
>
> Cheers,
> John
>
> On Jun 23, 3:07 pm,NiclasPehrsson<[email protected]> wrote:
>
> > But how about the second time you want to save the entity in a new
> > database, and you want the id's to be the same, or maybe I dont want
> > to have the same Id, I maybe should have an uniqe id for my receipt
> > and another one for the db's which in this case could be different,
> > So when I upload my objects I simple need to set the id that the db
> > relies on to guid.empty.
>
> > Thats another approach I still need to do some code for handle this,
> > then maybe
> > session.Save(rootObject);
> > foreach(var child in rootObject.Childs)
> > {
> >      session.Save(child);
>
> > }
>
> > is easier
>
> > Or am I missing something here?
>
> > On 23 Juni, 15:09, Fabio Maulo <[email protected]> wrote:
>
> > > 2009/6/23NiclasPehrsson<[email protected]>
>
> > > > What would you do in my scenario?
>
> > > generator="guid" or one of its variation "guid.comb" "guid.native"
>
> > > --
> > > Fabio Maulo- Hide quoted text -
>
> > - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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