다음을 통해 공유


SPImportSettings.RetainObjectIdentity Property

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)

Syntax

'Declaration
Public Property RetainObjectIdentity As Boolean
    Get
    Set
'Usage
Dim instance As SPImportSettings
Dim value As Boolean

value = instance.RetainObjectIdentity

instance.RetainObjectIdentity = value
public bool RetainObjectIdentity { get; set; }

Property Value

Type: System.Boolean
true to retain GUIDs; otherwise, false. The default is false.

Remarks

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.

See Also

Reference

SPImportSettings Class

SPImportSettings Members

Microsoft.SharePoint.Deployment Namespace