Welcome Guest, Not a member yet? Register   Sign In
CI4.0rc3 + calling model->save() on unchanged entity causes critical error
#1

it seems that calling a model's save() method on an unchanged instance of an Entity, causes
CRITICAL - 2019-11-24 17:57:19 --> You must use the "set" method to update an entry.
#0 /php/system/Database/BaseBuilder.php(2342): CodeIgniter\Database\BaseBuilder->validateUpdate()
#1 /php/system/Model.php(846): CodeIgniter\Database\BaseBuilder->update()
#2 /php/system/Model.php(533): CodeIgniter\Model->update(Array, Array)


The error message here does not help at all.

I was wondering if it is a bug? My suggestions would be:
  • trying to save an unchanged entity should not cause error at all, or
  • if it causes an error / exception, it should return a helpful message.
Reply


Messages In This Thread
CI4.0rc3 + calling model->save() on unchanged entity causes critical error - by bivanbi - 11-24-2019, 10:16 AM



Theme © iAndrew 2016 - Forum software by © MyBB