On Sunday, 26 November 2017 02:24:29 UTC, Mike Bayer wrote:
>
> If you wanted Widgets.themes.sections to refer to some kind of object 
> that had just one Content on it, you need a much more complicated 
> mapping; some kind of object called a ContentTheme and a 
> ContentSection, which relate to both a Theme and a Section as they are 
> related to a specific ontent object. 
>

This seems like it's not worth the trouble to figure out, and it would (I 
think) only be available when I supplied a Widgets instance, so from a 
query. Instead, I've implemented a simpler query as a method on Sections – 
it takes Widgets and Themes instances as arguments, and joins those to 
Content on the ID fields, along with the Sections instance – it's not as 
neat, but it's more practical and less complex. Thanks for your help with 
the rest of the structure, everything's working perfectly now.

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