![]() |
save and delete Function for Entities - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Feature Requests (https://forum.codeigniter.com/forumdisplay.php?fid=29) +--- Thread: save and delete Function for Entities (/showthread.php?tid=90261) |
save and delete Function for Entities - c0mmander - 02-26-2024 Hello, i'm currently working this way: PHP Code: $user = new \App\Entities\User(); It would be nice if we can just this: PHP Code: // new Row So I started the last mins creating a work'around like this: PHP Code: <?php PHP Code: <?php Not fully tested, but is that something others would like to see in codeigniter? Then I would make a pull request. Regards c0mmander RE: save and delete Function for Entities - kenjis - 03-06-2024 That is active record pattern. The change is not possible because it is a complete design change. No one would agree at this point. If you want to use active records, customize like you show, or you should use the implementation that already exists (like Composer package). |