Re: [sqlalchemy] Association table very slow

2020-12-12 Thread Marnix le Noble
Sorry, I thought I deleted the post just after sending it but it seems like it still went through. I figured out it was indeed the loading of ORM objects and not the query itself. For completeness sake in case anyone reads this at a later date. We were doing something like len(parent.children) to

Re: [sqlalchemy] Transforming the expression of an aliased relationship

2020-04-30 Thread Marnix le Noble
This is exactly what I was looking for! That's amazing, thank you very much. I wasn't aware you could pass a relationship to the onclause parameter of the join() function which I am now seeing is actually in the docs. Cheers! -- SQLAlchemy - The Python SQL Toolkit and Object Relational

[sqlalchemy] Transforming the expression of an aliased relationship

2020-04-30 Thread Marnix le Noble
Hello, I have been banging my head against an issue for a couple weeks now and I was wondering if anyone was willing to help me out. I have tried looking in the SQLAlchemy documentation and previous topics but haven't found an answer as of yet. Imagine the following scenario: # Tables Base =