On Apr 26, 2007, at 2:44 AM, Andreas Jung wrote:
> > > --On 25. April 2007 07:13:19 -0400 Michael Bayer > <[EMAIL PROTECTED]> wrote: >> >> well i just noticed youre sticking an external table into your >> primaryjoin....but i see nothing there that implies the usage of a >> LEFT OUTER JOIN ? are you saying that you dont need the rows from >> AMH_View to be present ? how could SA possibly know that ? (if not, >> please send me the exact query being produced, and the exact query >> you think should be produced) > > > select ...from hierarchy H left join > arbeitsmittelheirarchy_arbeitsmittel_view AMH on AMH.idhierarchy = > H.id > where H.id = <current id> > i see no purpose for the view being in the condition here, it doesnt affect the returned rows ? (its a LEFT JOIN...matching rows from the view need not be present). unless, as i suspect, you want the view's columns in the columns clause and not those of "hierarchy" (which is why I asked for the full SQL, which i still dont have here). if this is the case, you want to make a new "non_primary" mapper mapping your class to view, and then create a normal eager load to that mapper. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---