How can I modify this
videos = Video.gql( 'WHERE user_id = :1', '18' ).fetch(8)
so that instead of matching for a user_id, it returns any of the last 8 Video objects added to the datastore?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You should save your models with a
for this type of queries.
The accepted answer on this question is not correct. If you add a
createdproperty to your models and compare queries ordered by-createdand-__key__you will see that they don’t match.Keys that are automatically set will not be monotonically increasing. Some good read on that here .