[storm] How soon after an insert will get_insert_identity be called?
James Henstridge
james at jamesh.id.au
Tue Sep 29 03:17:28 BST 2009
On Tue, Sep 29, 2009 at 2:22 AM, Jason Baker <jbaker at zeomega.com> wrote:
> I'm trying to track down a nasty LostObjectError problem that the Oracle
> back end is having.
> Suppose I insert an object (by adding it and then flushing). My
> understanding is that the flush operation will run the get_insert_identity
> query if all of the primary keys aren't filled in. Is it safe to assume
> that get_insert_identity will only be called within the same transaction as
> it was inserted? Or can it be called outside that transaction?
It gets called right after insert happens, if it gets called at all.
If Connection.execute() fills in the primary_variables for the
statement, then it won't be called at all (this is the mode that the
PostgreSQL and MySQL adapters work in).
James.
More information about the storm
mailing list