OneToManyRelationshipMetadata Classe

Metadados para uma relação de entidade um para muitos.

Construtor

OneToManyRelationshipMetadata(schema_name: str, referenced_entity: str, referencing_entity: str, referenced_attribute: str, cascade_configuration: ~PowerPlatform.Dataverse.models.relationship.CascadeConfiguration = <factory>, referencing_attribute: str | None = None, additional_properties: ~typing.Dict[str, ~typing.Any] | None = None)

Parâmetros

Nome Description
schema_name
Obrigatório
str

Nome do esquema para a relação (por exemplo, "new_Account_Orders").

referenced_entity
Obrigatório
str

Nome lógico da entidade referenciada (pai).

referencing_entity
Obrigatório
str

Nome lógico da entidade de referência (filho).

referenced_attribute
Obrigatório
str

Atributo na entidade referenciada (normalmente a chave primária).

cascade_configuration

Configuração de comportamento em cascata.

Valor padrão: <factory>
referencing_attribute

Nome opcional para o atributo de referência (geralmente gerado automaticamente).

Valor padrão: None
additional_properties

Ditado opcional de propriedades adicionais a serem incluídas no conteúdo da API Web. Útil para definir propriedades herdadas como "IsValidForAdvancedFind", "IsCustomizable", "SecurityTypes", etc. Eles são mesclados por último e podem substituir valores padrão.

Valor padrão: None

Métodos

to_dict

Converter em formato JSON da API Web.

Exemplo:


   >>> rel = OneToManyRelationshipMetadata(
   ...     schema_name="new_account_orders",
   ...     referenced_entity="account",
   ...     referencing_entity="new_order",
   ...     referenced_attribute="accountid"
   ... )
   >>> rel.to_dict()
   {
       '@odata.type': 'Microsoft.Dynamics.CRM.OneToManyRelationshipMetadata',
       'SchemaName': 'new_account_orders',
       'ReferencedEntity': 'account',
       'ReferencingEntity': 'new_order',
       'ReferencedAttribute': 'accountid',
       'CascadeConfiguration': {...}
   }

to_dict

Converter em formato JSON da API Web.

Exemplo:


   >>> rel = OneToManyRelationshipMetadata(
   ...     schema_name="new_account_orders",
   ...     referenced_entity="account",
   ...     referencing_entity="new_order",
   ...     referenced_attribute="accountid"
   ... )
   >>> rel.to_dict()
   {
       '@odata.type': 'Microsoft.Dynamics.CRM.OneToManyRelationshipMetadata',
       'SchemaName': 'new_account_orders',
       'ReferencedEntity': 'account',
       'ReferencingEntity': 'new_order',
       'ReferencedAttribute': 'accountid',
       'CascadeConfiguration': {...}
   }
to_dict() -> Dict[str, Any]

Atributos

additional_properties

additional_properties: Dict[str, Any] | None = None

cascade_configuration

cascade_configuration: CascadeConfiguration

referenced_attribute

referenced_attribute: str

referenced_entity

referenced_entity: str

referencing_attribute

referencing_attribute: str | None = None

referencing_entity

referencing_entity: str

schema_name

schema_name: str