On Aug 10, 2007, at 3:18 AM, Andy Hird wrote:
> > because it's trying to execute the sql: UPDATE account_stuff SET > credit=? > > because I assume account_stuff has no primary key (updates to > account_ids specify a where clause). > > How can I get the above to work? I assume the join in the mapper needs > to specify something else? Is it possible? > one interesting thing here is that i think you've found the oldest bug in SQLAlchemy ever. so thats fixed in the trunk / 0.3 branch, the bug being that it was trying to issue an UPDATE on a table which has no primary keys. but that doesn't fix your problem...because if you use the latest SQLAlchemy in the trunk or 0.3 branch, now it will just skip the "account_stuff" table altogether. you just have to put "primary_key=True" on the account_stuff.account_id column, and then it will work. now, if theres a reason you can't have a primary key on account_stuff.account_id, id be interested to hear what that is. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---