Potential cache issue with save()
iFlash opened this issue · comments
Hello,
I have come across an odd behavior:
I load a database row via load. Then I copy it like this:
$sell->copyto('tmp');
$sell->reset();
$sell->copyfrom('tmp');
$sell->id=false;
and save it
$sell->save();
I would expect to have the newly created row id in $sell->id (it's an auto increment field).
But instead all fields of the newly created row seem empty.
But: When I inspect the database, the row IS THERE with all the correct values. It is just not present right after I created it. I assume this is some cache issue.
Is there a way to force the cache to flush?
Which version of the framework are you running?
There have been a few fixes released in 3.7.3 which were dealing with that kind of issue.
Also which SQL engine are you using?
I am running 3.7.1
I am always a bit scared of updating because in the past too many things broke when I did.
I am using the MySQL engine.
EDIT: I updated to 3.7.3. and I can confirm the bug has gone. Awesome. Fingers crossed, nothing else is broken …
great news ;)