This basically compliments the article about virtual entity fields. Note that those entity ones are not creating custom SQL queries, but work/operate on the existing entity data. Now, the query ones, however, usually involve custom SQL snippets to fetch the…
Tag: virtual fields
Virtual entity fields in CakePHP
I must say: I have not been using them in the years of their existence in CakePHP 3+. But I now started and must say: They can sure be handy. How do they work? They basically calculate the results of…
Working with virtual fields in Cake1.3
In earlier versions of CakePHP we had to use Behaviors like "MultipleDisplayFields" or whatever. With $Model->virtualFields it is now possible to natively use find() methods combined with virtual fields. The nice thing about it is, that the pagination can work…