diff --git a/docs/en/reference/annotations-reference.rst b/docs/en/reference/annotations-reference.rst index 19e9e8b70..7b59aa678 100644 --- a/docs/en/reference/annotations-reference.rst +++ b/docs/en/reference/annotations-reference.rst @@ -37,6 +37,7 @@ Index - :ref:`@ColumnResult ` - :ref:`@Cache ` - :ref:`@ChangeTrackingPolicy ` +- :ref:`@CustomIdGenerator ` - :ref:`@DiscriminatorColumn ` - :ref:`@DiscriminatorMap ` - :ref:`@Embeddable ` @@ -233,6 +234,30 @@ Example: */ class User {} +.. _annref_customidgenerator: + +@CustomIdGenerator +~~~~~~~~~~~~~~~~~~~~~ + +This annotations allows you to specify a user-provided class to generate identifiers. This annotation only works when both :ref:`@Id ` and :ref:`@GeneratedValue(strategy="CUSTOM") ` are specified. + +Required attributes: + +- **class**: name of the class which should extend Doctrine\ORM\Id\AbstractIdGenerator + +Example: + +.. code-block:: php + +