On Jan 13, 2008, at 2:33 PM, Alexandre Conrad wrote:
>
> Ahh, good to hear. It would feel more natural to me. We'd expect that
> CatalogChannel's table is catalog_channel_table, specially when we
> earlier set mapper(CatalogChannel, catalog_channel_table). Plus, using
> tables makes me have extra imports in my code, which I didn't need
> until
> now because I'm only using mapped classes.
>
I came up with a very easy way to implement this which I'd like you to
try out in rev 4060. So far I've tested with a basic joined table
inheritance setup.
All you do is place class-mapped attributes directly in the join()
arguments along with strings. and thats it ! so it looks like:
session.query(Media).join(['catalog', CatalogChannel.channel])
The class-attributes can be freely intermixed with the existing string-
based attributes.
Technically you can place any class-attribute you want in there but it
only makes sense if it can be joined against the immediately preceding
attribute or parent mapper. I'm not sure if that restriction could
change eventually.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---