Re: [sqlalchemy] Confused about Many-to-Many outerjoin

2018-05-23 Thread Mike Bayer
On Tue, May 22, 2018 at 10:06 PM, wrote: > Figured out what I had wrong, I was trying to use the second table in the > list as the basis, but the order dictates how SQLAlchemy handles it. > > So: > > q = db.session.query(User, Articles, ReadArticles) > should be: > q = db.session.query(Articles,

Re: [sqlalchemy] How to override append and remove methods used in orm.relationships

2018-05-23 Thread Mike Bayer
On Tue, May 22, 2018 at 2:47 PM, Diego Quintana wrote: > This works! I can't thank you enough! I dived into the source code to > understand what was happening but I did not get much. I really hope I can be > of more help in the future. > > I have one last question, if I may: > >> I ran this with a

Re: [sqlalchemy] Mapping PostgreSQL INHERIT tables.

2018-05-23 Thread Mike Bayer
On Tue, May 22, 2018 at 3:48 PM, Demitri Muna wrote: > Hi Mike, > > Thanks for the quick reply. I added the "concrete=True" to the B class > definition and got this error: > >> AttributeError: Concrete Mapper|B|b does not implement attribute 'type' at >> the instance level. Add this property expl