Hi, I have a transaction in which a duplicate key exception is being thrown by MySQL. I assume this happens when I try to do a save. The problem is that before the save, I do a destroy on another object as part of the transaction. Catching the exception by doing this, User.transaction do begin objA.destroy objB.save <-- causing exception rescue Exception => exc flash[:notice] = .... end end does not rollback the destroy. Any help would be appreciated. Thanks, Sam -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---