On May 2, 2007, at 7:56 PM, askel wrote:
> > Michael, > > transaction.account_id is not a primary key of transactions table. I > added fields I use for grouping to primary_key. Then I had to add > foreign_key argument to 'summary' relation() call. And finally it all > worked as expected. > > However, I noticed that it doesn't actually matter which fields I use > for primary_key or foreign_key. As long as I specify these parameters > and use _any_ fields as values things start working and that doesn't > smell good. > take a look at your SQL output with echo and make sure the queries make sense. that it works with arbitrary columns as pk/fk could just be due to particular data youre working with, but you definitely want to pick a proper candidate key for the rows of that selectable. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
