Niclas,
In my opinion your application is going down the wrong path.  Do you really
want your "distributed" server piece to be just a database store.  When it
receives a message it saves it to the database regardless of what it is
sent?  This sounds dangerous to me.  Why not build your application a little
differently where the server will load the object when it receives a
message.  If no item exists it's an add, process it as an add.  If one
exists its an update, update it accordingly.  This gives you the option to
control how things are updated in the server.  You can perform validation,
etc.  You have the ability to check permissions.  Giving any client
connection access to your database like that seems dangerous to me.  Maybe
others disagree.


On Tue, Jun 23, 2009 at 10:07 AM, Niclas Pehrsson <pehrs...@gmail.com>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 <fabioma...@gmail.com> wrote:
> > 2009/6/23 Niclas Pehrsson <pehrs...@gmail.com>
> >
> >
> >
> > > What would you do in my scenario?
> >
> > generator="guid" or one of its variation "guid.comb" "guid.native"
> >
> > --
> > Fabio Maulo
> >
>

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

Reply via email to