Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tables] TableEntity metadata should only be accessible by an attribute #15088

Closed
seankane-msft opened this issue Nov 6, 2020 · 1 comment
Closed
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. Tables

Comments

@seankane-msft
Copy link
Member

seankane-msft commented Nov 6, 2020

Currently metadata can be accessed by either entity['_metadata'] or entity._metadata. We want to remove both of these options and leave the entity.metadata() as the only way to access this attribute.

@seankane-msft seankane-msft added Client This issue points to a problem in the data-plane of the library. Tables labels Nov 6, 2020
@seankane-msft seankane-msft self-assigned this Nov 6, 2020
@seankane-msft seankane-msft added this to the [2021] February milestone Jan 5, 2021
@seankane-msft
Copy link
Member Author

Note: adding

    def __getattr__(self, name):
        """
        :param name:name of entity entry
        :type name: str
        :return: TableEntity dictionary
        :rtype: dict[str,str]
        """
        if name == '_metadata':
            raise AttributeError(_ERROR_ATTRIBUTE_MISSING.format("TableEntity", name))
    ...

to the TableEntity object makes the entity.metadata() function no longer work.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. Tables
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant