CodeIgniter Forums
Query builder returns all properties as String - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=31)
+--- Thread: Query builder returns all properties as String (/showthread.php?tid=80606)



Query builder returns all properties as String - LeaReift - 11-20-2021

The entities are a step in the right direction. Why not create a base entity with the common field types (INT, FLOAT, DATETIME, etc.) for the query builder?


RE: Query builder returns all properties as String - includebeer - 11-22-2021

You can already do that with property casting: https://codeigniter.com/user_guide/models/entities.html#property-casting


RE: Query builder returns all properties as String - kenjis - 11-22-2021

(11-20-2021, 06:52 AM)LeaReift Wrote: Why not create a base entity with the common field types (INT, FLOAT, DATETIME, etc.) for the query builder?

Good opinion.


RE: Query builder returns all properties as String - LeaReift - 11-24-2021

(11-22-2021, 06:48 PM)includebeer Wrote: You can already do that with property casting: https://codeigniter.com/user_guide/models/entities.html#property-casting

Exaclty what I meant. But still need to create the entity class. I was wondering if CI can do it in a regular query.