From b785a8dc02c4f5961cbc3d017ca2ae28542d8e1b Mon Sep 17 00:00:00 2001 From: Erik van Velzen Date: Mon, 18 Jul 2016 18:16:34 +0200 Subject: [PATCH] Add @CustomIdGenerator to documentation --- docs/en/reference/annotations-reference.rst | 25 +++++++++++++++++++++ 1 file changed, 25 insertions(+) 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 + +