From f87a45cb2118884978dc7a0a59d4a45a612ce811 Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Tue, 6 Jul 2021 19:00:04 +0200 Subject: [PATCH 1/2] Adding `fields` to Index I guess this was just forgotten here. Wording is taken from https://www.doctrine-project.org/projects/doctrine-orm/en/2.9/reference/annotations-reference.html#index --- docs/en/reference/attributes-reference.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/en/reference/attributes-reference.rst b/docs/en/reference/attributes-reference.rst index c5ccb4bacea..f3660324a6a 100644 --- a/docs/en/reference/attributes-reference.rst +++ b/docs/en/reference/attributes-reference.rst @@ -427,7 +427,9 @@ has meaning in the ``SchemaTool`` schema generation context. Required attributes: - **name**: Name of the Index -- **columns**: Array of columns. +- **fields**: Array of fields. Exactly one of **fields, columns** is required. +- **columns**: Array of columns. Exactly one of **fields, columns** is required. + Optional attributes: From 068eeb9b0aed3c5c64388c502855db841f53b9c3 Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Thu, 8 Jul 2021 00:17:50 +0200 Subject: [PATCH 2/2] Update attributes-reference.rst --- docs/en/reference/attributes-reference.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/en/reference/attributes-reference.rst b/docs/en/reference/attributes-reference.rst index f3660324a6a..a66c5a0c4eb 100644 --- a/docs/en/reference/attributes-reference.rst +++ b/docs/en/reference/attributes-reference.rst @@ -448,6 +448,7 @@ Basic example: #[Entity] #[Index(name: "category_idx", columns: ["category"])] + #[Index(name: "brand_idx", fields: ["brand"])] class ECommerceProduct { }