{"action":"closed","issue":{"url":"https://api.github.com/repos/typeorm/typeorm/issues/170","repository_url":"https://api.github.com/repos/typeorm/typeorm","labels_url":"https://api.github.com/repos/typeorm/typeorm/issues/170/labels{/name}","comments_url":"https://api.github.com/repos/typeorm/typeorm/issues/170/comments","events_url":"https://api.github.com/repos/typeorm/typeorm/issues/170/events","html_url":"https://github.com/typeorm/typeorm/issues/170","id":198547390,"number":170,"title":"Allow transaction nesting","user":{"login":"errorx666","id":1048542,"avatar_url":"https://avatars0.githubusercontent.com/u/1048542?v=3","gravatar_id":"","url":"https://api.github.com/users/errorx666","html_url":"https://github.com/errorx666","followers_url":"https://api.github.com/users/errorx666/followers","following_url":"https://api.github.com/users/errorx666/following{/other_user}","gists_url":"https://api.github.com/users/errorx666/gists{/gist_id}","starred_url":"https://api.github.com/users/errorx666/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/errorx666/subscriptions","organizations_url":"https://api.github.com/users/errorx666/orgs","repos_url":"https://api.github.com/users/errorx666/repos","events_url":"https://api.github.com/users/errorx666/events{/privacy}","received_events_url":"https://api.github.com/users/errorx666/received_events","type":"User","site_admin":false},"labels":[{"id":333605716,"url":"https://api.github.com/repos/typeorm/typeorm/labels/question","name":"question","color":"cc317c","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-01-03T19:18:51Z","updated_at":"2017-07-04T06:09:53Z","closed_at":"2017-07-04T06:09:53Z","body":"(I'm currently using the SQLite driver and I'm not sure if this is a driver-specific limitation.)\r\n\r\nI'm writing code where a number of functions accept an `EntityManager` instance, begin a transaction, and perform operations.  Some of these functions call each other, passing the current transaction as the entityManager.\r\n\r\nThis fails, though, because whenever the innermost transaction finishes, the flag for \"transaction in progress\" is cleared, and the next commit or rollback throws a `TransactionNotStartedError`.\r\n\r\nPer [the SQLite documentation](https://www.sqlite.org/lang_savepoint.html) nested transactions _are_ supported in SQLite using `SAVEPOINT`...`RELEASE` (in place of `BEGIN`...`COMMIT`).\r\n\r\nI'm not sure what the level of effort for this would be, but nested transactions would be extremely useful to me."}}
{"actor":{"display_login":"pleerock"}}