Hi again, I really must be missing something fundamental here as I
cannot seem to solve this problem:

I have a loop that queries one table (without any contraints) and
writes to a second table (with constraints). Here's what the loop
looks like in pseudo-code:

while True:
  1) query old table and create a work list
  2) while items are in the work list:
  2.1) create a new object
  2.2) save
  3) commit

I can wrap the save (2.2) and commit (3) in try/except blocks which
solves the IntegrityError exceptions at that point. The problem is
that I'm getting IntegrityError exceptions in the query section (1)
what seem to be deferred INSERTS from the commit (3).

How can I turn off the deferred inserts?

Mark

On Sep 25, 9:27 am, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Hi,  I have a newbie question:
>
> I'm parsing a log file in order to record login-times but I'm getting
> an IntegrityError on an insert during a query. Does this make sense?
> Even though I'm going a commit at the botton of the loop should I
> expect the INSERT to actually happen during a subsequent query?
>
> Thanks,
> Mark


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

Reply via email to