Added ability to create relationships either in initial table definition or as a separate operation#12
Open
Added ability to create relationships either in initial table definition or as a separate operation#12
Conversation
…ion or as a separate operation
zhaodongwang-msft
previously approved these changes
Sep 17, 2025
Member
|
Generally, I think helper functions like this Dataverse message operations are defined as names, and there is no This specific named action isn't present in OData, but it could be. Instead, we implemented POST to I think we ought to do the work to add the underlying Metadata Entity Types so that Jeff (or anyone) could use them to compose these types of operations on top of a message named |
JimDaly
reviewed
Sep 17, 2025
tpellissier-msft
pushed a commit
that referenced
this pull request
Jan 12, 2026
Implements architectural pattern suggested in PR #12 review feedback: - Core SDK provides low-level operations that mirror .NET SDK (CreateOneToManyRequest) - Operations are named after Dataverse messages, not high-level helper functions - Extension helpers provide convenience wrappers for common scenarios - Uses proper Metadata Entity Types exposed via models Changes: - Add models/metadata.py with Metadata Entity Type classes - LookupAttributeMetadata, OneToManyRelationshipMetadata, ManyToManyRelationshipMetadata - Label, LocalizedLabel, CascadeConfiguration, AssociatedMenuConfiguration - Add relationship operations to data/_odata.py - _create_one_to_many_relationship (POST /RelationshipDefinitions) - _create_many_to_many_relationship - _delete_relationship, _get_relationship - Expose public API in client.py - create_one_to_many_relationship, create_many_to_many_relationship - delete_relationship, get_relationship - Add extensions/relationships.py with helper functions - create_lookup_field (convenience wrapper) - Add examples/advanced/relationships.py demonstrating both approaches This approach aligns with Dataverse's actual API structure and allows users to compose operations using the underlying metadata types, while still providing convenience helpers as opt-in extensions. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
tpellissier-msft
pushed a commit
that referenced
this pull request
Jan 12, 2026
Implements architectural pattern suggested in PR #12 review feedback: - Core SDK provides low-level operations that mirror .NET SDK (CreateOneToManyRequest) - Operations are named after Dataverse messages, not high-level helper functions - Extension helpers provide convenience wrappers for common scenarios - Uses proper Metadata Entity Types exposed via models Changes: - Add models/metadata.py with Metadata Entity Type classes - LookupAttributeMetadata, OneToManyRelationshipMetadata, ManyToManyRelationshipMetadata - Label, LocalizedLabel, CascadeConfiguration, AssociatedMenuConfiguration - Add relationship operations to data/_odata.py - _create_one_to_many_relationship (POST /RelationshipDefinitions) - _create_many_to_many_relationship - _delete_relationship, _get_relationship - Expose public API in client.py - create_one_to_many_relationship, create_many_to_many_relationship - delete_relationship, get_relationship - Add extensions/relationships.py with helper functions - create_lookup_field (convenience wrapper) - Add examples/advanced/relationships.py demonstrating both approaches This approach aligns with Dataverse's actual API structure and allows users to compose operations using the underlying metadata types, while still providing convenience helpers as opt-in extensions. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
tpellissier-msft
pushed a commit
that referenced
this pull request
Jan 12, 2026
Implements architectural pattern suggested in PR #12 review feedback: - Core SDK provides low-level operations that mirror .NET SDK (CreateOneToManyRequest) - Operations are named after Dataverse messages, not high-level helper functions - Extension helpers provide convenience wrappers for common scenarios - Uses proper Metadata Entity Types exposed via models Changes: - Add models/metadata.py with Metadata Entity Type classes - LookupAttributeMetadata, OneToManyRelationshipMetadata, ManyToManyRelationshipMetadata - Label, LocalizedLabel, CascadeConfiguration, AssociatedMenuConfiguration - Add relationship operations to data/_odata.py - _create_one_to_many_relationship (POST /RelationshipDefinitions) - _create_many_to_many_relationship - _delete_relationship, _get_relationship - Expose public API in client.py - create_one_to_many_relationship, create_many_to_many_relationship - delete_relationship, get_relationship - Add extensions/relationships.py with helper functions - create_lookup_field (convenience wrapper) - Add examples/advanced/relationships.py demonstrating both approaches This approach aligns with Dataverse's actual API structure and allows users to compose operations using the underlying metadata types, while still providing convenience helpers as opt-in extensions. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
tpellissier-msft
pushed a commit
that referenced
this pull request
Jan 13, 2026
Implements architectural pattern suggested in PR #12 review feedback: - Core SDK provides low-level operations that mirror .NET SDK (CreateOneToManyRequest) - Operations are named after Dataverse messages, not high-level helper functions - Extension helpers provide convenience wrappers for common scenarios - Uses proper Metadata Entity Types exposed via models Changes: - Add models/metadata.py with Metadata Entity Type classes - LookupAttributeMetadata, OneToManyRelationshipMetadata, ManyToManyRelationshipMetadata - Label, LocalizedLabel, CascadeConfiguration, AssociatedMenuConfiguration - Add relationship operations to data/_odata.py - _create_one_to_many_relationship (POST /RelationshipDefinitions) - _create_many_to_many_relationship - _delete_relationship, _get_relationship - Expose public API in client.py - create_one_to_many_relationship, create_many_to_many_relationship - delete_relationship, get_relationship - Add extensions/relationships.py with helper functions - create_lookup_field (convenience wrapper) - Add examples/advanced/relationships.py demonstrating both approaches This approach aligns with Dataverse's actual API structure and allows users to compose operations using the underlying metadata types, while still providing convenience helpers as opt-in extensions. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
tpellissier-msft
pushed a commit
that referenced
this pull request
Jan 15, 2026
Implements architectural pattern suggested in PR #12 review feedback: - Core SDK provides low-level operations that mirror .NET SDK (CreateOneToManyRequest) - Operations are named after Dataverse messages, not high-level helper functions - Extension helpers provide convenience wrappers for common scenarios - Uses proper Metadata Entity Types exposed via models Changes: - Add models/metadata.py with Metadata Entity Type classes - LookupAttributeMetadata, OneToManyRelationshipMetadata, ManyToManyRelationshipMetadata - Label, LocalizedLabel, CascadeConfiguration, AssociatedMenuConfiguration - Add relationship operations to data/_odata.py - _create_one_to_many_relationship (POST /RelationshipDefinitions) - _create_many_to_many_relationship - _delete_relationship, _get_relationship - Expose public API in client.py - create_one_to_many_relationship, create_many_to_many_relationship - delete_relationship, get_relationship - Add extensions/relationships.py with helper functions - create_lookup_field (convenience wrapper) - Add examples/advanced/relationships.py demonstrating both approaches This approach aligns with Dataverse's actual API structure and allows users to compose operations using the underlying metadata types, while still providing convenience helpers as opt-in extensions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This expands the schema available on create table, as well as adds a separate discrete method for adding relationships.
Also removes previous incorrect escaping of schemanames, since schema names cannot contain quote marks.