Michael Bayer wrote:
> On Sep 12, 2008, at 12:49 PM, Werner F. Bruhin wrote:
>
>   
>> Michael Bayer wrote:
>> ...
>>     
>>> Now, if you actually want to get back objects for the outerjoins,  
>>> youd
>>> say somehting like:
>>>
>>> sess.query(SomeClass, SomeOtherClass, SomeThirdClass)
>>>
>>>       
>> On Firebird when I do this I get a "cross join" (according to the  
>> Helen
>> Borrie book) which in my case gives me 280 rows instead of the 8 :-( .
>>     
>
> what is the SQL being emitted ?
>   
SELECT cellarbook.winenames AS cellarbook_winenames, 
cellarbook.namesandvar AS cellarbook_namesandvar, 
cellarbook.cellarbookid AS cellarbook_cellarbookid, cellarbook.winename 
AS cellarbook_winename, cellarbook.winename2 AS cellarbook_winename2, 
cellarbook.barrique AS cellarbook_barrique, cellarbook.externalref AS 
cellarbook_externalref, cellarbook.created AS cellarbook_created, 
cellarbook.updated AS cellarbook_updated, cellarbook.fk_countryid AS 
cellarbook_fk_countryid, cellarbook.fk_regionid AS 
cellarbook_fk_regionid, cellarbook.fk_subregionid AS 
cellarbook_fk_subregionid, cellarbook.fk_vineyardid AS 
cellarbook_fk_vineyardid, cellarbook.fk_supplierid AS 
cellarbook_fk_supplierid, cellarbook.fk_producerid AS 
cellarbook_fk_producerid, cellarbook.fk_distillerid AS 
cellarbook_fk_distillerid, cellarbook.fk_qualityid AS 
cellarbook_fk_qualityid, cellarbook.fk_drinktypeid AS 
cellarbook_fk_drinktypeid, cellarbook.notes AS cellarbook_notes, 
cellarbook.fk_winefamid AS cellarbook_fk_winefamid, cellarbook.variety 
AS cellarbook_variety, cbvintage.cbvintageid AS cbvintage_cbvintageid, 
cbvintage.vintage AS cbvintage_vintage, cbvintage.created AS 
cbvintage_created, cbvintage.updated AS cbvintage_updated, 
cbvintage.notes AS cbvintage_notes, cbvintage.alcohol AS 
cbvintage_alcohol, cbvintage.avgscore AS cbvintage_avgscore, 
cbvintage.avgscore2 AS cbvintage_avgscore2, cbvintage.fk_cellarbookid AS 
cbvintage_fk_cellarbookid, cbvintage.fk_wineinfoid AS 
cbvintage_fk_wineinfoid, cbvintage.fk_spirinfoid AS 
cbvintage_fk_spirinfoid, cbbottle.quantityonhand AS 
cbbottle_quantityonhand, cbbottle.purchasevalueonhand AS 
cbbottle_purchasevalueonhand, cbbottle.currentvalueonhand AS 
cbbottle_currentvalueonhand, cbbottle.cbbottleid AS cbbottle_cbbottleid, 
cbbottle.maturityfirst AS cbbottle_maturityfirst, cbbottle.maturitybest 
AS cbbottle_maturitybest, cbbottle.maturitypast AS 
cbbottle_maturitypast, cbbottle.storagelocation AS 
cbbottle_storagelocation, cbbottle.quantitypurchased AS 
cbbottle_quantitypurchased, cbbottle.quantityconsumed AS 
cbbottle_quantityconsumed, cbbottle.lastpurchaseprice AS 
cbbottle_lastpurchaseprice, cbbottle.avgpurchaseprice AS 
cbbottle_avgpurchaseprice, cbbottle.currentvalue AS 
cbbottle_currentvalue, cbbottle.isactive AS cbbottle_isactive, 
cbbottle.printlabel AS cbbottle_printlabel, cbbottle.remarks AS 
cbbottle_remarks, cbbottle.created AS cbbottle_created, cbbottle.updated 
AS cbbottle_updated, cbbottle.fk_cbvintageid AS cbbottle_fk_cbvintageid, 
cbbottle.fk_containerid AS cbbottle_fk_containerid, cbbottle.fk_cellarid 
AS cbbottle_fk_cellarid, cbbottle.fk_sealtypeid AS 
cbbottle_fk_sealtypeid, cbbottle.barcode AS cbbottle_barcode, 
cbbottle.minqoh AS cbbottle_minqoh, cbbottle.inetrefcode AS 
cbbottle_inetrefcode, cbbottle.inetrefsource AS cbbottle_inetrefsource
FROM cellarbook, cbvintage, cbbottle

Werner

--~--~---------~--~----~------------~-------~--~----~
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