Как добавить комментарий в таблицу «один ко многим» doctrine 2.0 - PullRequest
0 голосов
/ 10 февраля 2020

Я хочу добавить комментарий к столбцу в таблице, я подготовил базовые c столбцы.

Как добавить комментарий для сущности, имеющей отношение "многие к одному" или "один ко многим"?

namespace Console\Entity;

/**
 * @Entity(repositoryClass="Console\Repository\UserMessage")
 * @Table(name="user_message")
 * @HasLifecycleCallbacks
 */
class UserMessage {

    /**
     * @Id 
     * @GeneratedValue 
     * @Column(type="integer")
     */
    protected $id;

    /**
     * @ManyToOne(targetEntity="Console\Entity\Message", cascade={"all"})
     */
    protected $message;

    /**
     * @Column(name="is_read", type="boolean",options={"comment":"Is Read"})
     */
    protected $isRead = false;
...