Hi all,

I have a transactional session which save()s multiple objects to
multiple tables where each object potentially violates a unique
primary key or just a unique key constraint. At flush() time, MySQL
returns an IntegrityError which specifies the value of the offending
key and the key's number within its table (i.e. first key, second
key...), but I cannot from this information figure out which of my
objects is the culprit. Any suggestions on how to solve this problem?
Ideally, I would like to rollback() the whole transaction when such an
error occurs, regenerate the keys on the offending object, and repeat
until commit() succeeds.

Thanks, Simon

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