On 7/26/07, Jamu Kakar <[EMAIL PROTECTED]> wrote:
> > ps Any good feel for when to use AutoReload?
>
> Generally speaking, you shouldn't really need to use AutoReload.
> Storm flushes changes to the database when necessary and mostly works
> without any manual store.flush() calls being necessary.  One of the
> purposes of AutoReload is for cases where you need an ID to be flushed
> to the database right away so that a trigger or stored procedure gets
> run.

I think that's more the purpose of explicit .flush() calls that
AutoReload, Jamu. It's kind of the opposite: AutoReload is for when
you want to get the ID from the database, not put the ID into the
database.

Our biggest use case for AutoReload is when you've got an object which
has *database-generated* values as attributes, like a sequence ID or
something, which you actually want to access from Python code soon
after you create the object. Setting the attribute to AutoReload will
cause that attribute to be loaded directly from the database next time
the attribute is accessed -- so you can instantly see
database-generated sequence IDs or trigger-modified data, and so
forth.


-- 
Christopher Armstrong
International Man of Twistery
http://radix.twistedmatrix.com/
http://twistedmatrix.com/
http://canonical.com/

-- 
storm mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/storm

Reply via email to