Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8307063
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T18:27:16+00:00 2026-06-08T18:27:16+00:00

I have an app on GAE that lets user add\edit posts to any arbitrary

  • 0

I have an app on GAE that lets user add\edit posts to any arbitrary path (like a wiki). I am storing all the posts in a single table. The table is structured as follows:

class WikiPosts(db.Model):
    path = db.StringProperty(required = True)
    content = db.TextProperty(required = True)
    date_created = db.DateTimeProperty(auto_now_add = True)

On the home page I want to display the latest post for each path.

My question is similar to this one ( Select first row in each GROUP BY group? ) but the answers involve using join which is not possible in GAE.

I can have a dedicated field to keep track of the latest post for each url but is it possible to do it using gql query?

As of now, I am using this query which returns all the versions of all the wiki posts sorted by their creation time.

db.GqlQuery("SELECT * FROM WikiPosts ORDER BY date_created DESC limit=10")
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T18:27:18+00:00Added an answer on June 8, 2026 at 6:27 pm

    Since you do not have a unique list of paths, and since GAE does not support the equivalent of SQL’s SELECT DISTINCT (see here, here, and here), you’ll have to

    1. generate that list every time the home page is displayed (not recommended once you exceed a few hundred posts), or
    2. create another table/model to keep track of unique paths as new posts are added (then use this new table in combination with Shay’s answer), or
    3. as you stated, keep track of the latest post per path.

    I think option 3 is your best bet, since (as is often the case with GAE), you would be putting into the datastore exactly what you want to get out (i.e., make writes more complicated in favor of quick reads.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a python GAE app that sends emails like in the example using
I have a simple GAE app that includes a login/logout link. This app is
I have a WP7 app that is connecting to my GAE backend via oauth.
lets say i have app id, app secret id and user uid now i
I am writing a small app that uses the GAE. I have parts of
I have a web app on GAE written in Go that performs some calculations
I'm trying to have a GAE app that all it does is register users
I have a GAE app that works just fine from my browser, but can't
I have a newly coded GWT/GAE app that uses RequestFactory and Editors on the
Consider a GAE (python) app that lets users comment on songs. The expected number

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.