Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
SDK Documentation
 RetainObjectIdentity Property
Community Content
In this section
Statistics Annotations (0)
Collapse All/Expand All Collapse All
This page is specific to
The 2007 product release

Other versions are also available for the following:
SPImportSettings.RetainObjectIdentity Property (Microsoft.SharePoint.Deployment)
Gets or sets a value that specifies whether identifier GUIDs are retained when the content is imported into the destination location.

Namespace: Microsoft.SharePoint.Deployment
Assembly: Microsoft.SharePoint (in microsoft.sharepoint.dll)
Visual Basic (Declaration)
<XmlAttributeAttribute(AttributeName:="RetainObjectIdentity")> _
Public Property RetainObjectIdentity As Boolean
Visual Basic (Usage)
Dim instance As SPImportSettings
Dim value As Boolean

value = instance.RetainObjectIdentity

instance.RetainObjectIdentity = value
C#
[XmlAttributeAttribute(AttributeName="RetainObjectIdentity")] 
public bool RetainObjectIdentity { get; set; }

Property Value

true to retain GUIDs; otherwise, false. The default is false.

This property should be used with caution—databases do not permit duplicate GUIDs. It is most commonly used when you have two Web sites that are mirror images of each other, or in a publishing scenario to indicate whether a file on one machine is the same file on another machine. In fact, RetainObjectIdentity is the lynchpin of selective migration, because the core concept is importing updated versions of existing files. The only way the destination knows that an item is an updated version of an existing item is to compare object identity using object GUIDs.

The value of the RetainObjectIdentity property is ignored when migrating Web sites within the same SharePoint Web application.

This value must be set to true to support field deletion (fields deleted at the export location since the last export are deleted at the import location) for incremental operations ExportMethod must also have a value of ExportChanges.

This functionality is available only in the object model, and cannot be accomplished using either stsadm or the Sites web service.

Because databases do not permit duplicate GUIDs, you should be careful when implementing this property. It is only useful in selective migration scenarios. Furthermore, to support field deletion (which deletes previous versions of items at the export source when they are updating and deleting the same file at the import destination), this value must be set to true. Note, too, that to support selective migrations you must set the ExportMethod property to a field value of ExportChanges.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker