Monthly Archives: November 2016

Symfony Doctrine Concurrency

I used Optimistic-Locking here you can find the documentation: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/transactions-and-concurrency.html You can add in your entity the field version. Automatically doctrine will manage concurrency throwing an Exceprion. use Doctrine\ORM\Mapping as ORM; … /** * @var int * * @ORM\Column(name=”version”, type=”integer”, … Continue reading

Posted in Symfony | Tagged , , | Leave a comment

This is my solution to avoid constraint violation when you use Soft Delete Here is an interesting article that explain how unique index are treated by DB https://mariadb.com/kb/en/mariadb/getting-started-with-indexes/ The field deletedAt as Datetime with NULL value can’t be part of … Continue reading

Posted on by gherardobertini | Leave a comment