So "ParentFeature.shows" is there for the case where I query 
`pg.query(Parent)`, I want it to be ordered ascending. 

The only reason i have "ParentFeature.unordered_shows" is because if I try 
to apply an `order_by` to `Thing.name` in a query (like my query example), 
it emits "ORDER BY thing.name DESC, thing.name" (e.g. the order_by on the 
relationship is still applied, despite my sort). If I can override that, i 
have no need for both relationships

To answer your other question. I only have the join+joinedloads from 
following 
https://docs.sqlalchemy.org/en/latest/orm/loading_relationships.html?highlight=joinedload#the-zen-of-joined-eager-loading.

The query I included was only to show my attempt at writing a query which:

   1. query ParentFeature
   2. only get the 1 ParentFeature with a specific Parent
   3. apply the sort to ParentFeature.things, so the "result.one().things" 
   is sorted ascending/descending

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to