Le mercredi 19 décembre 2007 15:32, maxi a écrit : > Then, I do a simple query: > > cust = session.query(Customer).get(1) > > but, when I want use.... > > cust.selected = True > > An exception ocurr, the cust object have not 'selected' attribute
__init__ is not called when objects are fetched from the DB. http://www.sqlalchemy.org/trac/wiki/FAQ#whyisntmy__init__calledwhenIloadobjects -- Bertrand Croq ___________________________________________________________________ Net-ng Tel : +33 (0)223 21 21 53 14, rue Patis Tatelin Fax : +33 (0)223 21 21 60 Bâtiment G Web : http://www.net-ng.com 35000 RENNES e-mail: [EMAIL PROTECTED] FRANCE --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---