I'm glad it's there... I need it when doing a refresh where I need to keep the current objects (because I've written other things on the object that the orm doesn't know about, so I need to keep the original instance).

Restating: it's there because its original intent was to deal with expiration of attributes, whereas now, there are better ways to accomplish expiration and so populate_existing()'s usefulness now is only really the fact that it reuses existing objects. Does that sound accurate?

On 10/25/2011 2:39 PM, Michael Bayer wrote:
its used when we use query._get() to refresh an existing instance, and if i 
take it out some tests fail, so its accomplishing something.

that said, those operations which use it could certainly set autoflush 
distinctly, because if i were to use populate_existing() on in userspace (which 
I don't, the feature was added for 0.1 users before we knew how to expire 
things) I'd want it to autoflush first.   But for now the change would be 
backwards incompatible with some hypothetical app that is using it and expects 
pending changes to be erased.


On Oct 25, 2011, at 2:18 PM, Kent wrote:

Mike,
  What is the rationale for making populate_existing() skip the
autoflush?

Thanks,
Kent

--
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.


--
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.

Reply via email to