I have a library which is loading a model and then calling the delete function on the model and I run into the 'model is in readonly mode and can't modify data' exception. I don't have anywhere in my code where I'm making the model readonly. Is this a symptom of some other issue? I can get around it by setting the readonly property of the model after I load it in my library but not by setting the default value in the model itself - regardless I'd rather not have to explicitly set the property every time if at all possible. Is this something someone else has run into before?
Comments
$CI->load->model('my_model'); $record = $CI->my_model->find_one(array('id' => 1));