Actually, I meant if not has_identity(instance) then I am guaranteed it is an add, correct?
Kent On Oct 22, 5:56 pm, Kent <k...@retailarchitects.com> wrote: > It looks like > if has_identity(instance), then I am guaranteed it is an add, can you > confirm this is accurate? > > Thanks, > Kent > > On Oct 22, 5:39 pm, Kent <k...@retailarchitects.com> wrote: > > > I am using a SessionExtension. > > > The docs state for after_attach(session, instance): > > Execute after an instance is attached to a session. > > This is called after an add, delete or merge. > > > The trouble is, how can I tell if this is an add, delete (or merge)? > > > I cannot test "instance in session.new" because it hasn't been added > > to session.new yet on an add. > > > Thanks in advance, > > Kent > > -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.