Michael Bayer wrote:
> I dont see where the "type" element youre mentioning is present in  
> this query.  if Media points to Catalog, thats the end of the story -  
> what is telling it about a "CatalogChannel" ?

Okay, okay Mike and Svilen. Of course ! I was thinking we could figure 
out that if a media being attached to a Catalog of type "channel", thus 
a CatalogChannel polymorphically speaking, would figure out that 
Media.query.join(["catalog", "channel"]) would automaticly join to the 
"channel" attribute of CatalogChannel. But of course, at this point 
we're still building up the query and are not on the ORM part. So we 
need to explicitly join tables between each other. Got it.

Anyway, my inital issue according to the subject's title, is that:

   .filter(Catalog.c.id==CatalogChannel.c.id)

generates the SQL query

   "catalogs.id = catalogs.id"

rather than the expected

   "catalogs.id = catalog_channels.id"

which

   .filter(Catalog.c.id==catalog_channel_table.c.id)

generates correctly when explcitly pointing the wanted table. Is that a 
bug Mike ?

Regards,
-- 
Alexandre CONRAD


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to