On Feb 20, 2007, at 12:01 PM, Ali wrote:
> >>>> u = User(name='Ali') >>>> u.flush() >>>> r = Receipt(user_id=u.id) >>>> r.flush() >>>> r.user is u > True >>>> r.cancelled_user_id = u.id >>>> r.flush() >>>> r.cancelled_user is u > True oh sorry, i missed this one. when you say "r.cancelled_user_id = u.id", that will send the right SQL to the database but isnt going to change the "r.cancelled_user" property to anything unless you refresh ()/expire() the Receipt object. references: http://www.sqlalchemy.org/docs/ unitofwork.myt#unitofwork_api_flush_whatis http://www.sqlalchemy.org/trac/wiki/ FAQ#Isetthefoo_idattributeonmyinstanceto7butthefooattributeisstillNonesh ouldntithaveloadedFoowithid7 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
