From a765f2e3b65d65473bdf94724b885f16574ff5f0 Mon Sep 17 00:00:00 2001 From: Christian Stoller Date: Tue, 20 Aug 2013 11:17:04 +0200 Subject: [PATCH] added yaml mapping documentation of uniqueConstraint --- docs/en/reference/yaml-mapping.rst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/en/reference/yaml-mapping.rst b/docs/en/reference/yaml-mapping.rst index bc6c64c8f..1d7f8b17a 100644 --- a/docs/en/reference/yaml-mapping.rst +++ b/docs/en/reference/yaml-mapping.rst @@ -114,4 +114,22 @@ of several common elements: Be aware that class-names specified in the YAML files should be fully qualified. +Reference +~~~~~~~~~~~~~~~~~~~~~~ + +Unique Constraints +------------------ + +It is possible to define unique constraints by the following declaration: + +.. code-block:: yaml + + # ECommerceProduct.orm.yml + ECommerceProduct: + type: entity + fields: + # definition of some fields + uniqueConstraints: + search_idx: + columns: [ name, email ]