Need to order by properties in the reference property, any good solution?

笑着哭i 提交于 2019-12-06 03:32:28

There's no equivalent for that query in datastore. Some points:

  1. You can't select a single property. SELECT is always SELECT * (you select a whole entity).
  2. You can't do joins. You need to denormalize your models to fit the queries you will perform, or perform multiple queries.

So to achieve your goal, you need to have last_login stored in Relationship, or have a 3rd model to serve as index for that specific query.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!