如何在 Doctrine 2 中使用 readOnly 标志?

How to use the flag readOnly in Doctrine 2?

学说 entity 可以有标志 readOnly

标志 readOnly 应该如何使用?

/** @Entity(readOnly) */ <-- like this?
/** @Entity(readOnly=true) */ <-- or like this?
class User
{
    //...
}

根据this answer and this issue,后者是要走的路:

/** @Entity(readOnly=true) */