Re: [sqlalchemy] Join multiple tables with association tables

2021-08-10 Thread 'timbecks' via sqlalchemy
*Is the relationship between Fact and Info meant to be many-to-many? And likewise the relationship between Text and Info?* You are right about that. Your code did exactly what I wanted. Thank you so much! I figured it could have to do somethin with a subquery but I'm just starting

Re: [sqlalchemy] Join multiple tables with association tables

2021-08-10 Thread Simon King
It's difficult to tell from your code what your intention is. Is the relationship between Fact and Info meant to be many-to-many? And likewise the relationship between Text and Info? Forgetting SQLAlchemy for a moment, what is the SQL that you want to produce? Does the script below do what you

[sqlalchemy] Join multiple tables with association tables

2021-08-09 Thread 'timbecks' via sqlalchemy
I am trying to figure out the correct join query setup within SQLAlchemy, but I can't seem to get my head around it. I have the following table setup (simplified, I left out the non-essential fields): [image: Unbenannt.png] [image: Unbenannt2.png] The facts are associated to info, info is

[sqlalchemy] Join multiple tables with association tables

2021-08-09 Thread 'timbecks' via sqlalchemy
I am trying to figure out the correct join query setup within SQLAlchemy, but I can't seem to get my head around it. I have the following table setup (simplified, I left out the non-essential fields): ```pyhton "facts_info", Base.metadata, sqlColumn("fact_id", Integer,

[sqlalchemy] Join multiple tables with association tables

2021-08-09 Thread 'timbecks' via sqlalchemy
I am trying to figure out the correct join query setup within SQLAlchemy, but I can't seem to get my head around it. I have the following table setup (simplified, I left out the non-essential fields): ```pyhton "facts_info", Base.metadata, sqlColumn("fact_id", Integer,