[sqlalchemy] Problems filtering on primary_join with ORM relationship

2012-11-09 Thread Benjamin Sims
Hi, We have a relationship that looks something like this: User 1 - * Posts Posts can have various states, let's say 'DRAFT', 'LIVE', 'DELETED'. Sometimes, we want to get all of the posts in existence for a user by doing: user.all_posts Sometimes, we just want to get posts that are not

Re: [sqlalchemy] Problems filtering on primary_join with ORM relationship

2012-11-09 Thread Michael Bayer
On Nov 9, 2012, at 10:55 AM, Benjamin Sims wrote: Hi, We have a relationship that looks something like this: User 1 - * Posts Posts can have various states, let's say 'DRAFT', 'LIVE', 'DELETED'. Sometimes, we want to get all of the posts in existence for a user by doing: