Using virtual fields in cakePHP 2.x

前端 未结 2 1352
一生所求
一生所求 2021-01-05 10:44

I\'ve read through the documentation and struggled to understand what to do. Also, I\'ve read through the questions here on stackoverflow, and nothing that I tried helped.

2条回答
  •  失恋的感觉
    2021-01-05 11:03

    The bottom of the cake document specifies some limits of virtual fields..

    The implementation of virtualFields has a few limitations. First you cannot use virtualFields on associated models for conditions, order, or fields arrays. Doing so will generally result in an SQL error as the fields are not replaced by the ORM. This is because it difficult to estimate the depth at which an associated model might be found.

    http://book.cakephp.org/2.0/en/models/virtual-fields.html#limitations-of-virtualfields

提交回复
热议问题