On Mar 25, 2008, at 10:45 AM, vkuznet wrote:
> > Hi Mike, > now everything seems to work fine. Many thanks to you and all others > who contribute to the threads and solving the problem. > But, there is a but. > > The schema is present everywhere, in Table and in Table object of the > column and foreign keys, however the resulting queries seems slightly > mixed with table.column and schema.table.column when I used foreign > keys and their parent/column. Here is example: > > SELECT DISTINCT primarydataset.name AS primarydataset_name FROM > cms_dbs_prod_global.processeddataset JOIN cms_dbs_prod_global.block ON > processeddataset.id = block.dataset JOIN > cms_dbs_prod_global.primarydataset ON processeddataset.primarydataset > = primarydataset.id WHERE block.path LIKE :block_path_1 > > here "cms_dbs_prod_global" is a schema, while processeddataset, > primarydataset, block are tables > I think in some cases SQLAlchemy uses "name" and in another "fullname" > while doing joins. > thats current defined behavior; the "schema" is used only when a table is evaulated in a FROM context, not in a "column qualification" context. its easy enough to change but I'd want to ensure that no current databases break when all columns are qualified with schema + tablename. do you actually have a case where identical tablenames from different schemas are conflicting ? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
