Conditions in JOINed tables shows error CakePHP

前端 未结 1 1709
暖寄归人
暖寄归人 2021-01-28 05:15

I have two tables employee_personals where all the personal record of the employee is stored and telephone_bills where the telephone bills paid to a pa

相关标签:
1条回答
  • 2021-01-28 05:56

    TLDR: use Joins instead.


    Details/Notes:

    1) it looks like you're using recursive. Don't do that. Use Containable instead.

    2) You can't limit the parent model based on conditions against data from a contained/recursive-included table - instead, use Joins.

    2b) Or, you could query from the other direction, and query your TelephoneBill with conditions, then contain the EmployeePersonal.

    0 讨论(0)
提交回复
热议问题