python - Google app engine - Query only for a field -


note: example representative of problem, not real use case

i know if have objects example car , carcategory:

owner      - name      - age  car       - name      - brand      - category( reference )      - owner ( reference )  carcategory      - name      - property 

can query field?

for example carcategory:

query = gqlquery("select category car")

i'm getting error: badqueryerror: parse error: expected no additional symbols @ symbol car

update: if want have list of categories owned user

i in efficient possible way.

you can't query on individual fields in app engine datastore. entities stored , retrieved serialized protocol buffers in entirety, there's no way retrieve fields.

given db.model abstraction, there'd no sensible way represent returned data, either - can't provide model fields filled in, might violate constraints, , cause trouble if tried store datastore!

in response update: traditionally require join , aggregate, neither of supported on app engine. best option query , retrieve user's car entities, , categorize category property yourself.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -