class Child(Base): __tablename__ = 'child'
id = sa.Column(sa.Integer, primary_key=True) parent_id = sa.Column(sa.Integer, sa.ForeignKey('parent.id')) status = sa.Column(sa.Integer)
class Parent(Base): __tablename__ = 'parent'
id = sa.Column(sa.Integer, primary_key=True) children = orm.relationship('Child', lazy='selectin', omit_join=True, primaryjoin=lambda: sa.and_( Child.parent_id == Parent.id, Child.status != -1, ))Hello,Is anything special required to get omit_join to work on a relationship with a two-part primary join?
--SQLAlchemy -The Python SQL Toolkit and Object Relational MapperTo post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description.---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+...@googlegroups.com.To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy/1b4f96d4-cc4f-4f7a-8ae0-230967ca7db1%40googlegroups.com.