Relationship Class properties

Resumen

The Describe function returns the following properties for relationship classes. The Geodatabase Table, Table, and Dataset property groups are also supported.

For a relationship class, the Describe dataType property returns a value of "RelationshipClass".

Propiedades

PropiedadExplicaciónTipo de datos
backwardPathLabel
(Sólo lectura)

The backward path label for the relationship class.

String
cardinality
(Sólo lectura)

The cardinality for the relationship class.

  • OneToOne
  • OneToMany
  • ManyToMany
String
classKey
(Sólo lectura)

Class key used for the relationship class.

  • Undefined
  • ClassID
  • ClassCode
String
destinationClassKeys
(Sólo lectura)

A list of tuples, with the object key name, and key role (DestinationPrimary, DestinationForeign).

tuple
destinationClassNames
(Sólo lectura)

A list containing the names of the destination classes.

String
forwardPathLabel
(Sólo lectura)

The forward path label for the relationship class.

String
isAttachmentRelationship
(Sólo lectura)

Indicates whether the relationship class represents a table attachment.

Boolean
isAttributed
(Sólo lectura)

Indicates whether the relationships in this relationship class have attributes.

Boolean
isComposite
(Sólo lectura)

Indicates whether the relationship class represents a composite relationship in which the origin object class represents the composite object.

Boolean
isReflexive
(Sólo lectura)

Indicates whether the origin and destination sets intersect.

Boolean
keyType
(Sólo lectura)

Key type for the relationship class.

  • Single
  • Dual
String
notification
(Sólo lectura)

The notification direction for the relationship class.

  • None
  • Forward
  • Backward
  • Both
String
originClassNames
(Sólo lectura)

A list containing the names of the origin classes.

String
originClassKeys
(Sólo lectura)

A list of tuples, with the object key name, and key role (OriginPrimary, OriginForeign).

tuple
relationshipRules
(Sólo lectura)

A list of relationship rule objects that list the properties of the relationship rules that apply to this relationship class.

Object
splitPolicy
(Sólo lectura)

The split policy that is set for the relationship class.

  • DuplicateRelatedObjects
  • UseDefault
String

Muestra de código

Relationship class properties example

The following stand-alone script displays properties for a relationship class:

import arcpy

# Create a Describe object
#
desc = arcpy.Describe("C:/data/moad.gdb/West/bapCompAttRel")

# Print relationship class properties
#
print ("Backward Path Label: {}".format(desc.backwardPathLabel))
print ("Cardinality: {}".format(desc.cardinality))
print ("Class key: {}".format(desc.classKey))
print ("Destination Class Names: {}".format(desc.destinationClassNames))
print ("Forward Path Label: {}".format(desc.forwardPathLabel)) 
print ("Is Attributed: {}".format(desc.isAttributed))
print ("Is Composite: {}".format(desc.isComposite)) 
print ("Is Reflexive: {}".format(desc.isReflexive))
print ("Key Type: {}".format(desc.keyType))
print ("Notification Direction: {}".format(desc.notification))
print ("Origin Class Names: {}".format(desc.originClassNames))