drak/doctrine1 — pull request #17 by timmipetit (2014-05-20 09:58:05+00:00)
Title: Fix race condition in Versionable behaviour

When 2 requests try to update a versionable model at the same time, a race condition occurs. If the current version-number of 42, they will both try to update it to version 43. One of these requests will fail, due the uniqueness constraint on the Version table (id-version should be unique).

This PR wraps the versionable update in a transaction that locks the version table