Never mind, the problem was that I specified the clause in a secondaryjoin and not in the primaryjoin of the relationship().
On Thu, Dec 5, 2013 at 10:44 AM, Adrian <adrian.schre...@gmail.com> wrote: > Hi All, > > I have a few partitioned tables in my PostgreSQL database but I do not > know yet how to make the ORM relationship() with partition > constraint-exclusion<http://www.postgresql.org/docs/9.3/static/ddl-partitioning.html#DDL-PARTITIONING-CONSTRAINT-EXCLUSION> > on > the instance level. Constraint-exclusion does not work with joins and > requires scalar values - the problem is that I would need to add an > additional WHERE clause to the primaryjoin (which adds the partition key) > if the relationship is accessed from the* instance level*, e.g. > user.addresses. Is there a mechanism in relationship() to distinguish > between class-based joins (User.addresses) and instance-level access? > > -- > You received this message because you are subscribed to a topic in the > Google Groups "sqlalchemy" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/sqlalchemy/ov-mYWA7XAM/unsubscribe. > To unsubscribe from this group and all its topics, 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/groups/opt_out. > -- 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/groups/opt_out.