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

ReferenceProperty support #1226

Closed
susanlinsfu opened this issue Apr 13, 2016 · 4 comments
Closed

ReferenceProperty support #1226

susanlinsfu opened this issue Apr 13, 2016 · 4 comments
Assignees
Labels
api: datastore Issues related to the Datastore API.

Comments

@susanlinsfu
Copy link

Reading the docs about Google Datastore at https://cloud.google.com/appengine/articles/modeling. It mentions properties which would be a great feature as many models require one to many relationships.

@jgeewax
Copy link
Contributor

jgeewax commented Apr 13, 2016

I believe you can do this by setting the property as a Key object.

We won't automatically de-reference this for you (ie, when you access the property it will return the key which you then need to get), but it's definitely possible to do...

@jgeewax jgeewax added enhancement api: datastore Issues related to the Datastore API. labels Apr 13, 2016
@jgeewax
Copy link
Contributor

jgeewax commented Apr 13, 2016

@stephenplusplus , what are your thoughts here? It kind of gets us into ORM world if we start de-ref'ing keys for people automatically, right?

@stephenplusplus
Copy link
Contributor

Yeah, I think what is wanted here is an ORM. We also have a very old issue that requested showing an integration: #87 -- is it worth looking into that again?

@susanlinsfu in case this is helpful, I made a schema validator for gcloud-node + Datastore https://github.com/stephenplusplus/gcloud-datastore-schema -- I'm still working on adding nested array validation, but feel free to take a look.

@stephenplusplus
Copy link
Contributor

Feel free to continue the ORM discussion in #87.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: datastore Issues related to the Datastore API.
Projects
None yet
Development

No branches or pull requests

3 participants