﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
28836	Not nesting version of @atomic decorator	Thomas Güttler	nobody	"Database transaction can't be nested.
Database transactions are ACID. And D stand for durability.

I think it is dangerous that the current implementation of @atomic falls back to savepoints, if
already inside a transaction.

I don't want to change the current default.

But I would like to have a decorator which raises an exception if the connection is already inside a transaction.

I don't care how the implementation looks like. I see two way:

 - a new method. For example @non_nesting_atomic
- a kwarg: For example @atomic(non_nesting=True)   with a default of ""False"" for backward compatibility.

What do you think?

"	Cleanup/optimization	closed	Database layer (models, ORM)	1.11	Normal	needsinfo			Unreviewed	0	0	0	0	0	0
