[baseten-users] proper way to move objects across database contexts

Tuukka Norri tuukka.norri at karppinen.fi
Tue Oct 13 15:09:07 EEST 2009


Jianhua Meng kirjoitti 13.10.2009 kello 3.47:
> I have a need to export a database object from an existing context  
> (let's call it source context) to a new context.  The motivation for  
> doing that is so that I can change the exported object in the new  
> context without affecting the state of the source context.

Hi!

If I understood correctly, both contexts are connected to the same  
database. Unfortunately we don't currently have means to reassign an  
object's database context, but you could call -faultsWithIDs: or one  
of the -executeFetch methods and ask it to return faults. - 
objectWithID: currently fetches all non-excluded properties, which  
isn't probably needed in your case.
-- 
Best regards,
Tuukka Norri
MK&C




More information about the baseten-users mailing list