ThiefMaster <adr...@planetcoding.net> wrote:

> 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 playing around with primaryjoin in the backref but couldn't get it 
> working.
> 
> Is what I'm trying to do actually possible?

yes, if this had an is_deleted column (which it does not) you’d add that to
the primaryjoin (which I don’t see here), it would only select for that column.




> Cheers
> Adrian
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sqlalchemy" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sqlalchemy+unsubscr...@googlegroups.com.
> To post to this group, send email to sqlalchemy@googlegroups.com.
> Visit this group at http://groups.google.com/group/sqlalchemy.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to