views:

36

answers:

1

Is there a way to select only a given property from the App Engine datastore?

Imagine I have an User entity with many properties, but in a given moment I just want to fetch a list of user names (instead of fetching all properties for all users).

So, something equivalent to the following SQL: SELECT name FROM User;

I'm interested in all kinds of solutions (if any), python, java, low-level API, GQL... whatever...

Thanks

+3  A: 

No. Entities are only ever fetched as a whole. If it's important to only fetch a limited set of properties, you need to refactor into multiple entities - eg, 'userinfo' and 'extrauserinfo' kinds.

Nick Johnson