Doctrine orm 如何在条令2中使用只读标志?

Doctrine orm 如何在条令2中使用只读标志?,doctrine-orm,annotations,entity,Doctrine Orm,Annotations,Entity,条令可以有标志只读 如何使用标志readOnly /** @Entity(readOnly) */ <-- like this? /** @Entity(readOnly=true) */ <-- or like this? class User { //... } /**@Entity(readOnly)*/根据和,后一种方法是: /** @Entity(readOnly=true) */

条令可以有标志
只读

如何使用标志
readOnly

/** @Entity(readOnly) */ <-- like this?
/** @Entity(readOnly=true) */ <-- or like this?
class User
{
    //...
}
/**@Entity(readOnly)*/根据和,后一种方法是:

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