Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use the flag readOnly in Doctrine 2?

A Doctrine entity can have the flag readOnly.

How should the flag readOnly be used?

/** @Entity(readOnly) */ <-- like this?
/** @Entity(readOnly=true) */ <-- or like this?
class User
{
    //...
}
like image 884
automatix Avatar asked Sep 13 '25 03:09

automatix


1 Answers

According to this answer and this issue, the latter is the way to go:

/** @Entity(readOnly=true) */
like image 90
Frosty Z Avatar answered Sep 16 '25 06:09

Frosty Z



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!