diff --git a/docs/en/reference/transactions-and-concurrency.rst b/docs/en/reference/transactions-and-concurrency.rst index 3c8cfe33b..1b79adc57 100644 --- a/docs/en/reference/transactions-and-concurrency.rst +++ b/docs/en/reference/transactions-and-concurrency.rst @@ -187,30 +187,68 @@ has been modified by someone else already. You designate a version field in an entity as follows. In this example we'll use an integer. -.. code-block:: php +.. configuration-block:: - + + + + + + .. code-block:: yaml + + User: + type: entity + fields: + version: + version: + type: integer Alternatively a datetime type can be used (which maps to a SQL timestamp or datetime): -.. code-block:: php +.. configuration-block:: - + + + + + + .. code-block:: yaml + + User: + type: entity + fields: + version: + version: + type: datetime Version numbers (not timestamps) should however be preferred as they can not potentially conflict in a highly concurrent