Re: [sqlalchemy] Is it possible to add another criterion to this backref?

2015-03-24 Thread ThiefMaster
The is_deleted column is in the User table. If possible I'd rather avoid having to replicate it in the favorite tables (hard-deleting favorites is fine, I only need soft deletion for users). -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To

[sqlalchemy] Is it possible to add another criterion to this backref?

2015-03-24 Thread ThiefMaster
Hi, I have the following models for a favorite system: https://gist.github.com/ThiefMaster/e4f622d54c74ee322282 Now I'd like to restrict the relationship that's created by the backref in L24, so it doesn't include any favorited users which have the is_deleted column set to true. I tried

[sqlalchemy] Strange error after SQLAlchemy update: 'list' object has no attribute '_all_columns'

2014-07-25 Thread ThiefMaster
Nicely formatted version: http://stackoverflow.com/questions/24930155/strange-error-after-sqlalchemy-update-list-object-has-no-attribute-all-colu After updating to the most recent SQLAlchemy one of my slightly more complex query started to fail with an error inside SQLalchemy. Here's a

[sqlalchemy] x y z shouldn't result in x y SQL

2012-08-22 Thread ThiefMaster
I think this is a bug; it should either result in an error or work as expected - in python this **is** valid after all: str(X.query.filter(2 X.id 5)) 'SELECT x.id AS x_id \nFROM x \nWHERE x.id :id_1' This shouldn't generate the following SQL str(X.query.filter(2 X.id)) 'SELECT x.id AS