-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Michael, thanks for the follow up.
On Apr 2, 2007, at 2:24 PM, Michael Bayer wrote: > I cant think of any reason why SA would be touching object attributes > which are not part of a mapping. I was mistaken; SA isn't touching them, but here's what's happening. For this particular class, we're using a mapper extension that defines populate_instance(). We use this to call our application- specific instance initialization stuff when the object is loaded from the database. Our populate_instance() checks the isnew flag and if this is true, it does not call our initialization stuff. Now, I don't really see the isnew flag documented, so I assumed it was only called when the object was initially loaded from the database, but apparently it's true /every/ time the object is loaded. So when I session.expire() it and then subsequently load it, populate_instance() gets called with isnew=True. The causes our application-specific initialization stuff to get called on an existing MailList object, and this is what blows away our lock attribute. I guess that if the documentation for isnew in append_result() is the same as isnew in populate_instance() then indeed we'll need that extra check. Is that correct? I also appreciate all your other comments. I'm going to think about them some more, but I suspect going down some of those paths will require more pervasive changes to the code than I want to do at this point, so I'd like to see if I can get the above working first. Thanks, - -Barry -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin) iQCVAwUBRhG9hXEjvBPtnXfVAQKdXwP/b9Uohbz+ihduLY88G/Kbmhf0iRqDfLEe Mu1qDh3pHJ9jPJNhVE77mhV9khFUOLohUdcUyesj3nRBtciFYI6rGL5dBVWgAlOp /SVf5npulm1iKNshFhtYKr03oiuIkrlrhCQklAaUtzlZNmdpwrePm9W1Ap9o0hPn skbPJ0tywqY= =pAlb -----END PGP SIGNATURE----- --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---