On Dec 6, 2010, at 10:31 AM, Ian Thompson wrote:
> Hi,
>
> Apologies if this has been answered or doesn't make sense, I'm still
> just getting started here.
>
> Passing in an association proxy to the joinedload function doesn't
> seem to work, I have to use the original name. Is this the expected
> behaviour or am I doing something stupid?
Its expected, associationproxy objects are plain Python descriptors and don't
currently participate in the full range of semantics offered by mapped
attributes. Its something that could likely be supported eventually.
>
> class SomeTable(Base):
> blahs = association_proxy('foo_blahs', 'blah', creator=...,
> getset_factory=...)
>
> This doesn't work:
> session.query(SomeTable).options(joinedload(SomeTable.blahs))
>
> Have to do this:
> session.query(SomeTable).options(joinedload(SomeTable.foo_blahs))
>
> Thanks (and Hi)
>
> Ian
>
> --
> You received this message because you are subscribed to the Google Groups
> "sqlalchemy" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/sqlalchemy?hl=en.
>
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en.