DDC-1605: No documentation about the usage of indexes with YAML and XML #2016

Open
opened 2026-01-22 13:37:40 +01:00 by admin · 0 comments
Owner

Originally created by @doctrinebot on GitHub (Jan 16, 2012).

Originally assigned to: @Ocramius on GitHub.

Jira issue originally created by user naitsirch:

I am missing documentation about how to handle indexes in YAML and XML definition files. I had to search in the code to learn how to do that.
Please add some documentation about it.

This issue is related to #DDC-160 where the reporter asked for documentation about indexes in annotation mapping.

EDIT:
Maybe an example how I have done it with YAML would be helpful for others:

User:
  type: entity
  fields:
    id:
      id: true
      type: integer
      generator:
        strategy: IDENTITY
    email:
      type: string
      length: 150
      unique: true
    active:
      type: boolean
  indexes:
    indexActiveField: { name: idx*user*active, columns: [ active ] }

indexActiveField is the name of the index used by doctrine and idx*user*active is the name of the index in the database. The rest should be clear.

Originally created by @doctrinebot on GitHub (Jan 16, 2012). Originally assigned to: @Ocramius on GitHub. Jira issue originally created by user naitsirch: I am missing documentation about how to handle indexes in YAML and XML definition files. I had to search in the code to learn how to do that. Please add some documentation about it. This issue is related to #[DDC-160](http://www.doctrine-project.org/jira/browse/DDC-160) where the reporter asked for documentation about indexes in annotation mapping. EDIT: Maybe an example how I have done it with YAML would be helpful for others: ``` User: type: entity fields: id: id: true type: integer generator: strategy: IDENTITY email: type: string length: 150 unique: true active: type: boolean indexes: indexActiveField: { name: idx*user*active, columns: [ active ] } ``` `indexActiveField` is the name of the index used by doctrine and `idx*user*active` is the name of the index in the database. The rest should be clear.
admin added the DocumentationInvalid labels 2026-01-22 13:37:40 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#2016