【问题标题】:How to use the flag readOnly in Doctrine 2?如何在 Doctrine 2 中使用标志 readOnly?
【发布时间】:2018-02-01 15:28:54
【问题描述】:

一个教义entity可以有标志readOnly

readOnly这个标志应该怎么用?

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

【问题讨论】:

    标签: doctrine-orm annotations entity


    【解决方案1】:

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

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

    【讨论】:

      猜你喜欢
      • 2021-01-28
      • 2012-01-10
      • 1970-01-01
      • 2014-10-04
      • 2011-03-27
      • 1970-01-01
      • 2011-12-06
      • 1970-01-01
      相关资源
      最近更新 更多