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 primitive types for $parent metadata #42

Open
riannucci opened this issue Mar 16, 2016 · 1 comment
Open

Allow primitive types for $parent metadata #42

riannucci opened this issue Mar 16, 2016 · 1 comment

Comments

@riannucci
Copy link
Member

riannucci commented Mar 16, 2016

Example:

type MyThing struct {
  ID int `gae:"$id"`
  ParentID int `gae:"$parent,ParentKind"`
}

This would cause gae to synthesize MakeKey(aid, ns, "ParentKind", <ParentID>) for the $parent value.

The only thing I'm not super happy with is that this is very special-case to a 1-deep parent key, and until #41 is fixed, there's no ability to conveniently replicate this functionality with the MetaGetter interface.

edit: angle brackets

@riannucci
Copy link
Member Author

@nodirt

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