hi - I'd have to create a test case to confirm this, but are you on 0.5 latest ?
On Oct 25, 2008, at 3:44 AM, ershadul.hoque wrote: > > thanks a lot for your solution. But i have been caught by the > following error. Please help me. bye > > (OperationalError) (1054, "Unknown column 'journals.id' in 'on > clause'") u'SELECT anon_1.journals_id AS anon_1_journals_id, > anon_1.journals_amount AS anon_1_journals_amount, > anon_1.journals_entry_date AS anon_1_journals_entry_date, > anon_1.journals_type AS anon_1_journals_type, anon_1.journals_party_id > AS anon_1_journals_party_id, anon_1.`journals_party_role_ id` AS > `anon_1_journals_party_role_ id` \nFROM (SELECT journals.id AS > journals_id, journals.amount AS journals_amount, journals.entry_date > AS journals_entry_date, journals.type AS journals_type, > journals.party_id AS journals_party_id, journals.`party_role_ id` AS > `journals_party_role_ id` \nFROM journals \n LIMIT 2, 6) AS anon_1 > INNER JOIN ledgers ON journals.id = ledgers.journal_id' [] > > On Oct 23, 7:03 am, Michael Bayer <[EMAIL PROTECTED]> wrote: >> On Oct 23, 2008, at 8:58 AM, ershadul.hoque wrote: >> >> >> >> >> >>> journals table has id column >>> ledgers table has journal_id column >> >>> consider that: journals table is mapped in >>> Class Journal(object): >>> pass >>> and similarly ledgers as : >>> Class Ledger(object): >>> pass >> >>> Now i want to run this query ( it runs successfully in mysql): >> >>> select * from (select * from journals limit 2,6) as some_journal >>> inner >>> join ledgers >>> on some_journal.id = ledgers.journal_id >> >>> please help me. >> >> sess.query(Journal).limit(6).offset(2).from_self().join((Ledger, >> Journal.id==Ledger.journal_id)) > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---