Search code examples
phpormredbean

Do you have to call R::freeze() in every script when using Redbean PHP ORM?


Calling R::freeze() does not store any new data in the database (to my knowledge), how would a php script executed at a later date be aware that I called freeze() when I built the database? Should I be using freeze at the start of every one of my php scripts which use redbean?


Solution

  • Yes, it should be in the start of the script on every page that uses Redbean. I just reviewed the code, and there is no changes made anywhere that change it permanently. That being said, you have two options, at the start of every page, call R::freeze() -OR- edit rb.php around line 1380 and change private $isFrozen=false; to private $isFrozen=true;.