This is the first time I've come across this issue. When saving one of my models I get the error message: "This row has been marked read-only". Not sure why I'm getting this error and how to solve it. The stack trace didn't help me. How can I resolve this issue so I can save the record?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Having a row marked as read only can be the result from any of the following operations:
- The
Zend_Db_Select
query joined with another table setIntegrityCheck(false)
was set on the select object- One or more columns is the result of an evaluated expression
If any of the above conditions are true, then the resulting row object will be marked as read only, because Zend_Db cannot guarantee that all columns in the result reference the original parent table of the select object. Therefore any attempt to call update()
, save()
, or delete()
, on the row object will fail.
Some of this information is spread throughout the Zend_Db_Table reference, where if you search for integrity
you can see a number of instances where rows will be marked read only.
标签:
zend-framework