Re: [sqlalchemy] Do I need a composite Secondary join for my hierarchical models?

2017-11-25 Thread Mike Bayer
On Sat, Nov 25, 2017 at 9:41 AM, Stephan Hügel wrote: > I'm trying to model a series of hierarchical relationships: > > Widgets can have many Themes, which can be shared by many Widgets > Themes can have many Sections, which can be shared by many Themes: > > Widgets - n:m -

Re: [sqlalchemy] How to implement a conditional insert (MySQL)

2017-11-25 Thread Mike Bayer
On Fri, Nov 24, 2017 at 6:32 PM, wrote: > Hi, > > My question is based on this answer on Stackoverflow to the question MySQL > Conditional Insert. In my current SA implementation I have the following > code: > > token = Token( > user=user, > client_sig=sigstring,

[sqlalchemy] Do I need a composite Secondary join for my hierarchical models?

2017-11-25 Thread Stephan Hügel
I'm trying to model a series of hierarchical relationships: - Widgets can have many Themes, which can be shared by many Widgets - Themes can have many Sections, which can be shared by many Themes: Widgets - n:m - Themes - n:m - Sections I'd also like to define a Content table with a