![]() |
Entity misbehavior after upgrading from 4.1.9 to 4.2.1 - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: Entity misbehavior after upgrading from 4.1.9 to 4.2.1 (/showthread.php?tid=82465) |
Entity misbehavior after upgrading from 4.1.9 to 4.2.1 - stevenmalin - 07-13-2022 Just noticed my application started behaving oddly after upgrading to 4.2.1. Entity attributes that I know have a value are reporting as not having a value. For example, I have an entity like this: PHP Code: <?php I know it's not necessary to have a datamap setup for an attribute of the same name but I have my reasons. Now in my code if I set a value for test_attr, I can get the value of the attribute, but if I check the value of the attribute with empty() or isset(), they return true/false respectively. For example: PHP Code: $t = new \App\Entities\TestEntity(); ![]() It looks like as of 4.2.0, CodeIgniter\Entity\Entity::__isset was altered to include: PHP Code: if ($this->isMappedDbColumn($key)) { RE: Entity misbehavior after upgrading from 4.1.9 to 4.2.1 - kenjis - 07-13-2022 The change is for fixing this. https://forum.codeigniter.com/thread-80835.html RE: Entity misbehavior after upgrading from 4.1.9 to 4.2.1 - stevenmalin - 07-14-2022 (07-13-2022, 07:18 PM)kenjis Wrote: The change is for fixing this. Awesome, thank you! |