Actually that was a bit too early but I tracked the problem down to the
many-to-many relationship. Parameters are only interpolated (e.g.
%(param_1)s) for the primaryjoin to the secondary table. Is there a
technique to force relationship() to interpolate a parameter between the
1st and 3rd table instead of using only table.column=table.column?


On Thu, Dec 5, 2013 at 10:58 AM, Adrian Schreyer
<adrian.schre...@gmail.com>wrote:

> 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.

Reply via email to