Victor Bocharsky Victor Bocharsky - 1 month ago 11
YAML Question

How to add comment for table in yaml mapping format with Doctrine2

I need to add comment for whole table, not only for column, How can I do it with

yml
mapping format. I try next definition:

Acme\DemoBundle\Entity\User:
type: entity
table: users
comment: 'Users table'
options:
comment: 'Users table'


But it not work for table comment.

Answer

According to the annotations reference, it says only the column has an options attribute for comments. And that too is vendor specific. You need to check if your db supports it.

Check: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/annotations-reference.html#annref-column

Comments