withTransaction in a collection loop

H

Heisman77

Guest
Say I have a collection:

foo.each { foo ->

do something with foo to save it
}

How do I make it so that if one of the foo records fails on a save that the entire loop does not stop. I think it is withTransaction but I am stuck.
 
Top