Entity auto convert column to time instance on joined table ? - 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 auto convert column to time instance on joined table ? (/showthread.php?tid=80057) |
Entity auto convert column to time instance on joined table ? - eelisland - 09-08-2021 Can an Entity class convert to time instance a joined table column ? i use this query below and want the auth_logins.date to be converted to Time instance if possible PHP Code: $model = model(UserModel::class); I try to add the date column in the entity class PHP Code: /** RE: Entity auto convert column to time instance on joined table ? - paulbalandan - 09-08-2021 Yes, property names included in the $dates array will be converted to Time instances when possible upon access. RE: Entity auto convert column to time instance on joined table ? - eelisland - 09-09-2021 Thanks Paul it works I used the php spark publish:auth from Myth Auth, but modification in App\Entity\User have no effect, modifiying the Myth\Auth\Entities works fine. I'm not very experimented with namespacing and extending files, do you know why editing App\Entity\User have no effect ? I can open another thread or a bug report on github if needed. RE: Entity auto convert column to time instance on joined table ? - paulbalandan - 09-09-2021 You can open another thread. Then show the contents pf your User entity. |