DDC-3269: [GH-1120] [DDC-3205] Metadata info #4043

Closed
opened 2026-01-22 14:34:15 +01:00 by admin · 7 comments
Owner

Originally created by @doctrinebot on GitHub (Aug 23, 2014).

Originally assigned to: @kimhemsoe on GitHub.

Jira issue originally created by user @doctrinebot:

This issue is created automatically through a Github pull request on behalf of dantleech:

Url: https://github.com/doctrine/doctrine2/pull/1120

Message:

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.:

$ php app/console doctrine:mapping:info "Sulu\Bundle\ContactBundle\Entity\Count"
</ins>-------------------------------<ins>-----------------------------------------------------------------------------------------------</ins>
| Field                         | Value                                                                                         |
<ins>-------------------------------</ins>-----------------------------------------------------------------------------------------------<ins>
| 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                                                                                       |
</ins>-------------------------------<ins>-----------------------------------------------------------------------------------------------</ins>

Originally created by @doctrinebot on GitHub (Aug 23, 2014). Originally assigned to: @kimhemsoe on GitHub. Jira issue originally created by user @doctrinebot: This issue is created automatically through a Github pull request on behalf of dantleech: Url: https://github.com/doctrine/doctrine2/pull/1120 Message: 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<ins>). 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" </ins>-------------------------------<ins>-----------------------------------------------------------------------------------------------</ins> | Field | Value | <ins>-------------------------------</ins>-----------------------------------------------------------------------------------------------<ins> | 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 | </ins>-------------------------------<ins>-----------------------------------------------------------------------------------------------</ins> ```
admin added the Bug label 2026-01-22 14:34:15 +01:00
admin closed this issue 2026-01-22 14:34:15 +01:00
Author
Owner

@doctrinebot commented on GitHub (Aug 23, 2014):

@doctrinebot commented on GitHub (Aug 23, 2014): - is duplicated by [DDC-3357: [GH-1165] [DDC-3205] #1120 - metadata info command](http://www.doctrine-project.org/jira/browse/DDC-3357)
Author
Owner

@doctrinebot commented on GitHub (Oct 19, 2014):

Comment created by @doctrinebot:

A related Github Pull-Request [GH-1120] was assigned:
https://github.com/doctrine/doctrine2/pull/1120

@doctrinebot commented on GitHub (Oct 19, 2014): Comment created by @doctrinebot: A related Github Pull-Request [GH-1120] was assigned: https://github.com/doctrine/doctrine2/pull/1120
Author
Owner

@doctrinebot commented on GitHub (Oct 19, 2014):

Comment created by @doctrinebot:

A related Github Pull-Request [GH-1165] was assigned:
https://github.com/doctrine/doctrine2/pull/1165

@doctrinebot commented on GitHub (Oct 19, 2014): Comment created by @doctrinebot: A related Github Pull-Request [GH-1165] was assigned: https://github.com/doctrine/doctrine2/pull/1165
Author
Owner

@doctrinebot commented on GitHub (Oct 19, 2014):

Comment created by @doctrinebot:

A related Github Pull-Request [GH-1120] was closed:
https://github.com/doctrine/doctrine2/pull/1120

@doctrinebot commented on GitHub (Oct 19, 2014): Comment created by @doctrinebot: A related Github Pull-Request [GH-1120] was closed: https://github.com/doctrine/doctrine2/pull/1120
Author
Owner

@doctrinebot commented on GitHub (Oct 20, 2014):

Comment created by @doctrinebot:

A related Github Pull-Request [GH-1165] was closed:
https://github.com/doctrine/doctrine2/pull/1165

@doctrinebot commented on GitHub (Oct 20, 2014): Comment created by @doctrinebot: A related Github Pull-Request [GH-1165] was closed: https://github.com/doctrine/doctrine2/pull/1165
Author
Owner

@doctrinebot commented on GitHub (Oct 20, 2014):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Oct 20, 2014): Issue was closed with resolution "Fixed"
Author
Owner

@doctrinebot commented on GitHub (Oct 20, 2014):

Comment created by @kimhemsoe:

Fixed by https://github.com/doctrine/doctrine2/pull/1165

@doctrinebot commented on GitHub (Oct 20, 2014): Comment created by @kimhemsoe: Fixed by https://github.com/doctrine/doctrine2/pull/1165
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#4043