me wrote:
>
> 2] Using path to the joined column:
> query = query.option(defer("a.s1_relation.col1"), defer
> ("a.s1_alias_relation.col2"),...)
>
>
> 2
> Simply doesn't work for me (i.e. the columns i'm deferring are clearly
> in the echoed sql).

try not putting "a" in there.  defer() is based on an older usage of Query
that assumes one entity at the root, i.e.
s.query(SomeClass).options(defer("relation.somecol")).

> I also tried passing instrumented object attributes to defers like
> this: query = query.option(defer(S1.y), defer(S1Alias.x)) but that
> failed with an exception about e.g. S1 not being found in the mapper.
> I tried adding them to the query like this: query.add_entity(S1) but
> that didn't help.

needs a path from the "root":   defer(SomeClass.foo, FooClass.bar)


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to