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

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forum-28.html)
+--- Forum: CodeIgniter 4 Discussion (https://forum.codeigniter.com/forum-31.html)
+--- Thread: Query builder returns all properties as String (/thread-80606.html)



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.