Hi Stefan,

> -----Original Message-----
> From: Stefan Guggisberg [mailto:[EMAIL PROTECTED]
> Sent: 01 November 2007 10:33
> To: [email protected]
> Subject: Re: Import UUID Behavior
> 
> hi matt
> 
> On 11/1/07, Matthew Fulford <[EMAIL PROTECTED]> wrote:
> > Hi,
> > I'm developing a utility that can perform export and import tasks on
> > content repositories, the main purposes being backup/restore and
> > migrating content from dev>staging>production.
> >
> > The export task exports a node called Content (mix:referenceable) at
the
> > repository root using system view, and the import task imports the
> > Content node from the exported XML file into the root node. The
import
> > task uses ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING
and
> > everything seems to be working as expected.
> >
> > My question is: what if the Content node already exists but has a
> > different UUID to the incoming Content node? Will the existing node
> > still be removed by the import prior to adding the incoming version?
> 
> no, since they have different UUID's and the specified behaviour is
> based on equality of UUID's. so, if the oarent node allows same name
> siblings
> you'll end up with 2 Content nodes; otherwise you'll get an exception.
> 

Ok, so I need to delete the Content node first if it already exists, as
the parent node (root - nt:unstructured) does allow same name siblings.

> >
> > Also, out of interest, is item UUID generation based on anything
> > specific or is it random? Will a node called Content at the root
always
> > have the same UUID?
> 
> no, UUID generation is random.
> 
> cheers
> stefan
> 
> >
> > Thanks,
> > Matt
> >

Thanks for the info.
Matt

Reply via email to