If I have two tables, Customers and Orders, and I want to look up the latest order for a customer, how would I do this on Google App Engine using GQL?
Normally, I would join these two tables through the foreign key, customer_id, which exists in the orders table.
select orders.* from customers, orders
where customers.customer_id = orders.customer_id
and orders.order_id = (select top 1 sub_orders.order_id from orders sub_orders
where sub_orders.customer_id = orders.customer_id
order by sub_orders.order_date desc)
However, since joins do not seem to be possible on Google App Engine, I'm not sure how to work around this limitation. Any suggestions would be appreciated.