Quantcast
Channel: Spring Community Forums - Grails
Viewing all articles
Browse latest Browse all 40

withTransaction in a collection

$
0
0
Stuck on something...if I have a collection foo and I loop through that collection to do updates on each record in the loop, how do I make it so that each record in the collection is in it's own transaction? The goal is if record 1 in the collection fails on a save that record 2 will still be processed.

Would I use a withTransaction?

something like this

foo.each { line ->

foo.withTranaction{

}

}

Viewing all articles
Browse latest Browse all 40

Latest Images

Trending Articles



Latest Images