Re: [sqlalchemy] Re: Orm, join 1 row from many2many table when querying

2016-11-10 Thread Simon King
Whoops, yes, you're right. You should be able to simplify the relationship definition to a simple "primaryjoin" clause, no need for any of the "secondary" stuff. Simon On Thu, Nov 10, 2016 at 1:41 PM, Dorian Hoxha wrote: > Note that you're joining with User, which I

[sqlalchemy] Re: Orm, join 1 row from many2many table when querying

2016-11-10 Thread Dorian Hoxha
Note that you're joining with User, which I don't want. Only the "like" is needed. I'll try to change it to only query/join the like. On Thursday, November 10, 2016 at 10:32:45 AM UTC+1, Dorian Hoxha wrote: > > So I have: > > class Thing(): > current_user_like = relationship(Like) > > class