I have a model like this:
email = db.EmailProperty(required=True, indexed=True)
user_name = db.StringProperty(required=True, indexed=True)
api_key = db.StringProperty(required=False, indexed=False)
active = db.BooleanProperty(required=True, indexed=False)
real_name = db.StringProperty(required=False, indexed=False)
user = db.GqlQuery("SELECT email, api_key, active FROM Users WHERE user_name = :1", username).get()
user = db.GqlQuery("SELECT * FROM Users WHERE user_name = :1", username).get()
You cannot project unindexed properties. As stated in the documentation
There are some limitations on what properties can be projected: You can only project indexed properties. This means that projecting Text, Blob or other properties explicitly marked as unindexed is not supported.
You can find out what indexes are required by running your query in the Datastore Viewer in the Admin Console.