I am trying to implement right join in sqlalchemy but did not find any appropriate solution.
I have tried the following::
=> is_outer = True (gives left outer join)
=> outerjoin
I am trying to implement right join in sqlalchemy but did not find any appropriate solution.
I have tried the following::
=> is_outer = True (gives left outer join)
=> outerjoin
Actually, right outer join does not exist in sqlAlchemy so you need to swap the table and use outer_join which is an alternate to right outer join. I hope it may help you.
query(Address).outerjoin(User, Address.id == User.address_id)
OR
query(User).select_entity_from(Address).join(User, isouter=True)