[email protected] wrote:
2) I noticed that whilst the rollback was successful. the sequence do
not get rolled back. IS this desired behaviour of DBIx::Class?

This is a postgres thing, not a DBIC thing.

And no, sequences don't get rolled back.

Consider, imagining sequence starts at 1:
A: {start trans, INSERT ROW (seq 2)}
B: {start trans, INSERT ROW (seq 3)}
Seq is now 3
B: {commit}
A: {rollback}?

If you roll the sequence back 1 as A rolled back, the sequence is 2, so when you next insert you have a duplicate seq (as B is committed).

Couldn't work, without keeping track of which previous sequence values had been rolled back. It'd also not be a sequence if you could ask for two values and the second was lower than the first :)

Cheers
t0m

_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]

Reply via email to