I think there's a misunderstanding - I don't want to manually populate the 
relationship, I want to avoid spamming queries if I get e.g. 10 categories 
and need the parent chains for all of them.

Here's a pseudo-ish example of what I'd like to do (without queries in the 
loop):

categories = Category.query.filter(Category.id.in_([1, 2, 3, 4, 5, 
6])).options(...)
for category in categories:
    print category, category.parent_list

-- 
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