Reputation: 12306
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.
Upvotes: 2
Views: 1628
Reputation: 1474
You have to include the coments
section within the options
section at the table label. Given example:
Acme\DemoBundle\Entity\User:
type: entity
table: users
options:
comment: 'Table comment'
fields:
field1:
type: field_type
nullable: [true|false]
options:
comment: 'Field comment'
column: table_column
Be careful with indentations.
Tested with Symfony 2.6.6, Doctrine 2.5.4
Upvotes: 2
Reputation: 2507
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.
Upvotes: 1