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 7538019
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T07:00:16+00:00 2026-05-30T07:00:16+00:00

I need something exactly like a SQL JOIN which cannot be done with appengine

  • 0

I need something exactly like a SQL JOIN which cannot be done with appengine so I’m looking for a workaround. This is the query is want sorted by person.lastname

downline = User.query(User.sponsor == distributor.key).fetch()
for person in downline
    orders = model.Order.all().filter('distributor_id =' , person.key.id()).filter('created >' , startdate).filter('status =', 'PAID').fetch(999999)

The query fetches the orders places by a person and basically I’ve got 2 kinds of entities, persons and orders. How should I go about to mimic that I join the persons (User) entity and sort the list by person’s lastname? This is a very easy thing to do in SQL and I couldn’t find a way to do it in appengine.

Can you tell me how I could add the person names in memory? The function doesn’t have to have very good performance since it is a reporting function.

  • 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-05-30T07:00:19+00:00Added an answer on May 30, 2026 at 7:00 am

    You can connect your Person and Order models by parenting – a Person is the parent object of an Order. With that, it becomes simple to iterate over the Person set in order and select its orders.

    Another way is to use a ListPoperty if you are using the current API or repeated properties if you are using NDB to link your Order’s to your Person’s.

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

Sidebar

Related Questions

I need something like this http://jonraasch.com/blog/a-simple-jquery-slideshow but w/o the absolute positioning. Is it possible?
Ok, I need something like this: datediff(second, date_one, date_two) < 1 dates are stored
I want to notify an user using Chrome browser. I need something powerful like
In SQL we have NOT LIKE %string% I need to do this in PHP.
i need some help with this sql query heres my mysql table structure: DOMAINS
I am attempting to merge something like this in my SQL Server database: [TicketID],
I’m looking for something exactly like: XMLTABLE, http://www.ibm.com/developerworks/data/library/techarticle/dm-0708nicola/ Does something like this exist in
I need something like the slider control from jQueryUI, but I don't want to
I need something simple like date , but in seconds since 1970 instead of
I need something like make i.e. dependencies + executing shell commands where failing command

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.