model:
public class SomeModel
{
public $id; //Not nullable
public $fieldA; //Not nullable
public $fieldB; //Not nullable
.
.
.
controller:
public class SomeController
{
public function SomeAction()
{
$someModel = SomeModel::findFirst(...);
$someModel->fieldB = 123;
$someModel->update();
//if the original value of fieldA in db is empty string, it will raise an error here
//fieldA is required
.
.
.