So we try to update a fiend of a model object twice after the object is loaded, and the second update doesn't work while it returns true.
// initial status value in db: 0
$Account->setStatus(1);
if ($Account->update() !== false) {
print "update done!";
}
$Account->setStatus(2);
if ($Account->update() !== false) {
print "update done!";
}
please note that $this->useDynamicUpdate(true); for this model, and when useDynamicUpdate is turned false, it works without any problem.
so basically to summarize it:
with $this->useDynamicUpdate(true);
- initial value: 0
- after first update: 1
- after second update: 1
with $this->useDynamicUpdate(false);
- initial value: 0
- after first update: 1
- after second update: 2