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

Allow structs to implement GetMeta/SetMeta without implementing entire PropertyLoadSaver interface. #15

Closed
riannucci opened this issue Oct 13, 2015 · 2 comments

Comments

@riannucci
Copy link
Member

This would allow structs to have some custom logic for returning "$kind", "$id", etc. This would be useful if the kind or ID had parseable fields, so that the struct could store them separately and only produce the concatenated string when needed by the datastore layer.

The implementation would only call the method in the event that some field doesn't have that key. This would prevent silliness like having a $kind field in the struct, but also special $kind logic in the methods.

I think it would make sense to only allow the override if both methods are defined.

@riannucci
Copy link
Member Author

riannucci added a commit that referenced this issue Oct 13, 2015
This is useful when the '$id' is actually multiple fields packed into a string,
but it's generally available for any metadata field.

R=dnj@chromium.org, estaab@chromium.org, maruel@chromium.org, tandrii@chromium.org, vadimsh@chromium.org
BUG=#15

Review URL: https://codereview.chromium.org/1401533007
@riannucci
Copy link
Member Author

Fixed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant