doctrine/doctrine2 — pull request #1120 by dantleech (2014-08-23 09:52:23+00:00)
Title: [DDC-3205] Metadata info

This PR adds support for showing the metadata for a single entity to the `orm:info` command.

- The output is formatted using the `TableHelper` if it is available (Symfony 2.4+). If the TableHelper is not available
it will format simply with `field: value`.
- Partial regex matches are accepted, e.g. `mapping:info Attraction`, `mapping:info Attraction.*`

E.g.:

````bash
$ php app/console doctrine:mapping:info "Sulu\Bundle\ContactBundle\Entity\Count"
+-------------------------------+-----------------------------------------------------------------------------------------------+
| Field | Value |
+-------------------------------+-----------------------------------------------------------------------------------------------+
| Name | Sulu\Bundle\TagBundle\Entity\Tag |
| Root entity name | Sulu\Bundle\TagBundle\Entity\Tag |
| Custom generator definition | None |
| Custom repository class | Sulu\Bundle\TagBundle\Entity\TagRepository |
| Mapped super class? | Empty |
| Embedded class? | Empty |
| Parent classes | Empty |
| Sub classes | Empty |
| Embedded classes | Empty |
| Named queries | Empty |
| Named native queries | Empty |
| SQL result set mappings | Empty |
| Identifier | ["id"] |
| Inheritance type | 1 |
| Discriminator column | None |
| Discriminator value | None |
| Discriminator map | Empty |
| Generator type | 4 |
| Table | {"name":"ta_tags"} |
| Composite identifier? | Empty |
| Foreign identifier? | Empty |
| Sequence generator definition | None |
| Table generator definition | None |
| Change tracking policy | 1 |
| Versioned? | None |
| Version field | None |
| Read only? | Empty |
| Entity listeners | Empty |
| Association mappings: | |
| creator | |
| fieldName | creator |
| targetEntity | Sulu\Bundle\SecurityBundle\Entity\User |
| joinColumns | [{"name":"idUsersCreator","referencedColumnName":"id","nullable":true,"onDelete":"SET NULL"}] |
| type | 2 |
| mappedBy | Null |
| inversedBy | Null |
| isOwningSide | 1 |
| sourceEntity | Sulu\Bundle\TagBundle\Entity\Tag |
| fetch | 2 |
| cascade | Empty |
| isCascadeRemove | Empty |
| isCascadePersist | Empty |
| isCascadeRefresh | Empty |
| isCascadeMerge | Empty |
| isCascadeDetach | Empty |
| sourceToTargetKeyColumns | {"idUsersCreator":"id"} |
| joinColumnFieldNames | {"idUsersCreator":"idUsersCreator"} |
| targetToSourceKeyColumns | {"id":"idUsersCreator"} |
| orphanRemoval | Empty |
| Field mappings: | |
| name | |
| fieldName | name |
| type | string |
| columnName | name |
| unique | 1 |
| created | |
| fieldName | created |
| type | datetime |
| columnName | created |
+-------------------------------+-----------------------------------------------------------------------------------------------+