Save recursively and forcing INSERT

Posts   
 
    
worldspawn avatar
worldspawn
User
Posts: 321
Joined: 26-Aug-2006
# Posted on: 25-Aug-2008 04:18:26   

Hi,

I want to save an object and all it's relations. This is straight forward enough, but I want to force all the saves to be INSERTS instead of updates. Is there some easy way to do this rather than having to set IsNew on everything?

Reason for doing this is I need to save a new "version" of the object and it's related data.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 25-Aug-2008 09:29:25   

Hi Sam,

You have to set the entities as new and the fields as changed. This is the only way LLBLGen framework would differentiate between an Update and an Insert. Here you have some util class for that: http://llblgen.com/TinyForum/Messages.aspx?ThreadID=7568

David Elizondo | LLBLGen Support Team
worldspawn avatar
worldspawn
User
Posts: 321
Joined: 26-Aug-2006
# Posted on: 26-Aug-2008 07:54:40   

Thanks Dave